Azure SQL Database – Error Logs?

Ok, so Azure SQL doesn’t really have its own error log based somewhere on a machine within \\MSSQL\Log directory but the closest thing you will get is a system catalog view called sys.event_log which is very useful. It will get you information about all sort of event types such as:

  • Successful connections
  • Failed connections
  • Throttling issues
  • Blocked by firewall attempts
  • Connection termination

I used this code against the master database.


SELECT database_name,start_time,end_time,event_type, severity =
CASE Severity
WHEN 0 THEN 'Informational'
WHEN 1 THEN 'WARNING'
WHEN 2 THEN 'ERROR'
ELSE 'No Data Avaliable'
END,
description
FROM sys.event_log

ORDER BY start_time DESC

So here I was just looking for errors relating to login failures.

errorlogs

 

1 thought on “Azure SQL Database – Error Logs?

  1. Pingback: Dew Drop – April 8, 2020 (#3171) | Morning Dew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s