locked
Sql database - Event logs details RRS feed

  • Question

  • Hi ,

    I am having SQL database in azure subscription. I want to collect the information of Failed connection, Deadlocks, Successful connections and Throttled connections etc (which is showing in monitor page of Azure Database server). For this i am hitting the below mentioned URL.

    https://msdn.microsoft.com/en-us/library/azure/dn505710.aspx

    In this url they specified about startDate and intervalSizeInMinutes. So i used the query like the below

    https://management.core.windows.net/{subscriptionId}/services/sqlservers/servers/{serverName}/databases/{databaseName}/events?startDate={startDate}&intervalSizeInMinutes={intervalSizeInMinutes}&eventTypes=

    Replace:

    startDate = CurrentTime in UTC - (5 min) - Actually the current time is 10 means i set the startDate as 9.55
    intervalSizeInMinutes = 5

    Cases:

    1) We are not able to collect any datas for the above query
    2) We have increased the startDate like 5 min we can get the data of previous 20 min. 

    startDate = CurrentTime in UTC - (20 min) the current time is 10 means i set the startDate as 9.40


    1) What is the use of startDate and intervalSizeInMinutes in above URL.

    2) How can we collec last 5 min datas? Some of monitor graph is not plotted for 5 min interval(Refer the attached image). I have mentioned it in red box.

    Please give me solution how can we proceed further?


    rathidevi


    Monday, July 6, 2015 7:21 AM

Answers

  • You can use the metrics API using the following URI:

    https://management.core.windows.net/{subId}/services/sqlservers/servers/{server name}/databases/{DB name}/metrics?api-version=2011-12-01&Names={names}&StartTime=2015-07-07T19:55:00Z&EndTime=2015-07-07T20:55:04Z&TimeGrain=PT15S

    Where names can be a CSV with the following values:

    • cpu_percent
    • physical_data_read_percent
    • log_write_percent
    • dtu_consumption_percent
    • storage
    • connection_successful
    • connection_failed
    • blocked_by_firewall
    • deadlock

    Since it takes some time to update metrics cache (order of 200 sec, but can be longer), a delay in getting the data is possible.

    Tuesday, July 7, 2015 9:23 PM

All replies

  • Hi,

    I am trying to involve someone familiar with the topic to look into this. Will post a reply soon.

    Your patience is appreciated.

    Regards,

    Sadiqh

    Tuesday, July 7, 2015 7:05 AM
  • You can use the metrics API using the following URI:

    https://management.core.windows.net/{subId}/services/sqlservers/servers/{server name}/databases/{DB name}/metrics?api-version=2011-12-01&Names={names}&StartTime=2015-07-07T19:55:00Z&EndTime=2015-07-07T20:55:04Z&TimeGrain=PT15S

    Where names can be a CSV with the following values:

    • cpu_percent
    • physical_data_read_percent
    • log_write_percent
    • dtu_consumption_percent
    • storage
    • connection_successful
    • connection_failed
    • blocked_by_firewall
    • deadlock

    Since it takes some time to update metrics cache (order of 200 sec, but can be longer), a delay in getting the data is possible.

    Tuesday, July 7, 2015 9:23 PM