Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003

    Question Unanswered: output stored proc to text file

    Currently we use OSQL to execute some sp's overnight - the results get written to a text file.

    I want to move these into SQL scheduled tasks to centralise management but when I run the sp's, I don't get any results in my log file.

    Is there a way I can schedule OSQL commands from within SQL server or do I have to use NT scheduled tasks? I am using SQL 7


  2. #2
    Join Date
    Feb 2002
    Houston, TX
    you can use master.dbo.xp_cmdshell to execute OSQL.EXE, however I would take a little time to modify the code and have it write to an internal log file.
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts