Dedicated SQL Server Hosting Specialist LiveZilla Live Help
Sales: sales@dedicatedsqlserver.com
Support: support@dedicatedsqlserver.com
Phone: 409-877-4238



The server principal 'MyUser' is not able to access the database 'NotMyDB' under the current security context (Microsoft SQL Server, Error:916)

Problem

You get the following error messages when you try to access your Microsoft SQL Server database with SQL Server Management Studio. The database may not be yours if you host your database in a shared server.

        The server principal 'MyUser' is not able to access the database 'NotMyDB' 
        under the current security context (Microsoft SQL Server, Error:916)
    

Solution

The problem is caused by the auto close status of the databases. We need to turn off the "auto close" of the database. Please follow these steps.

1) Get a database list

Go to SQL Server Management Studio > Management > SQL Server Logs. Open the current logs and find "Starting up database 'DBName'". Write the 'DBName' list.

2) Turn off "Auto Close" for the databases

Go to SQL Server Management Studio > Databases. Right click the database name and choose "Properties". Click "Options" in the left side and change "Auto Close" from "True" to "False".

Related Resources

Navigator

Other How-Tos
External Windows Resources
External SQL Server Resources
External Webmaster Resources
External Developer Resources

Express SQL Server

CPU: Intel Core 2 Duo E8400
CPU Speed: 3.00GHz
Cache: 6MB
RAM: 4GB RAM
Disk: 2x320GB SATA
RAID: RAID 1
Bandwidth: 1000GB
Win2008 Web or Win2003 STD: Free
IP Addresses: 8
Monthly: $149.00

Detail...

Standard SQL Server

CPU: Quad-Core Xeon E5410
CPU Speed: 2.33GHz
Cache: 12MB
RAM: 4GB RAM
Disk: 2x146GB SCSI
RAID: RAID 1
Bandwidth: 1500GB
Win2008 Web or Win2003 STD: Free
IP Addresses: 8
Monthly: $259.00

Detail...