Comments
4 comments
-
Your syntax looks correct. To help work out what is going wrong could you add -Debug -Verbose to your call
Sync-DlmDatabaseSchema -Source $scriptsFolder -Target $ci -AbortOnWarningLevel None -IgnoreAdditional -Verbose -Debug
And then copy paste the following two lines:VERBOSE: Calling: C:\Program Files (x86)\Red Gate\DLM Automation 2\SC\SQLCompare.exe /options:ConsiderNextFilegroupInPartitionSchemes,DecryptPost2kEncryptedObjects,DoNotOutputCommentHeader,ForceColumnOrder,IgnoreCertificatesAndCryptoKeys,IgnoreDatabaseAndServerName,IgnoreTSQLT,IgnoreUserProperties,IgnoreUsersPermissionsAndRoleMemberships,IgnoreWhiteSpace,IgnoreWithElementOrder,IncludeDependencies,NoDeploymentLogging,ThrowOnFileParseFailed,UseCompatibilityLevel /transactionIsolationLevel:SERIALIZABLE /exclude:Additional "/scriptFile:C:\Users\Peter.Gerrard\AppData\Local\Temp\DLM Automation\xfjrl2uk.sql" /showWarnings /include:Identical "/report:C:\Users\Peter.Gerrard\AppData\Local\Temp\DLM Automation\0gmntwax.xml" /reportType:Xml /assertidentical /force /OutputWidth:1024 /server1:.\sql2016 /database1:northwind /server2:.\sql2016 /database2:northwind /out:"C:\Users\Peter.Gerrard\AppData\Local\Temp\DLM Automation\b0ocjlc0.log" DEBUG: SQL Compare Command Line V13.1.8.5471
-
Thanks Peter. Putting your -verbose and -debug flags in place, I've been able to narrow down the issue. It seems to come from the internal call this cmdlet makes to SQL Compare when the flag -IgnoreAdditional is used. SQLCompare exits with error code 8 which translates to "Unsatisfied argument dependency
There is an unsatisfied argument dependency or violated exclusion when the command line is run."
https://documentation.red-gate.com/sc10/using-the-command-line/exit-codes-used-in-the-command-line
This is DLM Automation 2 using the out-of-the-box SQL Compare build 13.0.7.5250. Please advise.
Thanks. -
This turned out to be a path issue on the build agent vm. No further issues. The error message given by SQLCompare is a red herring though - just food for thought.
-
Glad it's fixed. Apologies for the difficulty in working it out. I'll make sure your comment about the error code is passed on.
Add comment
Please sign in to leave a comment.
Sync-DlmDatabaseSchema -Source $scriptsFolder -Target $ci -AbortOnWarningLevel None -IgnoreAdditional
I get the error
I am successful running without the switch. However, I need the switch so that I don't drop objects in the target database. Please advise and give an example of the correct syntax.