Avatar of migav
migavFlag for Portugal

asked on 

Force sql serve to write to eventlog


The list of all SQL Server errors:

SELECT * FROM sysmessages where msglangid = 1033

I want to force SQL Server to write all errors with a servery higher than X to the operating system event viewer because it's the only way I have to capture sql server errors with my office monitoring tool.

How to do it ?
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
migav
Avatar of lcohan
lcohan
Flag of Canada image

You could set a  New SQL Alert under SQL Agent in SSMS that can do that for you.
Avatar of migav
migav
Flag of Portugal image

ASKER

Help, I don't find how to write to event viwer ..
ASKER CERTIFIED SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Perhaps I am being dense but if you want to write to the Event Log, have you considered something like this:
RAISERROR ('Houston we have a problem!', 10, 1) WITH LOG
SOLUTION
Avatar of AlokJain0412
AlokJain0412
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of migav
migav
Flag of Portugal image

ASKER

Thanks !
Microsoft SQL Server 2008
Microsoft SQL Server 2008

Microsoft SQL Server 2008 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. Major improvements include the Always On technologies and support for unstructured data types.

50K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo