Skip to content

How to list all databases on a SQL Server

Aside from BMC Remedy, another product that I’ve recently had to learn more about is Microsoft SQL Server. From writing my first stored procedure, to a function, to jobs and alerts. One of the tidbits I came across is a way to list all databases on SQL server. To do this,  try:

Select * From sysdatabases


Exec sp_helpdb