March 25, 2011 at 8:01 am
Are there any way I can access the the event log on a Windows server running SQL Server through t-sql?
/Andy.
March 25, 2011 at 11:37 am
Access how? Read or Write? To which event log?
You can write errors to the Application Event Log using RAISERROR:
RAISERROR('Hello World!',16,1) WITH LOG ;
You can read or write to any Event log by creating your own SQLCLR procedure or function. Here is an example of someone who has done that: http://www.sqlclr.net/Examples/tabid/55/articleType/ArticleView/articleId/14/Write-to-event-log.aspx
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
March 28, 2011 at 8:09 am
you can also use LogParser2.2 tool to view differnt log files, store the results into SQL Server tables. You can download it freely from microsoft website
HTH
RK
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply