Solved

error reporting in MS SQL 6.5

Posted on 1998-07-28
1
194 Views
Last Modified: 2010-03-19
Please give me a hint how to store error tracking information out of stored procedures.

I don't like message boxes, cause the administrator is not always present at the server. Also, storing stuff in the standard log events isn't useful, because other people of the team fill these also.

I'd like some kind of TXT file at a fixed place that is automatically created when not present, and text is appended when it exists.

How can such a file be accessed out of a SP ?
0
Comment
Question by:PC-Alex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
mitek earned 50 total points
ID: 1089282
I would do something like this -- it will log a short message line to a pre-defined place completely independently from other logging that's taking place ...
The only thing, the user running the sp should be granted permissions to run master..xp_cmdshell

DECLARE @fname varchar(255),@message varchar(255)

SELECT @fname = 'C:\temp\sql.log'

SELECT @message = 'echo error message text' + ' >> ' + @fname

EXEC master..xp_cmdshell @message


0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question