Hi.
my name is srikar.......and my query is

How to differentiate system databases and user created databases in sql server 2005??????????????

Hi.
my name is srikar.......and my query is

How to differentiate system databases and user created databases in sql server 2005??????????????

its pretty simple,
But I color coded it for you

Red is System
and
Purple is for User

Attachments Screenshot-1.png 103.82 KB

I need a query to get only user created databases ..............................

i think it is easy to find out user created databases as they are four in numbers namely model, master, Tempdb, msdb and Distribution database in created while sql server instance is configured as a distribution for replication. and i think there is no such query for aforesaid question

Edited 6 Years Ago by mith_cool: n/a

adatapost's code will give you all the databases

I noticed that collation_name value is null for user databases. This may help you.

Select * From SYS.Databases where collation_name is Null

adatapost's code will give you all the databases

I noticed that collation_name value is null for user databases. This may help you.

Select * From SYS.Databases where collation_name is Null

Its not working ............................

its not working ............................

i t s not working..................................................

is this working?

Select * From SYS.Databases

if it is then see where there is something usable in the fields.

SELECT * FROM INFORMATION_SCHEMA.Tables WHERE Table_Catalog = 'myDatabase'

i googled your query and came up with this solution. Sorry couldn't verify it cause i do not have access to a database at this moment

is this working?

Select * From SYS.Databases

if it is then see where there is something usable in the fields.

No.......
already i tried this..............no useful...........

No.......
already i tried this..............no useful...........

Ok hmm, the problem is your pc then.

Can you take a screenshot of your PC where your entering this code?

and if you haven't tried the code in SQL Server Management Studio Express try it there and post a screenshot form there as well

is this working?

Select * From SYS.Databases

if it is then see where there is something usable in the fields.

its not working............already i tried................

First read my question................ i am not asking tables................

i know this query................i dont wnt to compare with system databases.........

i want a ""QUERY"" to identify system databases in sqlserver 2005

to do what?

just i wnt know is there any query exists or not.............

if i wnt know abt user creatd databases in my server i must know abt system created databases............wat is this logic!!!!!!!!???????

>just i wnt know is there any query exists or not.............

Yes. There are number of ways and some of them are posted here. For more information google please. You can also get the list of databases by its owner type. (System database are created by 'sa' user)

This article has been dead for over six months. Start a new discussion instead.