January 8, 2008 at 9:21 pm
Hi All,
SELECT
*
FROM
sys.sysdatabases
If i run the query it will display all the database's like System as well as user database for the particular server.In this, is it possible to extract only User database's for the particular server.
Thanks in Advance. 🙂
January 8, 2008 at 9:29 pm
SELECT
*
FROM
sys.sysdatabases where version is null
January 8, 2008 at 9:40 pm
Hi vyas,
Thanks a lot for your quick reply.
In my server if i create a new database that has version say 611
along with this, system database (master,tempdb,model,msdb) has the same version.
so it is not extracting the same.
🙂
January 9, 2008 at 12:44 am
Select * from sys.databases where database_id > 4
The syztem dbs have IDs from 1 to 4, the user databases from 5 up. (The system resource db is an exception, but it's not visible in sys.databases)
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
January 9, 2008 at 10:48 pm
Thanks GilaMonster for your reply 😀
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply