MODEL DATABASE OWNER | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

MODEL DATABASE OWNER

How do I change the Database owner for a MODEL database?
When I open the properties for a Model database, it shows "UNKNOWN" as the database owner, and I can’t run the command ‘sp_changedbowner ‘sa’ as it’s not allowed to run on master, model, and tempdb.
Any help?

From BOL. model
The model database is used as the template for all databases created on a system. When a CREATE DATABASE statement is issued, the first part of the database is created by copying in the contents of the model database, then the remainder of the new database is filled with empty pages. Because tempdb is created every time SQL Server is started, the model database must always exist on a SQL Server system.
You only can backup model database.
Owner should be sa, same with master. May be was a installation problem.
That give you some problem? Luis Martin
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.
True, check SQL server error log for any information about this behaviour and you cannot change the db owner for MODEL, being its a system database and should be owned by SA. If you’ve good old backup for mODEL then restore it in order to get correct owner. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Do you think that restoring it from a good old backup or even the installation cd would correct it? Let me ask you this: Can I restore one model database backed up on server A to ServerB?
Do you think its worth to restore the system database, for the sake of displaying the owner in EM. For confirmation run SP_HELPDB from query analyzer and look for the information. As long as you don’t have any performance issues or newly created databases issues then ignore it. You can restore the MODEL database between the SQL installation with similar version. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>