Explore Courses Blog Tutorials Interview Questions
0 votes
in Azure by (12.7k points)

I would like to change the default database for login to support software that can access SQL Azure but does not allow easy alteration of a connection string. It appears that SQL Azure defaults to the master database.

I've already considered:

  • Stored procedures. I can't find a stored procedure that does this (sp_defaultdb is not implemented in SQL Azure as far as I can tell)
  • Alter Login. ALTER LOGIN does not permit the DEFAULT_DATABASE option.
  • SSMS. SSMS doesn't seem to allow much user control through the interface for SQL Azure.


1 Answer

0 votes
by (9.6k points)

You can do the following:

1. Make changes in the connection string,1433;Initial Catalog=helloworld;Persist Security Info=False;User ID={your_username};Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;

Change the database name in the string.

2. In SSMS, here is what you can do while login in. 



Related questions

Browse Categories