Non-system databases in SQL Server 2000

How to get the names of all Nonsystem databases from SQL Server 2000 using TSQL query?

I expected:

SELECT * 
FROM sysdatabases
where dbid >4
order by dbid

he does not seem reliable.

Anything else?

+3
source share
1 answer

From SQL Server 2000 Books Online :

Each instance of SQL Server has four system databases (master, model, tempdb and msdb) and one or more user databases.

So master, model, msdb and temp are all system databases. Your request can safely exclude only these.

+3
source

Source: https://habr.com/ru/post/1718634/


All Articles