Log4J, Log4Net are very good tools for centrally logging Exceptions in Java & MS .Net respectively.
Keeping this in mind, wondered what tools exist for centralizing Exceptions in Transact SQL.
Not aware of any. But, that got me thinking of what things I will like to make note of:
Here is a short list:
- Server Name – Serverproperty(‘servername’)
- Database ID – db_id()
- Database Name – db_name()
- Procedure ID – @@PROCID
- Procedure Name – Object_name(@@PROC_ID)
- Error Procedure – Error_Procedure()
- Error Number – Error_Number()
- Error Message – Error_Message()
- Error Line – Error_Line()
- Error Severity – Error_Severity()
- Error State – Error_State()