Nu finns ”optimize for ad hoc workloads” även för Azure SQL Database. Konfigurationen som har…
If you get the “Property Owner is not available for Database” error message when you try to show the properties of a database (right click on a database and click the “properties” menu), you somehow lost the login that is the owner of the database. It could be the result of a database restore on another SQL server instance where the login is not created.
Run the following code to see if any owner properties of the database is missing a login
-- check to see if owner is "unknown" for any database EXEC sp_helpdb
The problem is easy to fix, copy the following code into a new query window, and press CTRL + SHIFT + M to open the template parameter dialog. Enter the databasename and the login you are going to use.
-- fix the problem, press CTRL + SHIFT + M -- and type your dbname and loginname in the dialog -- and execute the code USE <dbname, sysname,> GO EXEC sp_changedwowner '<loginname, sysname, sa>' -- check to see if owner is "unknown" for any database EXEC sp_helpdb