How to change the owner of database in SQL Server

In this article, we will see how to change the owner of database in SQL Server with different methods.

We following three methods to change SQL Server database owner name:
1. Using SQL Server Management Studio.
2. Using ALTER AUTHORIZATION command.
3. Using system stored procedure.

Permissions required to change owner of the database:
Requires TAKE OWNERSHIP permission on the database.

Change the owner of database in SQL Server using SSMS:
Continue reading How to change the owner of database in SQL Server

How to set database in single user mode on SQL Server

In this article, we will see how to set database in single user mode on SQL Server by using GUI method and SQL Statement.

Why single user mode?
1. Database Single-user mode specifies that only one user at a time can access the database and is generally used for maintenance tasks.

2. If other users are connected to the database at the time that we want set the database to single-user mode, their connections to the database will be closed without warning.

Permissions Required to set single user for database in SQL Server:
Continue reading How to set database in single user mode on SQL Server

How to rename a database in SQL Server

In this article, we will see how to rename a database in SQL Server by using QL Server Management Studio or Transact-SQL.

1. Renaming system databases are not allowed.
2. It is best practice to set a database in single user mode to close any open connections.
3. User must be granted ALTER permission on the database which is going to be renamed.

Rename database in SQL Server using SQL Server Management Studio:
Continue reading How to rename a database in SQL Server