"... is not linked to sql source control" error on linked db
avisho
Posts: 8
Hi,
I'm trying to compare a db HEAD revision to other DB but unfortunately when trying to use SQL Compare command line I get the "... is not linked to sql source control" error.
Command line:
sqlcompare /server1:myserver /db1:my-linked-db /revision1:HEAD /server2:myserver /db2:my-other-linked-db
Error:
SQL Compare: activated, edition: professional, serial number: XXX-XXX-XXX-XXX
SQL Compare Command Line V10.4.8.87
========================================================================================================
Copyright c Red Gate Software Ltd 1999-2013
Unexpected error: The database myserver.my-linked-db is not linked to SQL Source Control
The database myserver.my-linked-db is not linked to SQL Source Control
RedGate.Shared.Utils.InvalidStateException
at RedGate.Shared.Utils.Aver.#j43(String #Wt6, Object[] #ead)
at RedGate.SQLToolsCommandLine.CommandProcessor.#dRzc(Int32 #HXi)
at RedGate.SQLToolsCommandLine.CommandProcessor.#pcmb(Project #zNSb, DataSourceNumber #o9rc)
at RedGate.SQLCompare.CommandLine.CommandProcessor.#pcmb(Project #zNSb, DataSourceNumber #o9rc)
at RedGate.SQLToolsCommandLine.CommandProcessor.#mcmb()
at RedGate.SQLCompare.CommandLine.CommandProcessor.#wOr()
at RedGate.SQLToolsCommandLine.CommandProcessor.#kcmb()
at RedGate.SQLCompare.CommandLine.CommandProcessor.#kcmb()
at RedGate.SQLToolsCommandLine.CommandProcessor.#OUb()
at #i9G.#OsPb.#6sc(String[] #ead)
What am I missing here?!
I'm trying to compare a db HEAD revision to other DB but unfortunately when trying to use SQL Compare command line I get the "... is not linked to sql source control" error.
Command line:
sqlcompare /server1:myserver /db1:my-linked-db /revision1:HEAD /server2:myserver /db2:my-other-linked-db
Error:
SQL Compare: activated, edition: professional, serial number: XXX-XXX-XXX-XXX
SQL Compare Command Line V10.4.8.87
========================================================================================================
Copyright c Red Gate Software Ltd 1999-2013
Unexpected error: The database myserver.my-linked-db is not linked to SQL Source Control
The database myserver.my-linked-db is not linked to SQL Source Control
RedGate.Shared.Utils.InvalidStateException
at RedGate.Shared.Utils.Aver.#j43(String #Wt6, Object[] #ead)
at RedGate.SQLToolsCommandLine.CommandProcessor.#dRzc(Int32 #HXi)
at RedGate.SQLToolsCommandLine.CommandProcessor.#pcmb(Project #zNSb, DataSourceNumber #o9rc)
at RedGate.SQLCompare.CommandLine.CommandProcessor.#pcmb(Project #zNSb, DataSourceNumber #o9rc)
at RedGate.SQLToolsCommandLine.CommandProcessor.#mcmb()
at RedGate.SQLCompare.CommandLine.CommandProcessor.#wOr()
at RedGate.SQLToolsCommandLine.CommandProcessor.#kcmb()
at RedGate.SQLCompare.CommandLine.CommandProcessor.#kcmb()
at RedGate.SQLToolsCommandLine.CommandProcessor.#OUb()
at #i9G.#OsPb.#6sc(String[] #ead)
What am I missing here?!
Comments
You can tell if the database has been linked using the extended properties below. They may not be there if you did not link the database using SQL Source Control or if you restored an earlier backup from before it was linked to source control.
The database - IS - linked to source control and I use it daily (commit, get latest etc...).
I ran the query you gave me and below are the results:
Reader A: 39342
Reader B: <?xml version="1.0" encoding="utf-16" standalone="yes"?> <ISOCCompareLocation version="1" type="SvnLocation"> <RepositoryUrl>https://192.168.0.2:8010/svn/Dev/Projects/Server Projects/Database/trunk/Repository/MYDBNAME/</RepositoryUrl> </ISOCCompareLocation>
Reader C: <?xml version="1.0" encoding="utf-16" standalone="yes"?> <ISOCCompareLocation version="1" type="SvnLocation"> <RepositoryUrl>https://192.168.0.2:8010/svn/Dev/Projects/Server Projects/Database/trunk/MigrationScripts/MYDBNAME/</RepositoryUrl> </ISOCCompareLocation>
Please advise,
Avi
below is the xml part:
The other option would be to save the two extended property xml fragments out to two files (call them db.xml and mig.xml). Then add to your command-line the switches:
/sourcecontrol1 /scriptsfolderxml:<path to db.xml> /migrationsfolder:<path to mig.xml>
and remove the /server1 and /database1 switches
Redgate Software
what's the difference between literally writing in command line and using xml files?
Redgate Software
Redgate Software