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.
Pingback: Dew Drop – April 8, 2020 (#3171) | Morning Dew
Pingback: Https azure log analytics login failures sql databases Portal Guide Instructions Help - centtip.com
Not working: ” Failed to execute query. Error: Invalid object name ‘sys.event_log’ “
LikeLike
Run the query in master database and not in user databases
LikeLike