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.