|
Can we create objects(tables, SPs, triggers, etc...) in the master database. If yes, in which cases can they be required and are helpful??
(comments are locked)
|
|
Yes, you can create objects in the master database, but you should not create unnecesary users objects in it. It has sense to create some custom stoerd procedures, views in the master database which are used for management and administration of the server. It is usefull for example for stored procs like sp_who2, sp_find, sp_CloneRights, which can be custom stored procedures marked as system procedures. In that case even they reside in master database, then are available for all databses and in case of proceures marked as system, they will operate in the context of current database.
(comments are locked)
|
|
Master is like any other database, you can create tables, views etc, but Master is a system database, not a user database. Except for some instance wide procedures (which Pavel mentioned), don't treat this database as a user database. It's true that some system information is stored in the resource database, but that doesn't mean the master database should be available for user applications.
(comments are locked)
|


If I am not mistaken, I believe that now the system objects are not stored in the master db but in the resource db. So does creating these objects in master make enough relevence?? Also, has anyone tried creating tables in the master db?? If yes, in what senario you came accross that requirement?? If not, can they be created and when can they be useful??