Query SQL log run reports

Last Updated: Sep 20, 2017


Query the SQL log run reports generated for an instance. Generally, on-the-hour queries are performed, for example, a query of the run reports in the time range between 02:00 and 03:00.

Request parameters

Name Type Required? Description
Action String Yes Required parameter. Value: DescribeSQLLogReports.
DBInstanceId String Yes Instance ID.
StartTime String Yes Query start time. Format: yyyy-MM-dd’T’HH:mm:ssZ.
EndTime String Yes Query end time, which must be later than the query start time. Format: yyyy-MM-dd’T’HH:mm:ssZ.
PageSize Integer No Number of records on every page. Values: 30, 50, and 100; default value: 30.
PageNumber Integer No Page number, which must be greater than 0, but must not exceed the maximum Integer value. Default value: 1.

Return parameters

Name Type Description
<Public Return Parameters> None For details, see Public parameters.
TotalRecordCount Integer Total number of records.
PageNumber Integer Page number.
PageRecordCount Integer Number of SQL log run reports displayed on the current page.
Items List<SQLReport> None

SQLReport parameters

Name Type Description
SQLText String SQL statement.
TotalExecutionCounts String Total execution duration.
TotalExecutionTimes String Total time consumed.
ReturnTotalRowCounts String Total number of returned rows.
TotalExecutionTimes String Total time consumed.


  • Request example

    1. https://rds.aliyuncs.com/?Action= DescribeSQLReports
    2. &DBInstanceId=riauvjz6zajfiq6ba1370329449201
    3. &StartTime=2011-06-11T15:00:00Z
    4. &EndTime=2013-06-05T15:00:00Z
    5. &<Public Request Parameters>
  • Return example

    XML format:

    1. <DescribeSQLLogReportsResponse>
    2. <RequestId>08A3B71B-FE08-4B03-974F-CC7EA6DB1828</RequestId>
    3. <TotalRecordCount>0</TotalRecordCount>
    4. <PageNumber>1</PageNumber>
    5. <PageRecordCount>30<PageRecordCount>
    6. </DescribeSQLLogReportsResponse>

    JSON format:

    1. {
    2. "PageNumber":1,
    3. "TotalRecordCount":0,
    4. "PageRecordCount":30,
    5. "RequestId": "08A3B71B-FE08-4B03-974F-CC7EA6DB1828"
    6. }
Thank you! We've received your feedback.