How to pass -ignoreAdditional Switch to Sync-DlmDatabaseSchema cmdlet from DLM Automation 2?
![Everclear](https://us.v-cdn.net/6029854/uploads/defaultavatar/nZUSABQN8JEE0.jpg)
The documentation says it is an ordinary switch parameter but when I run the following command to sync my database,
Sync-DlmDatabaseSchema -Source $scriptsFolder -Target $ci -AbortOnWarningLevel None -IgnoreAdditional
I get the error
![jqnyiz1f5ggq.png](https://us.v-cdn.net/6029854/uploads/editor/iu/jqnyiz1f5ggq.png)
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.
Sync-DlmDatabaseSchema -Source $scriptsFolder -Target $ci -AbortOnWarningLevel None -IgnoreAdditional
I get the error
![jqnyiz1f5ggq.png](https://us.v-cdn.net/6029854/uploads/editor/iu/jqnyiz1f5ggq.png)
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.
Tagged:
Best Answers
-
PeterG Posts: 61 Silver 3
Your syntax looks correct. To help work out what is going wrong could you add -Debug -Verbose to your callSync-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
Peter Gerrard
Software Engineer
Redgate Software -
PeterG Posts: 61 Silver 3
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.Peter Gerrard
Software Engineer
Redgate Software
Answers
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.