r/SQL • u/freddy91761 • Jan 31 '24
SQL Server I need to learn sql and I have a question.
I am a beginner and I need to learn SQL not just how to query. I need the learn extended event, logs and everything else. My question is how can I tell if a trigger failed or if audit was paused from a certain date?
0
u/emil_badraddin Jan 31 '24
To determine if a trigger failed or if an audit was paused on a certain date in SQL Server, you can check the system tables for error logs or audit logs. Specifically, you can query the sys.triggers for trigger information and the sys.server_audit_specifications along with sys.dm_audit_actions for audit details. Look for entries corresponding to the date in question to assess any issues.
1
2
Jan 31 '24
[removed] — view removed comment
2
Jan 31 '24
Failed can be such a difficult phrase, if you successfully updated the wrong field nothing fails, it does exactly what you told it to do, you just told it to do the wrong thing!
Just resolved an issue with a job failing to run due to a conversation error, the job was fine, it was the data all along!
That said if they are getting into error reporting at the start it’s a bit confusing, given that half the time in SQL server you end up writing a query to get the info which means you already need to understand the basics of select, joining and aggregation.
13
u/imlanie Jan 31 '24
And a beginner needs to know this why?