1

version:SQL Server 2008 R2

I have granted a user the ability to EXECUTE and SELECT for a DB. However, when they log into SSMS they cannot see the DB that they have those permissions on. What is the minimum permission level they have to have in order to view the DB?

The login is part of public server role and the EXECUTE and SELECT are at the db level.

Thanks as always.

S

2 Answers 2

1

You can try to grant VIEW DEFINITION right.

grant view definition to _user

http://msdn.microsoft.com/en-us/library/ms187113.aspx

Regards

Piotr

4
  • Hi @Piotr I tried that, but when I log in with the account I still can't see the DB?
    – scarpacci
    Jun 2, 2011 at 18:40
  • Ok, so when you log on with this account, what do you see? you can GRANT CONNECT _database to _yourlogin, maybe this is the reason. Jun 2, 2011 at 19:19
  • I can only see the tempdb and master dbs. I believe it has the connect privelege on that db.
    – scarpacci
    Jun 2, 2011 at 19:20
  • When you connect to the database with your db_owner/sa account, do you see the user in sys.database_principals? If not, run CREATE USER _user from login [validloginname or windows] Jun 2, 2011 at 19:38
1

You should check your server's public role's securable permissions on View any database. It should be grant on view any database.

use [master]
GO
GRANT VIEW ANY DATABASE TO [public] AS [sa]
GO

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.