Home Forums SQL Server 2008 SQL Server 2008 - General Stored Procedure (or) SQL Script Output to Text File RE: Stored Procedure (or) SQL Script Output to Text File
NJ-DBA
SSChampion
Points: 13834
More actions
October 17, 2011 at 1:25 pm
#1395552
you could create a OS command job stem andcall sqlcmd from the OS with the header option set like so:
sqlcmd -h-1 -i "D:\scriptdir\script.sql" -o "D:\outputdir\outputtext.out"
fairly sure that'll give you what you're looking for.