Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner
2009-08-18 16:19
627 查看
After restoring DB in SQL Server 2005 db most of the time I get the following error:
Database diagram 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 diagram support objects.
Solution This was not new to me and I always used to take the following steps to solve it: 1. Right Click on your database, choose properties 2. Goto the Options Page 3. In the Dropdown at right labeled "Compatibility Level" choose "SQL Server 2005(90)" 4. Goto the Files Page 5. Enter "sa" in the owner textbox. 6. Hit OK But for some reason today the above steps did not work.... After googling for a while I quickly found the following suggestion which worked just fine for me.... EXEC sp_dbcmptlevel 'yourDB', '90'; go ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin" go use [yourDB] go EXECUTE AS USER = N'dbo' REVERT go
相关文章推荐
- Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner
- SQL 2005 建立数据库图表时出现以下错误Database diagram support objects cannot be installed because this database does not have a valid owner 解决
- Database diagram support objects cannot be installed because this database does not have a valid owner.
- Database diagram support objects cannot be installed because this database does not have a valid own
- Cannot execute as the database principal because the principal "guest" does not exist, this type of principal cannot be impersonated, or you do not have permission.
- SQL Server 对等复制配置失败后无法删除重建,报错:Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be im
- The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the ser
- this database does not have a valid owner 的解决办法--【叶子】
- The service cannot be activated because it does not support ASP.NET compatibility
- Web Service调用Nhibernate数据访问异常:xx cannot be serialized because it does not have a parameterless constructor
- Web Service调用Nhibernate数据访问异常:xx cannot be serialized because it does not have a parameterless constructor
- Online Music Store: EF 4 Code Only方式出错"Model compatibility cannot be checked because the database does not contain"
- SQL恢复备份遇到错误 - his differential backup cannot be restored because the database has not been restored
- TFS2010提示:TF204017 The operation cannot be completed because the user does not have one or more required permissions (Use) for workspace
- The service cannot be activated because it does not support ASP.NET compatibility
- The disk cannot be added to Cluster Shared Volumes because it does not have any suitable partitions
- The service cannot be activated because it does not support ASP.NET compatibility
- 解决Entity Framework Code First 的问题——Model compatibility cannot be checked because the database does not contain model metadata
- Model compatibility cannot be checked because the database does not contain model metadata. Ensure that IncludeMetadataConvention has been added to the DbModelBuilder conventions
- Web Service调用Nhibernate数据访问异常:xx cannot be serialized because it does not have a parameterless constructor