Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

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

Open
Reshma27Nirmalkumar opened this issue Nov 9, 2020 · 1 comment

Comments

@Reshma27Nirmalkumar
Copy link

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
Copy link

bbct commented Feb 17, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants