Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Logging errors in SQL Log throu sp

Author  Topic 

Shumaila
Starting Member

21 Posts

Posted - 2001-10-24 : 12:31:18
Hi,
I am using a stored procedure which is performing certain 'monthly' updates on database. I have to record all the errors that occur during every pass. For that i am using Extended Store procedure xp_logevent which stores the entry in SQL Server log as well as in NT Log event viewer. (I can't use errorraise() because it return error to client and i don't have any client/front end here to handle the error).
Now when i use

use master
xp_logevent 50001, 'Error message', ERROR

it runs and log entry is viewable on NT Event Viewer but when i use my database

use MyDatabase
xp_logevent 50001, 'Error message', ERROR

it gives error
Could not find stored procedure 'xp_logevent'.

I dont' know what is wrong and what should i do.



   

- Advertisement -