How to see the User Access Mode of a database
In this short article we are going to discuss that how can we see the
user access mode of a database i.e. it is in Single or MultiUser or restricted.
Single_User: Single user connection to the
database.
Multi_User: Any number of users with rights to
the database can connect to the database:
Restricted_User: Any number of users with db_owner or
db_creater or logins with the sys admin.
To do this we have two options either we can see it via SSMS or using
T-SQL.
First let see how we can achieve this via T-SQL. Connect to SSMS. Open new
query. We are going to see the mode of our database that is DBTest.
USE DBTest
GO
SELECT name AS DataBase_Name,
user_access_desc AS Mode_Of_Database FROM
sys.databases
WHERE name='DBTest'
Along with this if you want to check that the database is in Read only
mode or not you can add the column “is_read_only” to the above query and you will get
result. 1 means it is in read only mode and 0 means it is in READ_WRITE mode.
Now let’s see how to check it via SSMS.
Go
to object explorer > Databases > DBTest > Right Click > Properties.
Now a window will appear. Click on option tab, in this tab go to the bottom of
the page and you will see the user access mode as below:
Thanks!!!!!!!!! J J J
No comments:
Post a Comment