microsoft/mssql-scripter

Connections to Azure SQL DW attempt to connect to Master DB on the same server but not the Given DB

Reshma27Nirmalkumar opened this issue · 1 comments

mssql-scripter -S server.database.windows.net -d myDB -U id -P pwd --target-server-version AzureDW

The above command gives ""login failed"" error as it tries to connect to ""Master"" DB instead of ""myDB"".

I checked the link #144 and found this big is already worked upon but still I get this error.
I tried version 21,22,23.

bbct commented

I don't know about Azure DW, but I successfully scripted my Azure database by passing the --connection-string parameter INSTEAD of the -S, -d, -U, and -P parameters. When using the connection string, the app connects directly to your database. Azure doesn't support the USE dbname method of switching to another DB on the same server, as it considers each DB to be distinct and on its own.