' List all the Databases on a SQL Server
' SQL Server 2000 : Yes
strDBServerName = "."
Set objSQLServer = CreateObject("SQLDMO.SQLServer")
objSQLServer.LoginSecure = True
objSQLServer.Connect strDBServerName
Set colDatabases = objSQLServer.Databases
For Each objDatabase In colDatabases
WScript.Echo objDatabase.Name
Next