sqldatabasepermissionsssms

Permissions Problems Prevent Database Access


Recently I inherited a database from another programmer (created / stored with SQL Management Studio 2008), and I am having massive difficulties accessing, modifying, or even viewing the previously created databases.

Specifically, when I try to load one of the databases in SQL Management Studio I get the following error message:

"The database [database name] is not accessible. (Object Explorer)"

I am connecting to the SQL server with windows authentication.

Anyway, is this a permissions issue left over from the last dev? (he's unavailable, unfortunately) And is there an easy work-around short of completely reinstalling SQL Management Studio?

Edit: Update:

Upon trying to access User Mapping, as suggested below, I got the following error message:

"One or more databases are inaccessible and will not be displayed in list."

Unfortunately, none of the databases I am trying to access appeared in the list, so I assume they are still inaccessible.


Solution

  • It could very well be a permissions problem. If you open Object Explorer in SQL Server Management Studio and expand the Security node (the one under the server instance, not the Security tab under the individual databases) and then expand the Logins node you'll see the list of logins that have been created on the server. Have a look at the properties of each of those and check out the User Mapping information. You'll be able to see which logins are mapped to which databases. It's possible the previous programmer only granted access to the database to certain logins. If you find a login that's mapped to the database you want, try changing the password of the login and then connecting to the database with that login and password. NOTE: be careful when changing the password as it may affect production applications that are using that login and password!