Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Stored Procedure (or) SQL Script Output to Text File Expand / Collapse
Author
Message
Posted Monday, October 17, 2011 1:25 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 12:36 PM
Points: 858, Visits: 1,332
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.
Post #1191592
Posted Monday, October 17, 2011 1:27 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 12:36 PM
Points: 858, Visits: 1,332
NJ-DBA (10/17/2011)
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.


just noticed the age of this thread... saw the previous BT ? post... anyhow better late than never?
Post #1191594
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse