SQL Compare 14 Command Line on Linux

SQL Compare 14 has now been released and a new beta feature is that the command line interface can now be run on Linux, using a Docker container. The only thing you need to do to use it is to ensure Docker is installed on your Linux machine. The SQL Compare 14 container image is now live on Docker Hub.

As a basic example, you can use the following to compare two databases using the SQL Compare container image.

docker run --rm redgate/sqlcompare:14 /IAgreeToTheEULA \
    /s1:my-server\\sql2019 /db1:database1 /u1:sa /p1:my-password \
    /s2:my-server\\sql2019 /db1:database2 /u2:sa /p2:my-password<br>
Here is a link to a page on our documentation site to help you get started.
Software Engineer
Redgate Software
Tagged:

Comments

  • trurltrurl Posts: 1 New member
    edited October 22, 2019 8:11AM
    This is awesome! 
    Gave is a try, having issue with stored proc referencing custom data type:
     Column, parameter, or variable #1: Cannot find data type 
    This worked with sql compare 12 windows same setup. Where issues can be reported for sql compare docker 14? 
  • Hi everyone,

    To find out more about SQL Compare 14, check out this product learning article.

    Cheers,

    Roseanna 
    Product Marketing Manager for SQL Prompt and SQL Toolbelt Essentials
  • David_KeavenyDavid_Keaveny Posts: 3 New member
    edited April 19, 2022 7:52AM
    This looks very helpful, especially for non-Windows based build systems. When I try to run the CLI based on the scripts, it fails to connect my local SQL Server - do we need to set up networking to allow the CLI access? There's no indication of it in the examples.

    My script is:
    docker run --rm --interactive --tty \
     --mount type=bind,source=/src/scripts,target=/src \
      redgate/sqlcompare \
      /IAgreeToTheEULA \
      /Scripts1:/src \
      /Server2:localhost /Database2:MyDatabase /UserName2:Deployments /Password:my-secret-password
    
        which results in the error message:
    SQL Compare V14.7.2.20940
    ====================================================================================================================================================================
    Copyright © Red Gate Software Ltd 1999-2022
    
    Beta (expires on Wednesday, 06 July 2022)
    Warning: Some settings are missing from the RedGateDatabaseInfo.xml file in the scripts folder '/src': default values will be used for any omitted setting.
    Error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify
  • David_KeavenyDavid_Keaveny Posts: 3 New member
    Oops, never mind; I think the password was wrong!

    #FacePalm
Sign In or Register to comment.