I have a stored procedure, SP_HELP_REVLOGIN, that I need to run everyday and have it's output saved to a text file. Any ideas how I can automate said process?
Printable View
I have a stored procedure, SP_HELP_REVLOGIN, that I need to run everyday and have it's output saved to a text file. Any ideas how I can automate said process?
Schedule it in SQL server or any other scheduler. You can use SQLCMD with -o parameter to save it to a file.
what would the syntax look like for a stored procuder? i tried the following and received an error:
sp_help_revlogin_ICS_4AUTOMATION -o c:\foo.txt
Should be something like this and job step type is cmdexec:
sqlcmd -S sql_instance_name -E -d db_name -q 'sp_help_revlogin_ICS_4AUTOMATION' -o c:\foo.txt
THANK YOU!!! A colleague of mine has been trying to make this happen with SISS and VB for the past 3 months without success. Because of your help I got'r done in half a day. -A