เมื่อเกิด error Ms Sql 2008 >>The server principal "username" is not able to access the database "databasename" under the current security context. (Microsoft SQL Server, Error: 916)


The server principal “username” is not able to access the database “databasename” under the current security context. (Microsoft SQL Server, Error: 916)

image

Anyway, after an hour, I decided that I would try and access my database within Microsoft Visual Studio 2008, using the “Server Explorer”. I set myself up with a connection to the database server, and hooray, I could connect and access everything. That left me wondering why it wasn’t working in the Management Studio, so I spent some more time trawling the net for an answer (since I’m hardly a SQL Server guru!). I eventually found something to help me out…

When I clicked on the “Databases” node within SQL Server Management Studio, the software would (in the background) execute an 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 I didn’t have permission to do for every database, only my own.

Fix:

  1. In Object Explorer, click Databases
  2. Display “Object Explorer Details” (F7) or “View –> Object Explorer Details”
  3. Right click the column headers and deselect “collation”
  4. Refresh Databases, and hopefully bingo!
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

ใช้งาน asp.net แล้วหน้าเว็ป error ว่า add assembly="MySql.Data, Version=5.1.6.0, Culture=neutral แก้ยังไง

ถ้าใช้งาน asp.net แล้ว error เกี่ยวกับ mysql.data แสดงว่าตัว code มีการติดต่อกับ mysql...

วิธีการ backup file และ database

วิธีการ backup file และ database << < การ back up file web  >>>...

หน้าเวปตัวหนังสือเป็น ??? ทั้งที่ใน phpmyadmin เป็นภาษาไทย

ให้ใส่ code เพิ่มไปตามนี้ ใต้ mysql_connect   ในกรณีที่ charset เป็น tis-620...

การเปลี่ยน collation MySQL

1. เมื่อเข้ามาที่ Database จะพบกับเจ้าตัวปัญหา ที่ว่านี้ คือเราแก้ Collation ของ table...

ไชโย โฮสติ้ง มี Database ให้ใช้หรือไม่

มี Database ให้ใช้ท่านสามารถเลือกใช้ได้ดังนี้ Database สำหรับ Server Windows - MS SQL - MySQL -...