How to use sql data compare command line with azure managed identity databases ?

Hello,
We are using red gate sql data compare tool using command line. We have an application which invokes sql data compare tool through command line and we pass database username and password by /u1, /u2 and /p1, /p2 switches.
But in some databases we have azure managed identity enabled, where there is no username and password and we generate access token by managed identity client id. 

How to pass access token or client id or is there any way to invoke sql data compare tool for databases with azure managed identity enabled ?

Answers

  • Hi Vaibhav, 
     
    Thank you for your inquiry about SQL Compare. You need to register SQL Compare as an Azure Active Directory application, which will generate an Application ID for authentication purposes. This setup allows SQL Compare to use Active Directory Universal with MFA authentication (Azure) to connect without requiring a username and password. If you are using a version older than 14.8.0, you will need to input the Application ID manually in the connection dialog. If you are on a version 14.8.0 or later, the Application ID is no longer necessary. You can find detailed steps in Redgate's documentation here
     
    Please let me know if you have any issues.
  • logitrainlogitrain Posts: 1 New member
    To use SQL Data Compare command line with Azure managed identity databases, you would typically need to:
    • Ensure you have the necessary permissions and access to the Azure managed identity databases.
    • Install and configure the SQL Data Compare tool, which is usually part of Redgate's SQL Toolbelt.
    • Use the Azure CLI or PowerShell to authenticate with your managed identity.
    • In the command line, you would use the SQL Data Compare command with appropriate parameters, specifying the source and target databases, and including the authentication method for managed identity.
    The exact command syntax would depend on your specific setup and the version of SQL Data Compare you're using. It's recommended to consult the official documentation for SQL Data Compare and Azure managed identities for the most up-to-date and accurate information. For those looking to enhance their skills, consider exploring azure administrator associate training.
Sign In or Register to comment.