Home Forums SQL Server 2005 SQL Server Express SQLCMD capture output from :ServerList to a file? RE: SQLCMD capture output from :ServerList to a file?
michael nee
SSC Enthusiast
Points: 144
More actions
December 18, 2007 at 6:53 am
#760986
Hi John,
I guess by now you have found:
sqlcmd -Lc > c:\serverlist.txt
Alternatively, you can put your :serverlist in a script file and use the sqlcmd switches
-i (input file) and -o (output file)
Regards, Michael