How do I list all the databases for a given sql server 08 instance using sqlcmd?
+3
A:
EXEC sp_databases
or
SELECT NAME FROM sys.sysdatabases
or
EXEC sp_msForEachDB 'PRINT ''?''';
RedFilter
2010-01-18 17:29:31
Up voted for options but accepted Heinzi because it includes the sqlcmd aspect. Thanks!
TheDeeno
2010-01-18 17:32:36