February 20, 2012

Find database status using T-SQL

We can check all database status in SQL Server.

SELECT
Name, State_Desc, User_Access_Desc, Is_Read_Only FROM sys.databases

Output will be something like as below:

image

That’s It.
Enjoy Learning.

No comments:

Post a Comment