December 6, 2010 at 6:35 am
Hi,
how to sql engine identify the System & user databases ?
Subha
December 6, 2010 at 7:02 am
Does this help you?
http://www.sqlservercentral.com/Forums/Topic881813-338-1.aspx
Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Follow me on
Twitter: @sqltwins
December 6, 2010 at 7:08 am
Hi Nakul,
I didn't get the correct information.
plz Help me
Subha
December 6, 2010 at 7:12 am
Hello!
Did you need help in identifying system & user databases?
For example, given a database name, do you want to tell if it is a system database or a user database?
If you can provide an example, that would be of great help.
Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Follow me on
Twitter: @sqltwins
December 6, 2010 at 7:24 am
Not sure what you're asking. Please clarify.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 6, 2010 at 7:32 am
Why do you care? What are you trying to do? If Paul White's script here doesn't do the job, what is that you're looking for?
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 6, 2010 at 7:37 am
Hi Guys,
not my side identifying databases.
sql server Engine how to identify the databases ?
iam asking sql engine will consider any sid ?
Subha
December 6, 2010 at 7:39 am
The system databases are:
master, model, msdb, tempdb, ReportServer, ReportServerDB
You can identify them with an IN clause
...WHERE name not in ('master', 'model', 'msdb', 'tempdb', 'ReportServer', 'ReportServerDB')
December 6, 2010 at 7:50 am
subha.mcts2005 (12/6/2010)
Hi Guys,not my side identifying databases.
sql server Engine how to identify the databases ?
iam asking sql engine will consider any sid ?
Like you query sys.databases to find database information, even the engine will refer to sys.databases to get the database names and any database which has database_id <=4 is considered a System Database.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
December 6, 2010 at 8:14 am
I guess I'm still confused as to what you're going for, but sQL Server knows which databases it uses to maintain itself. It works with them and there's very little you need to do beyond maintain backups of master & MSDB (model too, if you modify it).
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 6, 2010 at 8:19 am
Steve Jones - SSC Editor (12/6/2010)
The system databases are:master, model, msdb, tempdb, ReportServer, ReportServerDB
You can identify them with an IN clause
...WHERE name not in ('master', 'model', 'msdb', 'tempdb', 'ReportServer', 'ReportServerDB')
The problem is if you have SSRS installed, the Report Server/ReportServerDB will be larger than 4.
December 6, 2010 at 9:24 am
Steve Jones - SSC Editor (12/6/2010)
The system databases are:master, model, msdb, tempdb, ReportServer, ReportServerDB
You can identify them with an IN clause
...WHERE name not in ('master', 'model', 'msdb', 'tempdb', 'ReportServer', 'ReportServerDB')
As far as I know, the two reportserver databases are user databases. They don't appear in the system database folder. If you argue those are system, then distribution must be classified system too.
There's also the hidden database - systemresource. Also system.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 6, 2010 at 9:25 am
subha.mcts2005 (12/6/2010)
sql server Engine how to identify the databases ?iam asking sql engine will consider any sid ?
Why is this important to you? What's the reasoning behind this question?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply