October 26, 2007 at 1:22 am
Hi,
How to Know if a database is a system database or a user database.
Thanks
October 26, 2007 at 1:48 am
database_id <= 4 is system db.
databse_id > 4 is user db
or... if name is
Master
Msdb
Tempdb
Model
Then its system db
October 26, 2007 at 1:51 am
The approach Management Studio is using is simply checking the name of the database like
db.name in ('master','model','msdb','tempdb')
Regards,
Andras
October 26, 2007 at 2:20 am
There are some more system databases are there as mentioned below
Reportserver - Will be created @ the time of configuring reporting services
Reportservertempdb - Will be created @ the time of configuring reporting services
distribution - Will be created @ the time of replication for storing the changes in the articles
Regards..Vidhya Sagar
SQL-Articles
October 26, 2007 at 5:37 am
In Sql 2005 system databases are under System Databases folder (i.e master,model, msdb,tempdb) User Databases are found below System Databases folder.
Regards
Buyi
October 26, 2007 at 7:20 am
Thanks to all,
Like vidhya sagar said There are some more system databases Reportserver and distribution (which also can be renamed).
so using db.name in ('master','model','msdb','tempdb') is not the efficient way, but the only one I found so far
Ahmed
October 26, 2007 at 1:33 pm
technically ReportServer and ReportServerTempDB are user databases.
sorry, forgot distribution which is also system db
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply