Change Database Connection in SQL Server

Change Database Connection in SQL Server

In general, every user tends to work on a separate database on the server during the development phase of an application. It can be annoying for users to repeatedly change the default database to the one to which they are connected when logging on to SQL Server. You can change the database connection using the stored procedure sp_defaultdb:

 sp_defaultdb login_id, defaultdb

After sp_defaultdb is executed, users are connected to the new defaultdb the next time they log in. However, this stored procedure does not automatically give users access to that database. The database owner must explicitly give access to the users. If no default database has been specified, users are connected to the master database. Execute permission for this procedure defaults to public for a user’s login ID only and to the system administrator for any login ID.

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular