SQLSERVER attribute OWNER cannot be used in database xxx. This object may not have this attribute or cannot be retrieved due to insufficient access permissions. _ MySQL

Source: Internet
Author: User
Today, I encountered a case where the following error message is displayed when I right-click a database attribute: The property Owner cannot be used in database xxx. this object may not have this attribute or cannot be retrieved due to insufficient access permissions. When you use a script to view the database Owner, it is found that the Owner is null. The following error message is displayed when you right-click a database attribute:

The property Owner cannot be used in the database xxx. this object may not have this property or cannot be retrieved due to insufficient access permissions.

When you use a script to view the database Owner, it is found that the Owner is null. The specific cause is that the Owner of the database is a system administrator account. as the employee leaves the company, the system administrator who took over the account has cleared the account, so the above error occurs. in this case, use the following script to query and you will find that the Owner is null.

SELECT d. name, owner_sid, l. nameFROM sys. databases dLEFT JOIN sys. syslogins l ON l. sid = d. owner_sidWHERE d. name = 'databasename ';

You only need to change the database Owner to the account of sa or other sysadmin roles.

USE DataBaseName; go exec sp_changedbowner 'sa '; GO

The preceding SQL SERVER attribute OWNER cannot be used for database xxx. This object may not have this attribute or cannot be retrieved due to insufficient access permissions. _ MySQL content. For more information, see The PHP Chinese website (www.php1.cn )!

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.