How can I cycle sqlagent.out file?

  • Dear friends,

    My SQLAGENT.OUT fie is growing fast , and all I can do is restarting sqlagent to change the file.

    I want to create a job to cycle sqlagent.out file. what can I do?

    -- I know I can use sp_cycle_agent_errorlog in upper versions, Help me on sqlserver2000.

    Best Regards,
    Ashkan

  • You can make use of sp_cycle_agent_errorlog in SQL Server 2005 and above.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Dear Pradeep,

    I know How to use sp_cycle_agent_errorlog in sqlserver2005 or 2008.

    My problem is "there is no sp_cycle_agent_errorlog in sqlserver 2000".

    So I have asked this question, also I have post it in SQL Server 7,2000 subcategory.

    So Please help me in SQLServer2000.

    I really Need to know What should I do.

    I mean I can't restart my sqlAgent every day...

    Best Regards,
    Ashkan

  • Ashkan,

    Sorry I did not notice the forum under which this question was posted. In SQL Server 2000, this stored procedure does not exist and the only way to recycle the SQL Server Agent Error Log is to recycle the service.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Dear Pradeep,

    ...so there is no way to restart it by jobs?

    Probably because SQL Agent can't restart it self.

    Am I right?

    Best Regards,
    Ashkan

  • The easiest alternative would be to schedule a Windows Scheduled Task to run a batch file which does

    NET STOP SQLSERVERAGENT

    NET START SQLSERVERAGENT

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply