HOWTO: Obtain SQL Database ID

Run from Query Analyzer:

USE master
SELECT name, DB_ID(name) AS DB_ID
FROM sysdatabases
ORDER BY name

Add Feedback