This database does not have a valid owner solution-[Leaf]

Source: Internet
Author: User

Note: Someone else gave me a database backup file. After I restored it locally, I planned to create a database digoal. the following error occurs:


Error message:

Database digoal support objects cannot be installed because this database does not have a valid owner.

To continue, first use the files page of the database Properties dialog box or the alter authorization statement to set the database owner to a valid login, then add the database digoal
Support objects.


According to the error message, a valid owner is missing.

Add owner:

alter authorization on database ::databasename to sa


After successful addition, it still does not work.


I found some related content online:

Http://social.microsoft.com/Forums/zh-CN/sqlserverzhchs/thread/f53de20b-7a72-4d78-917c-664b5b2beb8f

According to the post prompts, the text box for viewing properties --> files --> owner contains content.



Later I found it was a compatibility issue, and it was okay to match the corresponding version.

Procedure:

1. Right-click the database, select properties, and click options.

2. Select the corresponding database version in the compatibility level.


For example, if you restore the SQL Server 2005 backup file, select 2005. If you restore the SQL Server 2000 backup file, select 2000.



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.