Using Azure Data Factory & Azure Key Vault, I connect to a few core databases (usually Azure SQL Database & traditional SQL Server instances) & I can never remember the correct format for the connection strings. So here’s my cheat sheet!
In each case, replace <fullservername>, <databasename>, <username> & <password> with the relevant details from your own system.
Azure SQL Database (system managed identity)
Integrated Security=False;Encrypt=True;Connection Timeout=30;Data Source=<fullservername>;Initial Catalog=<databasename>
SQL Server instance (SQL Authentication)
Integrated Security=False;Connection Timeout=30;Data Source=<fullservername>;Initial Catalog=<databasename>;user id=<username>;password = <password>
SQL Server instance (SQL Authentication where the password contains a semi-colon)
Without the single quotes around the password, the connection will fail with an error.
Integrated Security=False;Connection Timeout=30;Data Source=<fullservername>;Initial Catalog=<databasename>;user id=<username>;password = '<password>'
Be First to Comment