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
  • 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
    wow, it looks rpomising,I am gonna give it a try and update you guys here . Thanks.
  • James78James78 Posts: 1 New member

    Wow, this looks promising! I'm definitely going to give it a try and will update you all here. Thanks!

  • Amazing concept I will try it as well after I finish playing Nulls Brawl game with my friends. It really inspires me how these game are made and how they can hook you, but it is people like us that keep them working I am proud of myself.
  • Leon_1Leon_1 Posts: 3 New member
    Oops, never mind; I think the password was wrong!

    #FacePalm
    Yes. I also get the same error when i accidently typed in the wrong password when connecting with the bsd brawl server. Thanks for pointing it out.
  • rosy76rosy76 Posts: 1 New member
    Amazing concept I will try it as well after I finish playing Nulls Brawl game with my friends. It really inspires me how these game are made and how they can hook you, but it is people like us that keep them working I am proud of myself.

    Very cool! It's great to see you're inspired by how games like Nulls Brawl are made. Playing games is a great way to connect with friends. and explore creativity Enjoy the game and feel proud of your contribution to its success!




  • David44David44 Posts: 1 New member

    "SQL Compare 14 on Linux sounds like a powerful tool for database syncing! It's great to see command-line utilities getting better cross-platform support. By the way, if you're into gaming during your breaks, check out Nulls Brawl—it's a fun way to unwind. Keep up the awesome tech posts!"

  • I have a question! Do I have to use the docker run command separately on Linux to compare with others? BSD Brawl 
Sign In or Register to comment.