Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2K5 Log file

Status
Not open for further replies.

dmando84

Programmer
Dec 28, 2005
68
US

Hello,

I wrote a stored procedure in SQL 2K5, and I would like to write to the sql log file when certain steps have succeeded. The only way I know how to do this is by using the raiseerror command, but I am not looking to exit the proc after writing to the log file.

Any help would be appreciated...


Thanks,

Dave
 
Why try to write to the built-in log file, rather than creating a user table and writing to that? It would make reporting and whatnot much more flexible.

--------------
 
The procedure xp_logevent will allow you to write to the ERRORLOG.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top