Write Error Logs to a Text File

  • Hi SQL Guru's,

    We have a production SQL 2000 server (SP4) and we are reluctant to install anything that may interfere with the accounting software. Also, I don't want to be the one to bring down the server with the firm's accounting data and end up without a job.

    I'm hoping that there's a T-Sql statement that I can place in a job that will take an error (in this case a failed backup) and write it to a simple text file. This would be the same error information that is written to the Application event log.

    It sounds like I'm looking to notify users of an error, and wouldn't using SQLmail be better and easier? Without a doubt, but I'm trying to avoid installing Outlook for fear of overwriting a file and causing a problem with the accounting software. This is running on old hardware and we just want a no impact solution until the hardware and software is upgraded.

    I've searched the Internet, but have had no luck so far. I'll continue to search, because I've come close to an answer, but I'm hoping someone here will show me the code.

    Best Regards,

    -TJ

  • Jonathan Kehayias has some good information here

    How to Automate Common DBA Tasks

    Specifically look at

    Configuring SQL Server 2000 Notification with CDOSys and Monitor the SQL Server Error Log

    I have personally used XPSMTP.DLL to send email on SQL 2000 servers without installing outlook.

    http://www.sqldev.net/xp/xpsmtp.htm

  • Hey Ken,

    Thanks for the quick reply to my post. I will definitely be digging into this new information.

    Best Regards,

    -TJ

Viewing 3 posts - 1 through 2 (of 2 total)

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