The SELECT permission for object ' * * * * * * * * * * * * * *, owner ' * * * was rejected. __ Database

Source: Internet
Author: User

Error:

System.Data.SqlClient.SqlException: SELECT permission for object ' Dentists ' (Database ' dentists ', owner ' dbo ') was denied.
At System.Data.SqlClient.SqlCommand.ExecuteReader (CommandBehavior cmdbehavior, Runbehavior Runbehavior, Boolean Returnstream)
At System.Data.SqlClient.SqlCommand.ExecuteReader (CommandBehavior behavior)
At System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader (CommandBehavior behavior)


Solution:

In the database in the appropriate user rights, the Db_denydatareader check box to remove the tick.

Many beginners always think that the more permissions are selected in the database, the greater the privileges. In fact, this is wrong.

Db_denydatareader is denying access to query data. Similarly, Db_denydatawrite is refusing to perform a DML operation.

--------------------
Resolution 1. Delete the asp.net user in the engraved database

Solved 2.

Select permission denied for object ' users ' (database ' People ', schema ' dbo ')
Issue: Remote login is not allowed under SQL Server 2005 default settings
1 Peripheral settings TCP/IP and named pipe enabled simultaneously
2 Server--〉 Properties--〉 Security--〉sql Server and Windows Authentication mode
Issue: SELECT permission for object ' xxx ' (database ' xxx ', schema ' dbo ') is denied.
Answer: Database (XXX)---> Security----> Schema---->dbo (properties)---> Permissions---> Add---> Browse-->public Add a Select

Issue: Remote login is not allowed under SQL Server 2005 default settings
1 Peripheral settings TCP/IP and named pipe enabled simultaneously
2 Server--〉 Properties--〉 Security--〉sql Server and Windows Authentication mode

Issue: SELECT permission for object ' xxx ' (database ' xxx ', schema ' dbo ') is denied.
Answer: Database (XXX)---> Security----> Schema---->dbo (properties)---> Permissions---> Add---> Browse-->
[public]----> has grant permission (select)

Organize and reprint Qingdao Network company: http://www.toorain.net

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.