How to pass -ignoreAdditional Switch to Sync-DlmDatabaseSchema cmdlet from DLM Automation 2?

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

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

  • PeterGPeterG Posts: 61 Silver 3
    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
    
    Peter Gerrard

    Software Engineer
    Redgate Software
  • PeterGPeterG 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

Sign In or Register to comment.