Like somuch.com on Facebook Share somuch.com on Facebook somuch.com on Twitter Reddit LinkedIn Pinterest
Newest Tips & Tricks...

Home :: Tips & Tricks :: Microsoft SQL Server

How to export results of a stored procedure to a txt file

Run this in the DOS command line (arguments are case sensitive)

osql /U sa /P password /d pubs /S Server9 /Q "sp_help" -o ofile.txt

Source: http://weblogs.sqlteam.com/mladenp/archive/2005/08/01/7421.aspx

Recommended Links...