You are here: Home > Technical Articles > MS SQL Server - Principal "username" is not able to access the database "db" under the current security context
Error:
The server principal "username" is not able to access the database "dbname" under the current security context.
.Net SqlClient Data Provider in SQL Server Management Studio.
Reason:
This is because the MS SQL Server is attempting to execute a T-SQL query to retrieve a list of databases along with additional information about those databases. One of those pieces of information is "Collation", which you will not have permission to action for all databases as you're in a shared hosting environment and you only have access to your database alone.
Solution:
Step 1: In Object Explorer, click Databases
Step 2: Display Object Explorer Details (F7) or View > Object Explorer Details
Step 3: Right click the column headers and de-select "Collation"
Step 4: Refresh Databases.
Published On: 04 Jul 2009
MS SQL Server - Principal "username" is not able to access the database "db" under the current security context.
Error:
The server principal "username" is not able to access the database "dbname" under the current security context.
.Net SqlClient Data Provider in SQL Server Management Studio.
Reason:
This is because the MS SQL Server is attempting to execute a T-SQL query to retrieve a list of databases along with additional information about those databases. One of those pieces of information is "Collation", which you will not have permission to action for all databases as you're in a shared hosting environment and you only have access to your database alone.
Solution:
Step 1: In Object Explorer, click Databases
Step 2: Display Object Explorer Details (F7) or View > Object Explorer Details
Step 3: Right click the column headers and de-select "Collation"
Step 4: Refresh Databases.
Published On: 04 Jul 2009

