Skip to content

Settings and activity

3 results found

  1. 3 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  SQL Compare  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Eric commented  · 

    (I'm just another user) I'm working with the commandline options for SQL Compare to create a batch file across our environment. Maybe you just need direction to this information.
    https://documentation.red-gate.com/sc/using-the-command-line/options-used-in-the-command-line
    You can have this also if useful for someone.

    /*EXAMPLE creates html report for changes which would bring DB345 in sync with the baseline DB123*/
    /* /force will allow overwrite of prior file*/
    /* /quiet reduces commandline output*/
    /*To automate changes, review use of /sync. not included in example */
    declare @exeLocation varchar(500) = 'C:\Program Files (x86)\Red Gate\SQL Compare 14\SQLCompare.exe'
    declare @Server1 varchar(100) = 'ABC\INSTANCE1' --SOURCE SERVER
    declare @Server2 varchar(100) = 'ABC\INSTANCE2' --SECONDARY SERVER
    declare @Database1 varchar(100) = 'DB123' --SOURCE DB
    declare @Database2 varchar(100) = 'DB345' --SECONDARY DB
    declare @ProjectPath varchar(500) ='D:\SQLCompare\SharedProjects\'
    declare @ProjectName varchar(100) = 'Prod' --excludes file extension ".scp"
    declare @FilterPath varchar(500) = 'D:\SQLCompare\SharedFilters\'
    declare @FilterName varchar(100) = 'Only_StoredProc' --excludes file extension ".scpf"
    declare @ReportPath varchar(500) = 'D:\SQLCompare\SharedReports\'
    declare @ReportName varchar(500) = + REPLACE(@Server2,'\','_') + '_' + @Database2 + '.html'
    declare @ReportType varchar(10) = 'html'
    declare @additionalParameters varchar(100) =' /force /quiet' /*leading space*/
    declare @runStmt varchar(max)
    declare @quote char(1) = '"'
    select @runStmt =
    @quote + @exeLocation + @quote
    + ' /Server1:'+@Server1
    + ' /db1:' + @Database1
    + ' /Server2:'+@Server2
    + ' /db2:' + @database2
    + ' /project:' + @quote + @ProjectPath + @Projectname + '.scp' + @quote
    + ' /filter:' + @quote + @FilterPath + @FilterName + '.scpf' + @quote
    + ' /report:' + @quote + @ReportPath + @ReportName + @quote
    + ' /ReportType:' + @ReportType
    + @additionalParameters
    print @runStmt

  2. 7 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  SQL Compare  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Eric supported this idea  · 
  3. 7 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  SQL Compare  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Eric commented  · 

    It seems like you would place a flag on the \sync parameter and toggle the verbiage to default as "Missing" or "Extra" in place of "Added" or "Removed".

    Eric supported this idea  ·