Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Grant view for a specific database
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jayram
Starting Member

47 Posts

Posted - 09/11/2013 :  11:17:12  Show Profile  Reply with Quote
How can i grant view only to one database for a user?

Should i have to grant view to ANY and then individually DENY VIEW for other databases?

Thanks

Jay

jayram
Starting Member

47 Posts

Posted - 09/11/2013 :  12:29:19  Show Profile  Reply with Quote
never mind i was able to get it from below

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/a989ca87-660d-41c4-9dac-70b29a83ddfb/hide-database-names-from-unauthroized-users-in-ssms

"This is possible for a single user login as you can only asign ownership of a database to a single user.
Should be ok for most small hosting situations. This is how I achieved it under SQL server 2008...


1. Right click the users logon under the users database if they exist and remove
(Note: Do not remove the user from under the main security login)

2. Run the following query

USE <customersdatabase>

ALTER AUTHORIZATION ON DATABASE::<customerdatabase> to <customerlogin>


USE MASTER

DENY VIEW ANY DATABASE TO <customerlogin>"
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.48 seconds. Powered By: Snitz Forums 2000