The database is not accessible. (Object Explorer) | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

The database is not accessible. (Object Explorer)

Hi FolksWe have restored a database and create user with db_owner rights. But when we login for the database error message came up. "The database is not accessible.(Object Explorer)". During investigation i have found that if user given sysadmin rights then user access to it and no such error but not as db_owner. we are using 2005 with SP2. I have search internet but no solution found…Please help…Thanks in Advance
You have to create the same exact login as it is in the restored database and then login as sysadmin in the restored database and run sp_change_users_login ‘auto_fix’ ,’user with db_owner rights’. This will map the db user with a sql server login.

No… I have simply restored the database and create new useras db_owner for both DBs. As i have mentioned one access fine secind one give this ERROR.

Try using:


Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |