By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,915 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,915 IT Pros & Developers. It's quick & easy.

Redirect results of executed statements to particular file

P: 7

I have to search some tablename in all of existing SPs.
I want to have content of all SPs in a particular text file .
Plz tell can I transfer the result of all executed statements to a particular specified file....

as i am using sql client
and using.................

exec sp_helptext <SP name1>
exec sp_helptext <SP name2>
exec sp_helptext <SP namen>

and want to have result in one particular text file.
or you can say , i want to redirect result to some specific file.........

Thanx in Adv.
Sep 21 '06 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 759
Go to Command Prompt and type,

osql /U sa /P password /d pubs /S ServerName /Q "sp_help" -o ofile.txt
Sep 21 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.