Archive

Posts Tagged ‘DB access rights’

How to give a database access to specific users only?

December 4, 2012 Leave a comment

SINGLE_USER allows any single user with permission to access the database.

ALTER DATABASE [Database Name] SET SINGLE_USER

ALTER DATABASE [Database Name] SET Multi_USER
RESTRICTED_USER is the one that limits access to sysadmin, dbowner, or dbcreator

ALTER DATABASE adventureworks
SET restricted_user WITH ROLLBACK IMMEDIATE;
Advertisements
%d bloggers like this: