Reputation: 857
I'd like to retrieve the usage details for a SQL Database from Azure Service Management REST API.
Usage details is available for websites but I cannot find any REST services to get the usage details(deadlocks, failed connections etc.). As of now, I can get the basic details about the database and its properties. http://msdn.microsoft.com/en-us/library/azure/dn720371.aspx
Upvotes: 0
Views: 857
Reputation: 4465
You'll need to query the system database for this information.. check following MSDN documentation for plenty of details -
http://msdn.microsoft.com/en-us/library/dn270018(v=sql.120).aspx
sys.event_log
http://msdn.microsoft.com/en-us/library/azure/jj819229.aspx#EventTypes
Event Types (includes connection_failed
and deadlock
)
Example from the first link -
select * from sys.event_log where event_type='deadlock' and database_name='Database1'
Upvotes: 0