Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sql server security Expand / Collapse
Author
Message
Posted Tuesday, June 11, 2013 2:25 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, November 13, 2013 5:01 AM
Points: 10, Visits: 150
Hi

Can we restrict a user from viewing a database in sql server 2012?
Post #1461924
Posted Tuesday, June 11, 2013 8:49 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, April 04, 2014 2:06 AM
Points: 136, Visits: 577
Yes. The login by default is a member of the public server role, which by default is granted the VIEW ANY DATABASE server permission.

If you don't want this to be the case, you can run an explicit deny against that login:-

DENY VIEW ANY DATABASE TO [YourLogin]

.

Following this, the login will only be able to see the master, tempdb databases along with any databases that the login owns.

More reading:- http://msdn.microsoft.com/en-us/library/ms189077.aspx
Post #1462192
Posted Tuesday, June 25, 2013 7:09 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, April 14, 2014 8:19 AM
Points: 306, Visits: 461
Are you talking about not being able to see a database within the SSMS or not being able to view the contents of a database?
Post #1467127
Posted Tuesday, June 25, 2013 9:34 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, November 13, 2013 5:01 AM
Points: 10, Visits: 150
Yes,not being able to view the database in ssms
Post #1467239
Posted Wednesday, June 26, 2013 12:20 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, April 14, 2014 8:19 AM
Points: 306, Visits: 461
kkarthik117 (6/25/2013)
Yes,not being able to view the database in ssms


In that case, Matthew has hit the nail on the head with his answer.
Post #1467460
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse