October 12, 2001 at 9:10 am
Using a scheduled process I want to capture the output of sp_helpdevice (for SQL 6.5), sp_helpdb, and sp_helplogins to a text file.
How can I do this?
Bill
October 12, 2001 at 11:16 am
One way would be to capture the results in a table, then BCP/DTS it out.
Andy
October 12, 2001 at 11:32 am
or you can use
xp_cmdshell 'osql -Sservername -E "sp_helpdb" > test.txt'
etc.
Steve Jones
October 12, 2001 at 11:37 am
Show off! That is a simpler solution.
Andy
October 12, 2001 at 12:17 pm
But won't you require osql.exe into path... that seems to be a server side setting ... isn't it?
quote:
or you can usexp_cmdshell 'osql -Sservername -E "sp_helpdb" > test.txt'
etc.
Steve Jones
Paras Shah
Evision Technologies
Mumbai, India
Edited by - paras_98 on 10/12/2001 12:19:31 PM
Paras Shah
Evision Technologies
Mumbai, India
October 12, 2001 at 1:17 pm
Yes, its either got to be in the path or you must explicitly provide the path. It's executing on the server.
Andy
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy