openapi: 3.2.0 info: description: "Use the Database Management API to monitor and manage resources such as\nOracle Databases, MySQL Databases, and External Database Systems. \nFor more information, see [Database Management](/iaas/database-management/home.htm).\n" title: Database Management Sql Tuning API version: '20201101' x-provenance: method: harvested first_party: true publisher: Oracle source: https://docs.oracle.com/en-us/iaas/api/specs/e7e7138b3ad5254432bc9203d07c08e1e84e00d89a283cd6935a4ef61a6929cf.yaml harvested: '2026-08-04' note: Published by Oracle as the contract for the Database Management API OCI service and stored verbatim; API Evangelist added only this provenance block. x-evidence: - url: https://docs.oracle.com/en-us/iaas/api/specs/index.json what: Oracle's own index of every OCI service specification - url: https://docs.oracle.com/en-us/iaas/api/specs/e7e7138b3ad5254432bc9203d07c08e1e84e00d89a283cd6935a4ef61a6929cf.yaml what: the harvested document for Database Management API servers: - url: http://dbmgmt.{region}.oci.oraclecloud.com/20201101 - url: https://dbmgmt.{region}.oci.oraclecloud.com/20201101 tags: - name: sqlTuning paths: /managedDatabases/{managedDatabaseId}/actions/cloneSqlTuningTask: post: description: 'Clones and runs a SQL tuning task in the database. ' operationId: CloneSqlTuningTask parameters: - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: 'The SQL tuning task was cloned successfully in the database. The task ID generated by the database is returned. ' headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningTaskReturn' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Clone and run a SQL tuning task in the database tags: - sqlTuning x-example: "POST /managedDatabases/<managedDatabaseId>/actions/cloneSqlTuningTask\n{\n \"taskDescription\": \"task to tune top SQLs from ASH viewer\",\n \"credentialDetails\": {\n \"username\": \"string\",\n \"sqlTuningTaskCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.secret.oc1..\"\n },\n \"taskName\": \"task1234\",\n \"originalTaskId\": 1\n}\n" x-related-resource: '#/definitions/ManagedDatabase' requestBody: content: application/json: schema: $ref: '#/components/schemas/CloneSqlTuningTaskDetails' description: The detailed inputs required to clone a SQL tuning task. required: true /managedDatabases/{managedDatabaseId}/actions/dropSqlTuningTask: post: description: 'Drops a SQL tuning task and its related results from the database. ' operationId: DropSqlTuningTask parameters: - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: 'The SQL tuning task was dropped successfully from the database. No response is returned from the database. ' headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Drop a SQL tuning task from the database tags: - sqlTuning x-example: "POST /managedDatabases/<managedDatabaseId>/actions/dropSqlTuningTask\n{\n \"taskId\": 9,\n \"credentialDetails\": {\n \"username\": \"string\",\n \"sqlTuningTaskCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.secret.oc1..\"\n }\n}\n" x-related-resource: '#/definitions/ManagedDatabase' requestBody: content: application/json: schema: $ref: '#/components/schemas/DropSqlTuningTaskDetails' description: The detailed inputs required to drop a SQL tuning task. required: true /managedDatabases/{managedDatabaseId}/actions/startSqlTuningTask: post: description: 'Starts a SQL tuning task for a given set of SQL statements from the active session history top SQL statements. ' operationId: StartSqlTuningTask parameters: - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: 'The SQL tuning task has started and is running successfully in the database. The task ID generated by the database is returned. ' headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningTaskReturn' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Start a SQL tuning task in the database tags: - sqlTuning x-example: "POST /managedDatabases/<managedDatabaseId>/actions/startSqlTuningTask\n{\n \"taskDescription\": \"task to tune top SQLs from ASH viewer\",\n \"timeEnd\": \"2021-07-26T16:29:16.651Z\",\n \"timeBegin\": \"2021-07-26T17:29:16.651Z\",\n \"statementTimeLimitInMinutes\": 5,\n \"totalTimeLimitInMinutes\": 30,\n \"credentialDetails\": {\n \"username\": \"string\",\n \"sqlTuningTaskCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.secret.oc1..\"\n },\n \"sqlDetails\": [\n \"1vqnp3m7u2vxq\", \"1vqnp3m7u3vxr\"\n ],\n \"scope\": \"COMPREHENSIVE\",\n \"taskName\": \"task1234\"\n}\n" x-related-resource: '#/definitions/ManagedDatabase' requestBody: content: application/json: schema: $ref: '#/components/schemas/StartSqlTuningTaskDetails' description: The detailed inputs required to start a SQL tuning task. required: true /managedDatabases/{managedDatabaseId}/sqlTuningAdvisorTasks: get: description: 'Lists the SQL Tuning Advisor tasks for the specified Managed Database. ' operationId: ListSqlTuningAdvisorTasks parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskNameOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskStatusOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskBeginTimeOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskEndTimeOptionalQueryParam' - $ref: '#/components/parameters/PaginationTokenQueryParam' - $ref: '#/components/parameters/PaginationLimitQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskSortByQueryParam' - $ref: '#/components/parameters/SortOrderDescQueryParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/NamedCredentialIdHeader' responses: 200: description: The SQL Tuning Advisor task list was retrieved successfully. headers: opc-next-page: description: 'For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. ' schema: type: string opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningAdvisorTaskCollection' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Lists the SQL Tuning Advisor tasks. tags: - sqlTuning x-example: "GET /20201101/managedDatabases/<managedDatabaseId>/sqlTuningAdvisorTasks?timeGreaterThanOrEqualTo=2021-03-01T22:00:00.00Z&timeLessThanOrEqualTo=2021-03-04T22:00:00.00Z\nHost: dbmgmt.us-phoenix-1.oraclecloud.com\n<authorization and other headers>\n{\n \"items\": [\n {\n \"name\": \"SQL_TUNING_1624912021300\",\n \"timeCreated\": \"2021-07-23T20:35:57.699Z\",\n \"instanceId\": 1,\n \"description\": \"SQL Tuning Advisor Task description\",\n \"sqlTuningAdvisorTaskId\": 35,\n \"taskStatus\": \"COMPLETED\",\n \"timeExecutionEnd\": \"2021-07-23T21:37:00.699Z\",\n \"timeExecutionStart\": \"2021-07-23T20:36:57.699Z\",\n \"recomendationCount\": 4,\n \"sqlStatements\": 4,\n \"owner\": \"SYS\",\n \"daysToExpire\": 30\n }\n ]\n}\n" x-related-resource: '#/definitions/ManagedDatabase' /managedDatabases/{managedDatabaseId}/sqlTuningAdvisorTasks/{sqlTuningAdvisorTaskId}/executionPlanStatsComparision: get: description: 'Retrieves a comparison of the existing SQL execution plan and a new plan. A SQL tuning task may suggest a new execution plan for a SQL, and this API retrieves the comparison report of the statistics of the two plans. ' operationId: GetExecutionPlanStatsComparision parameters: - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskSqlObjectIdQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskExecutionIdQueryParam' - $ref: '#/components/parameters/NamedCredentialIdHeader' responses: 200: description: 'The comparison report of the statistics of the existing and new SQL execution plans was retrieved successfully. ' headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/ExecutionPlanStatsComparision' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Retrieve a comparison of the existing SQL execution plan and new plan. tags: - sqlTuning x-example: "GET /managedDatabases/<managedDatabaseId>/sqlTuningAdvisorTasks/<sqlTuningAdvisorTaskId>/executionPlanStatsComparision\n ?sqlObjectId=2&executionId=33\n{\n \"original\": {\n \"planType\": \"original\",\n \"planStats\": {\n \"elapsed time\": 3012,\n \"cpu time\": 2969,\n \"user io time\": 0,\n \"buffer gets\": 12,\n \"disk reads\": 0,\n \"direct writes\": 0,\n \"rows processed\": 0,\n \"fetches\": 0,\n \"executions\": 1\n },\n \"planStatus\": \"COMPLETE\"\n },\n \"modified\": {\n \"planType\": \"profile\",\n \"planStats\": {\n \"elapsed time\": 3000,\n \"cpu time\": 2000,\n \"user io time\": 0,\n \"buffer gets\": 12,\n \"disk reads\": 0,\n \"direct writes\": 0,\n \"rows processed\": 0,\n \"fetches\": 0,\n \"executions\": 1\n },\n \"planStatus\": \"COMPLETE\"\n }\n}\n" x-related-resource: '#/definitions/ManagedDatabase' /managedDatabases/{managedDatabaseId}/sqlTuningAdvisorTasks/{sqlTuningAdvisorTaskId}/findings: get: description: 'Gets an array of the details of the findings that match specific filters. ' operationId: ListSqlTuningAdvisorTaskFindings parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskBeginExecutionIdOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskEndExecutionIdOptionalQueryParam' - $ref: '#/components/parameters/SearchPeriodOptionalQueryParam' - $ref: '#/components/parameters/FindingFilterOptionalQueryParam' - $ref: '#/components/parameters/StatsHashFilterOptionalQueryParam' - $ref: '#/components/parameters/IndexHashFilterOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskFindingSortByQueryParam' - $ref: '#/components/parameters/SortOrderDescQueryParam' - $ref: '#/components/parameters/PaginationTokenQueryParam' - $ref: '#/components/parameters/PaginationLimitQueryParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/NamedCredentialIdHeader' responses: 200: description: The array of findings was retrieved successfully. headers: opc-next-page: description: 'For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. ' schema: type: string opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningAdvisorTaskFindingCollection' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Gets an array of details for the findings that match the given filters. tags: - sqlTuning x-example: "GET /20201101/managedDatabases/<managedDatabaseId>/sqlTuningAdvisorTasks/<sqlTuningAdvisorTaskId>/findings?\n searchPeriod=LAST_31DAY&findingFilter=FINDINGS\nHost: dbmgmt.us-phoenix-1.oraclecloud.com\n <authorization and other headers>\n{\n \"items\" : \n [\n {\n \"sqlTuningAdvisorTaskId\": 105,\n \"sqlTuningAdvisorTaskObjectId\": 9,\n \"sqlText\": \"SELECT D.TARGET_GUID, M.MARKER_TIMESTAMP...\",\n \"parsingSchema\": \"SYSMAN\"\n \"sqlKey\": \"examplef40h4hn\" \n \"dbTimeBenefit\": 0.90,\n \"perExecutionPercentage\": 45,\n \"isStatsFindingPresent\": true,\n \"isSqlProfileFindingPresent\": true,\n \"isIndexFindingPresent\": true,\n \"isRestructureSqlFindingPresent\": true,\n \"isAlternativePlanFindingPresent\": false,\n \"isMiscellaneuousFindingPresent\": false,\n \"isErrorFindingPresent\": false,\n \"isTimeoutFindingPresent\": false,\n }\n ]\n}\n" x-related-resource: '#/definitions/ManagedDatabase' /managedDatabases/{managedDatabaseId}/sqlTuningAdvisorTasks/{sqlTuningAdvisorTaskId}/recommendations: get: description: 'Gets the findings and possible actions for a given object in a SQL tuning task. The task ID and object ID are used to retrieve the findings and recommendations. ' operationId: ListSqlTuningAdvisorTaskRecommendations parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskSqlObjectIdQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskExecutionIdQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskRecommendationSortByQueryParam' - $ref: '#/components/parameters/SortOrderDescQueryParam' - $ref: '#/components/parameters/PaginationTokenQueryParam' - $ref: '#/components/parameters/PaginationLimitQueryParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/NamedCredentialIdHeader' responses: 200: description: The array of recommendations was retrieved successfully. headers: opc-next-page: description: 'For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. ' schema: type: string opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningAdvisorTaskRecommendationCollection' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Gets the findings and possible actions for a given object in a SQL tuning task. tags: - sqlTuning x-example: "GET /20201101/managedDatabases/<managedDatabaseId>/sqlTuningAdvisorTasks/<sqlTuningAdvisorTaskId>/recommendations?\n sqlObjectId=9\nHost: dbmgmt.us-phoenix-1.oraclecloud.com\n <authorization and other headers>\n{\n \"items\" : \n [\n {\n \"sqlTuningAdvisorTaskId\": 105,\n \"sqlTuningAdvisorTaskObjectId\": 9,\n \"recommendationKey\": 27,\n \"recommendationType\": ACCEPT_SQL_PROFILE,\n \"finding\": \"Optimizer statistics for table 'SYSMAN'.'TABLE' and its indices are stale\",\n \"recommendation\": \"Consider collecting optimizer statistics for this table and its indices.\",\n \"rationale\": \"The optimizer requires up-to-date statistics for the table and its indices in order to select a good execution plan.\",\n \"benefit\": 90.39,\n \"implementActionSql\": \"BEGIN dbms_sqltune.accept_sql_profile(task_name => 'sqlTask', object_id => 9, task_owner => 'user', force_match => TRUE, profile_type=>dbms_sqltune.PX_PROFILE); END;\"\n \"isParallelExecution\": false,\n },\n ...\n ]\n}\n" x-related-resource: '#/definitions/ManagedDatabase' /managedDatabases/{managedDatabaseId}/sqlTuningAdvisorTasks/{sqlTuningAdvisorTaskId}/sqlExecutionPlan: get: description: 'Retrieves a SQL execution plan for the SQL being tuned. ' operationId: GetSqlExecutionPlan parameters: - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskSqlObjectIdQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskPlanAttributeQueryParam' - $ref: '#/components/parameters/NamedCredentialIdHeader' responses: 200: description: 'The SQL execution plan for the SQL being tuned was retrieved successfully. No response is returned from the database. ' headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningAdvisorTaskSqlExecutionPlan' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Retrieve a SQL execution plan for a SQL being tuned. tags: - sqlTuning x-example: "GET /managedDatabases/<managedDatabaseId>/sqlTuningAdvisorTasks/<sqlTuningAdvisorTaskId>/sqlExecutionPlan\n ?sqlObjectId=2&attribute=original\n{\n \"plan\":\n [\n {\n \"accessPredicates\": \"string\",\n \"filterPredicates\": \"string\",\n \"stepId\": 0,\n \"optimizer\": \"string\",\n \"objectName\": \"string\",\n \"attribute\": \"string\",\n \"parentId\": 1,\n \"partitionStart\": \"string\",\n \"planHashValue\": 0,\n \"cpuCost\": 0,\n \"cost\": 0,\n \"position\": 0,\n \"remarks\": \"string\",\n \"tempSpace\": 0,\n \"operation\": \"string\",\n \"cardinality\": 0,\n \"partitionId\": 0,\n \"objectType\": \"string\",\n \"objectInstance\": 0,\n \"searchColumn\": 0,\n \"otherTag\": \"string\",\n \"objectNode\": \"string\",\n \"bytes\": 0,\n \"options\": \"string\",\n \"other\": 0,\n \"time\": 0,\n \"partitionStop\": \"string\",\n \"objectOwner\": \"string\",\n \"ioCost\": 0\n },\n {\n \"accessPredicates\": \"string\",\n \"filterPredicates\": \"string\",\n \"stepId\": 1,\n \"optimizer\": \"string\",\n \"objectName\": \"string\",\n \"attribute\": \"string\",\n \"parentId\": 2,\n \"partitionStart\": \"string\",\n \"planHashValue\": 0,\n \"cpuCost\": 0,\n \"cost\": 0,\n \"position\": 0,\n \"remarks\": \"string\",\n \"tempSpace\": 0,\n \"operation\": \"string\",\n \"cardinality\": 0,\n \"partitionId\": 0,\n \"objectType\": \"string\",\n \"objectInstance\": 0,\n \"searchColumn\": 0,\n \"otherTag\": \"string\",\n \"objectNode\": \"string\",\n \"bytes\": 0,\n \"options\": \"string\",\n \"other\": 0,\n \"time\": 0,\n \"partitionStop\": \"string\",\n \"objectOwner\": \"string\",\n \"ioCost\": 0\n }\n ]\n}\n#TODO, update the sample witl return from db\n" x-related-resource: '#/definitions/ManagedDatabase' /managedDatabases/{managedDatabaseId}/sqlTuningAdvisorTasks/{sqlTuningAdvisorTaskId}/summaryReport: get: description: 'Gets the summary report for the specified SQL Tuning Advisor task. ' operationId: GetSqlTuningAdvisorTaskSummaryReport parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskIdPathParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskSummaryReportSearchPeriodOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskSummaryReportBeginTimeOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskSummaryReportEndTimeOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskSummaryReportBeginExecutionIdOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningAdvisorTaskSummaryReportEndExecutionIdOptionalQueryParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/NamedCredentialIdHeader' responses: 200: description: The SQL Tuning Advisor summary report was retrieved successfully. headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningAdvisorTaskSummaryReport' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Gets the SQL Tuning Advisor summary report. tags: - sqlTuning x-example: "GET /20201101/managedDatabases/<managedDatabaseId>/sqlTuningAdvisorTasks/<sqlTuningAdvisorTaskId>/reportSummary\nHost: dbmgmt.us-phoenix-1.oraclecloud.com\n<authorization and other headers>\n{\n \"taskInfo\": {\n \"status\": \"COMPLETED\",\n \"description\": \"\",\n \"timeStarted\": \"2021-06-28T13:27:06.311Z\",\n \"runningTime\": 0,\n \"owner\": \"SYS\",\n \"timeCompleted\": \"2021-06-28T13:27:27.311Z\",\n \"id\": 35,\n \"name\": \"SQL_TUNING_1624912021300\"\n },\n \"statistics\": {\n \"statementCounts\": {\n \"totalSql\": 4,\n \"distinctSql\": 4,\n \"findingsCount\": 4,\n \"errorsCount\": 0\n },\n \"findingBenefits\": {\n \"dbTimeAfterImplemented\": 0,\n \"dbTimeBeforeRecommended\": 1566,\n \"dbTimeBeforeImplemented\": 0,\n \"dbTimeAfterRecommended\": 963\n },\n \"findingCounts\": {\n \"index\": 1,\n \"alternatePlan\": 0,\n \"statistics\": 1,\n \"restructure\": 0,\n \"implementedSqlProfile\": 0,\n \"beneficialSqlProfile\": 1\n },\n \"objectStatFindings\": [\n {\n \"objectHashValue\": 699262735,\n \"objectName\": \"ORDER_ITEMS\",\n \"objectType\": \"TABLE\",\n \"schema\": \"SALES\",\n \"problemType\": \"STALE\",\n \"referenceCount\": 1\n }\n ],\n \"indexFindings\": [\n {\n \"indexHashValue\": 1074151116,\n \"indexName\": \"IDX$$_09DA000C\",\n \"tableName\": \"CUSTOMERS\",\n \"schema\": \"SALES\",\n \"referenceCount\": 1,\n \"indexColumns\": [\"CUST_FIRST_NAME\", \"CUST_LAST_NAME\"]\n }\n ]\n }\n}\n" x-related-resource: '#/definitions/ManagedDatabase' /managedDatabases/{managedDatabaseId}/sqlTuningSets: get: description: 'Lists the SQL tuning sets for the specified Managed Database. ' operationId: ListSqlTuningSets parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningSetOwnerOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningSetNameContainsOptionalQueryParam' - $ref: '#/components/parameters/SqlTuningSetSortByQueryParam' - $ref: '#/components/parameters/SortOrderQueryParam' - $ref: '#/components/parameters/PaginationTokenQueryParam' - $ref: '#/components/parameters/PaginationLimitQueryParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/NamedCredentialIdHeader' responses: 200: description: The list of SQL tuning sets was retrieved. headers: opc-next-page: description: 'For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. ' schema: type: string opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningSetCollection' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Lists the SQL Tuning Sets. tags: - sqlTuning x-example: "GET /20201101/managedDatabases/<managedDatabaseId>/sqlTuningSets?owner=DBSNMP\nHost: dbmgmt.us-phoenix-1.oraclecloud.com\n<authorization and other headers>\n{\n \"items\": [\n {\n \"name\": \"STS_1\",\n \"owner\": \"DBSNMP\",\n \"description\": \"a test sql tuning set\",\n \"statementCounts\": 10,\n \"id\": 1234,\n \"timeCreated\": \"2023-01-04T03:24:22.000Z\",\n \"timeLastModified\": \"2023-01-04T03:24:22.000Z\",\n \"status\": \"COMPLETED\",\n \"scheduledJobName\": \"N/A\",\n \"errorMessage\": \"ORA-13768: Snapshot ID must be between 1828 and 3176.\"\n }\n ]\n}\n" x-related-resource: '#/definitions/ManagedDatabase' post: description: 'Creates an empty Sql tuning set within the Managed Database specified by managedDatabaseId. ' operationId: CreateSqlTuningSet parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/CreateSqlTuningSetDetailsBodyParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: Sql tuning set created successfully. headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningSet' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Creates an empty Sql tuning set. tags: - sqlTuning x-example: "POST /20210908/managedDatabases/<managedDatabaseId>/sqlTuningSets\nHost: dbmgmt.us-phoenix-1.oraclecloud.com\n<authorization and other headers>\n{\n \"credentialDetails\": {\n \"username\": \"TestUser\",\n \"sqlTuningSetAdminCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.secret.oc1..\"\n },\n \"name\": \"TestSqlTuningSet\",\n \"description\": \"Test Sql tuning set\",\n \"showSqlOnly\": 0\n}\n" x-obmcs-client-retries-enabled: true x-related-resource: '#/definitions/SqlTuningSet' /managedDatabases/{managedDatabaseId}/sqlTuningSets/{sqlTuningSetId}: post: description: 'Fetch the details of Sql statements in the Sql tuning set specified by name, owner and optional filter parameters. ' operationId: FetchSqlTuningSet parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningSetIdPathParam' - $ref: '#/components/parameters/FetchSqlTuningSetDetailsBodyParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: Details of SQL statements in the Sql tuning set. headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningSet' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Fetch the details of Sql statements in the Sql tuning set. tags: - sqlTuning x-example: "POST /20210908/managedDatabases/<managedDatabaseId>/sqlTuningSets/<sqlTuningSetId>\nHost: dbmgmt.us-phoenix-1.oci.oraclecloud.com\n<authorization and other headers>\n{\n \"credentialDetails\": {\n \"username\": \"system\",\n \"sqlTuningSetAdminCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.vaultsecret.oc1.phx.amaaaaaaqn2gl2iad2vezn3jdtdekeeqjmfr47afnr5whhx7nufo2huyhpfa\"\n },\n \"name\": \"my_workload\",\n \"owner\": \"SYS\",\n \"basicFilter\": \"sql_text like '%select%' and cpu_time > 100\",\n \"rankingMeasure1\": \"DISK_READS\",\n \"rankingMeasure2\": \"CPU_TIME\",\n \"rankingMeasure3\": \"ELAPSED_TIME\"\n}\n" x-obmcs-client-retries-enabled: true x-related-resource: '#/definitions/SqlTuningSet' /managedDatabases/{managedDatabaseId}/sqlTuningSets/{sqlTuningSetId}/actions/dropSqlTuningSet: post: description: 'Drops the Sql tuning set specified by sqlTuningSet within the Managed Database specified by managedDatabaseId. ' operationId: DropSqlTuningSet parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningSetIdPathParam' - $ref: '#/components/parameters/DropSqlTuningSetDetailsBodyParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: 'The operation to drop the Sql tuning set was completed successfully. ' headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningSetAdminActionStatus' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 412: $ref: '#/components/responses/412' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Drops the Sql tuning set. tags: - sqlTuning x-example: "POST /20210908/managedDatabases/<managedDatabaseId>/sqlTuningSets/<sqlTuningSet>/actions/dropSqlTuningSet\nHost: dbmgmt.us-phoenix-1.oraclecloud.com\n<authorization and other headers>\n{\n \"credentialDetails\": {\n \"username\": \"TestUser\",\n \"sqlTuningSetAdminCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.secret.oc1..\"\n },\n \"name\": \"my_workload\",\n \"owner\": \"SYS\",\n \"showSqlOnly\": 0\n}\n" x-obmcs-client-retries-enabled: true x-related-resource: '#/definitions/SqlTuningSet' /managedDatabases/{managedDatabaseId}/sqlTuningSets/{sqlTuningSetId}/actions/dropSqlsInSqlTuningSet: post: description: 'Deletes the Sqls in the specified Sql tuning set that matches the filter criteria provided in the basicFilter. If basicFilter criteria is not provided, then entire Sqls in the Sql tuning set is deleted. ' operationId: DropSqlsInSqlTuningSet parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningSetIdPathParam' - $ref: '#/components/parameters/DropSqlsInSqlTuningSetDetailsBodyParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: 'The operation to delete Sqls in the Sql tuning set was completed successfully. ' headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningSetAdminActionStatus' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Deletes the Sqls in the specified Sql tuning set. tags: - sqlTuning x-example: "POST /20210908/managedDatabases/<managedDatabaseId>/sqlTuningSets/<sqlTuningSet>/actions/deleteSqlsInSts\nHost: dbmgmt.us-phoenix-1.oraclecloud.com\n<authorization and other headers>\n{\n \"credentialDetails\": {\n \"username\": \"TestUser\",\n \"sqlTuningSetAdminCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.secret.oc1..\"\n },\n \"name\": \"my_workload\",\n \"owner\": \"SYS\",\n \"basicFilter\": \"sql_text like '%select%' and cpu_time > 100\",\n \"showSqlOnly\": 0\n}\n" x-obmcs-client-retries-enabled: true x-related-resource: '#/definitions/SqlTuningSet' /managedDatabases/{managedDatabaseId}/sqlTuningSets/{sqlTuningSetId}/actions/loadSqlTuningSet: post: description: 'Load Sql statements into the Sql tuning set specified by name and optional filter parameters within the Managed Database specified by managedDatabaseId. ' operationId: LoadSqlTuningSet parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningSetIdPathParam' - $ref: '#/components/parameters/LoadSqlTuningSetDetailsBodyParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: The scheduler job to load SQLs into Sql tuning set was created successfully. headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningSetAdminActionStatus' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Load Sql statements into a Sql tuning set. tags: - sqlTuning x-example: "POST /20210908/managedDatabases//sqlTuningSets//actions/loadSqlTuningSet\nHost: dbmgmt.us-phoenix-1.oraclecloud.com\n\n{\n \"credentialDetails\": {\n \"username\": \"TestUser\",\n \"sqlTuningSetAdminCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.secret.oc1..\"\n },\n \"name\": \"TestSqlTuningSet\",\n \"owner\": \"SYS\",\n \"basicFilter\": \"sql_text like '%select%' and cpu_time > 100\",\n \"showSqlOnly\": 0\n}\n" x-obmcs-client-retries-enabled: true x-related-resource: '#/definitions/SqlTuningSet' /managedDatabases/{managedDatabaseId}/sqlTuningSets/{sqlTuningSetId}/actions/saveAs: post: description: 'Saves the specified list of Sqls statements into another new Sql tuning set or loads into an existing Sql tuning set''. ' operationId: SaveSqlTuningSetAs parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningSetIdPathParam' - $ref: '#/components/parameters/SaveSqlTuningSetAsDetailsBodyParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: Saved Sql tuning set successfully. headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningSetAdminActionStatus' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Saves the specified list of Sqls statements into another Sql tuning set. tags: - sqlTuning x-example: "POST /20210908/managedDatabases//sqlTuningSets//actions/saveAs\nHost: dbmgmt.us-phoenix-1.oci.oraclecloud.com\n\n{\n \"credentialDetails\": {\n \"username\": \"TestUser\",\n \"sqlTuningSetAdminCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.secret.oc1..\"\n },\n \"name\": \"TestSqlTuningSet\",\n \"owner\": \"SYS\",\n \"destinationSqlTuningSetName\": \"TestSTS1\"\n \"basicFilter\": \"sql_text like '%select%' and cpu_time > 100\",\n \"showSqlOnly\": 0\n}\n" x-obmcs-client-retries-enabled: true x-related-resource: '#/definitions/SqlTuningSet' /managedDatabases/{managedDatabaseId}/sqlTuningSets/{sqlTuningSetId}/actions/validateBasicFilter: post: description: 'Executes a SQL query to check whether user entered basic filter criteria is valid or not. ' operationId: ValidateBasicFilter parameters: - $ref: '#/components/parameters/ManagedDatabaseIdPathParam' - $ref: '#/components/parameters/SqlTuningSetIdPathParam' - $ref: '#/components/parameters/ValidateBasicFilterDetailsBodyParam' - $ref: '#/components/parameters/RequestIdHeader' - $ref: '#/components/parameters/RetryTokenHeader' responses: 200: description: Basic filter validation status. Validation successfull or Validation Error. headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/SqlTuningSetAdminActionStatus' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 429: $ref: '#/components/responses/429' 500: $ref: '#/components/responses/500' default: $ref: '#/components/responses/default' summary: Validates the user entered basic filter criteria. tags: - sqlTuning x-example: "POST /20210908/managedDatabases//sqlTuningSets//actions/validateBasicFilter\nHost: dbmgmt.us-phoenix-1.oci.oraclecloud.com\n\n{\n \"credentialDetails\": {\n \"username\": \"TestUser\",\n \"sqlTuningSetAdminCredentialType\": \"SECRET\",\n \"role\": \"NORMAL\",\n \"passwordSecretId\": \"ocid1.secret.oc1..\"\n },\n \"name\": \"TestSqlTuningSet\",\n \"owner\": \"SYS\",\n \"basicFilter\": \"sql_text like '%select%' and cpu_time > 100\"\n}\n" x-obmcs-client-retries-enabled: true x-related-resource: '#/definitions/SqlTuningSet' components: parameters: ValidateBasicFilterDetailsBodyParam: description: Validate the basic filter criteria provided by the user. in: body name: ValidateBasicFilterDetails required: true schema: $ref: '#/components/schemas/ValidateBasicFilterDetails' SqlTuningAdvisorTaskSummaryReportSearchPeriodOptionalQueryParam: description: How far back the API will search for begin and end exec id. Unused if neither exec ids nor time filter query params are supplied. This is applicable only for Auto SQL Tuning tasks. in: query name: searchPeriod required: false schema: type: string enum: - LAST_24HR - LAST_7DAY - LAST_31DAY - SINCE_LAST - ALL default: ALL SortOrderQueryParam: description: The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Ascending order is the default order. in: query name: sortOrder x-obmcs-top-level-enum: '#/definitions/SortOrders' schema: type: string enum: - ASC - DESC default: ASC SqlTuningAdvisorTaskSummaryReportEndTimeOptionalQueryParam: description: The optional less than or equal to query parameter to filter the timestamp. This is applicable only for Auto SQL Tuning tasks. in: query name: timeLessThanOrEqualTo required: false x-default-description: 'null' schema: type: string format: date-time SqlTuningAdvisorTaskSummaryReportBeginTimeOptionalQueryParam: description: The optional greater than or equal to query parameter to filter the timestamp. This is applicable only for Auto SQL Tuning tasks. in: query name: timeGreaterThanOrEqualTo required: false x-default-description: 'null' schema: type: string format: date-time FindingFilterOptionalQueryParam: description: The filter used to display specific findings in the report. in: query name: findingFilter required: false schema: type: string enum: - none - FINDINGS - NOFINDINGS - ERRORS - PROFILES - INDICES - STATS - RESTRUCTURE - ALTERNATIVE - AUTO_PROFILES - OTHER_PROFILES default: none RequestIdHeader: description: The client request ID for tracing. in: header name: opc-request-id schema: type: string DropSqlTuningSetDetailsBodyParam: description: The details required to drop a Sql tuning set. in: body name: DropSqlTuningSetDetails required: true schema: $ref: '#/components/schemas/DropSqlTuningSetDetails' SearchPeriodOptionalQueryParam: description: 'The search period during which the API will search for begin and end exec id, if not supplied. Unused if beginExecId and endExecId optional query params are both supplied. ' in: query name: searchPeriod required: false schema: type: string enum: - LAST_24HR - LAST_7DAY - LAST_31DAY - SINCE_LAST - ALL default: ALL SortOrderDescQueryParam: description: The option to sort information in ascending (‘ASC’) or descending (‘DESC’) order. Descending order is the default order. in: query name: sortOrder x-obmcs-top-level-enum: '#/definitions/SortOrders' schema: type: string enum: - ASC - DESC default: DESC SqlTuningSetOwnerOptionalQueryParam: description: The owner of the SQL tuning set. in: query name: owner required: false x-default-description: 'null' schema: type: string LoadSqlTuningSetDetailsBodyParam: description: The details required to load Sql statements into the Sql tuning set. in: body name: LoadSqlTuningSetDetails required: true schema: $ref: '#/components/schemas/LoadSqlTuningSetDetails' SqlTuningAdvisorTaskIdPathParam: description: The SQL tuning task identifier. This is not the [OCID](/Content/General/Concepts/identifiers.htm). in: path name: sqlTuningAdvisorTaskId required: true schema: type: integer format: int64 SqlTuningAdvisorTaskSqlObjectIdQueryParam: description: The SQL object ID for the SQL tuning task. This is not the [OCID](/Content/General/Concepts/identifiers.htm). in: query name: sqlObjectId required: true schema: type: integer format: int64 PaginationTokenQueryParam: description: 'The page token representing the page from where the next set of paginated results are retrieved. This is usually retrieved from a previous list call. ' in: query name: page x-default-description: 'null' schema: type: string maxLength: 1024 minLength: 1 FetchSqlTuningSetDetailsBodyParam: description: The details required to fetch the Sql tuning set details. in: body name: FetchSqlTuningSetDetails required: true schema: $ref: '#/components/schemas/FetchSqlTuningSetDetails' SqlTuningAdvisorTaskStatusOptionalQueryParam: description: The optional query parameter to filter the SQL Tuning Advisor task list by status. in: query name: status required: false x-default-description: 'null' schema: type: string enum: - INITIAL - EXECUTING - INTERRUPTED - COMPLETED - ERROR SqlTuningAdvisorTaskRecommendationSortByQueryParam: description: The possible sortBy values of an object's recommendations. in: query name: sortBy required: false schema: type: string enum: - RECOMMENDATION_TYPE - BENEFIT default: RECOMMENDATION_TYPE SqlTuningAdvisorTaskPlanAttributeQueryParam: description: The attribute of the SQL execution plan. in: query name: attribute required: true schema: type: string enum: - ORIGINAL - ORIGINAL_WITH_ADJUSTED_COST - USING_SQL_PROFILE - USING_NEW_INDICES - USING_PARALLEL_EXECUTION StatsHashFilterOptionalQueryParam: description: The hash value of the object for the statistic finding search. in: query name: statsHashFilter required: false x-default-description: 'null' schema: type: string SqlTuningAdvisorTaskEndExecutionIdOptionalQueryParam: description: The optional less than or equal to query parameter to filter on the execution ID related to a specific SQL Tuning Advisor task. in: query name: endExecId required: false x-default-description: 'null' schema: type: integer format: int64 SqlTuningAdvisorTaskSummaryReportBeginExecutionIdOptionalQueryParam: description: The optional greater than or equal to filter on the execution ID related to a specific SQL Tuning Advisor task. This is applicable only for Auto SQL Tuning tasks. in: query name: beginExecIdGreaterThanOrEqualTo required: false x-default-description: 'null' schema: type: integer format: int64 SqlTuningAdvisorTaskFindingSortByQueryParam: description: The possible sortBy values of an object's recommendations. in: query name: sortBy required: false schema: type: string enum: - DBTIME_BENEFIT - PARSING_SCHEMA - SQL_ID - STATS - PROFILES - SQL_BENEFIT - DATE - INDICES - RESTRUCTURE - ALTERNATIVE - MISC - ERROR - TIMEOUTS default: DBTIME_BENEFIT RetryTokenHeader: description: 'A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. ' in: header name: opc-retry-token required: false schema: type: string maxLength: 64 minLength: 1 SqlTuningAdvisorTaskBeginExecutionIdOptionalQueryParam: description: The optional greater than or equal to filter on the execution ID related to a specific SQL Tuning Advisor task. in: query name: beginExecId required: false x-default-description: 'null' schema: type: integer format: int64 SqlTuningSetIdPathParam: description: The unique identifier of the Sql tuning set. This is not OCID. in: path name: sqlTuningSetId required: true schema: type: integer SqlTuningSetSortByQueryParam: description: The option to sort the SQL tuning set summary data. in: query name: sortBy required: false schema: type: string enum: - NAME default: NAME SqlTuningAdvisorTaskSortByQueryParam: description: The option to sort the SQL Tuning Advisor task summary data. in: query name: sortBy required: false schema: type: string enum: - NAME - START_TIME default: START_TIME SaveSqlTuningSetAsDetailsBodyParam: description: The details required to save a Sql tuning set into another Sql tuning set. in: body name: SaveSqlTuningSetAsDetails required: true schema: $ref: '#/components/schemas/SaveSqlTuningSetAsDetails' IndexHashFilterOptionalQueryParam: description: The hash value of the index table name. in: query name: indexHashFilter required: false x-default-description: 'null' schema: type: string PaginationLimitQueryParam: description: The maximum number of records returned in the paginated response. in: query name: limit schema: type: integer default: 10 maximum: 1000 minimum: 1 NamedCredentialIdHeader: description: The OCID of the Named Credential. in: header name: opc-named-credential-id required: false x-default-description: 'null' schema: type: string CreateSqlTuningSetDetailsBodyParam: description: The details required to create a Sql tuning set. in: body name: CreateSqlTuningSetDetails required: true schema: $ref: '#/components/schemas/CreateSqlTuningSetDetails' SqlTuningAdvisorTaskNameOptionalQueryParam: description: The optional query parameter to filter the SQL Tuning Advisor task list by name. in: query name: name required: false x-default-description: 'null' schema: type: string DropSqlsInSqlTuningSetDetailsBodyParam: description: Drops the selected list of Sql statements from the current Sql tuning set. in: body name: DropSqlsInSqlTuningSetDetails required: true schema: $ref: '#/components/schemas/DropSqlsInSqlTuningSetDetails' SqlTuningAdvisorTaskSummaryReportEndExecutionIdOptionalQueryParam: description: The optional less than or equal to query parameter to filter on the execution ID related to a specific SQL Tuning Advisor task. This is applicable only for Auto SQL Tuning tasks. in: query name: endExecIdLessThanOrEqualTo required: false x-default-description: 'null' schema: type: integer format: int64 SqlTuningSetNameContainsOptionalQueryParam: description: Allow searching the name of the SQL tuning set by partial matching. The search is case insensitive. in: query name: nameContains required: false x-default-description: 'null' schema: type: string SqlTuningAdvisorTaskBeginTimeOptionalQueryParam: description: The optional greater than or equal to query parameter to filter the timestamp. in: query name: timeGreaterThanOrEqualTo required: false x-default-description: 'null' schema: type: string format: date-time SqlTuningAdvisorTaskEndTimeOptionalQueryParam: description: The optional less than or equal to query parameter to filter the timestamp. in: query name: timeLessThanOrEqualTo required: false x-default-description: 'null' schema: type: string format: date-time ManagedDatabaseIdPathParam: description: The [OCID](/Content/General/Concepts/identifiers.htm) of the Managed Database. in: path name: managedDatabaseId required: true schema: type: string maxLength: 255 minLength: 1 SqlTuningAdvisorTaskExecutionIdQueryParam: description: 'The execution ID for an execution of a SQL tuning task. This is not the [OCID](/Content/General/Concepts/identifiers.htm). ' in: query name: executionId required: true schema: type: integer format: int64 schemas: SqlTuningAdvisorTaskSummaryReportObjectStatFindingSummary: description: A summary for all the statistic findings of an object in a SQL Tuning Advisor task. Includes the object's hash, name, type, schema, problem type and the object reference count. properties: objectHashValue: description: Numerical representation of the object. format: int64 type: integer objectName: description: Name of the object. type: string objectType: description: Type of the object. type: string problemType: description: Type of statistics problem related to the object. enum: - MISSING - STALE type: string referenceCount: description: The number of the times the object is referenced within the SQL Tuning advisor task findings. type: integer schema: description: Schema of the object. type: string required: - objectHashValue - objectName - objectType - schema - problemType - referenceCount type: object SqlTuningTaskSqlExecutionPlanStep: description: A step in the SQL execution plan. properties: accessPredicates: description: 'The predicates used to locate rows in an access structure. For example, start or stop predicates for an index range scan. ' type: string attribute: description: The text string identifying the type of execution plan. type: string bytes: description: The number of bytes returned by the current operation. format: int64 type: integer cardinality: description: The number of rows returned by the current operation (estimated by the CBO). format: int64 type: integer cost: description: The cost of the current operation estimated by the cost-based optimizer (CBO). format: double type: number cpuCost: description: The CPU cost of the current operation. format: double type: number filterPredicates: description: The predicates used to filter rows before producing them. type: string ioCost: description: The I/O cost of the current operation. format: double type: number numberOfSearchColumn: description: 'Number of index columns with start and stop keys (that is, the number of columns with matching predicates). ' type: integer objectName: description: The name of the object. type: string objectNode: description: The name of the database link used to reference the object. type: string objectOwner: description: The owner of the object. type: string objectPosition: description: The numbered position of the object name in the original SQL statement. type: integer objectType: description: The descriptive modifier that further describes the type of object. type: string operation: description: The name of the operation performed at this step. type: string optimizerMode: description: The current mode of the optimizer, such as all_rows, first_rows_n (where n = 1, 10, 100, 1000, and so on). type: string options: description: The options used for the operation performed at this step. type: string other: description: Information about parallel execution servers and parallel queries type: string otherTag: description: Describes the function of the SQL text in the OTHER column. type: string parentStepId: description: 'The ID of the next step that operates on the results of this step. This is not the [OCID](/Content/General/Concepts/identifiers.htm). ' type: integer partitionId: description: 'The ID of the step in the execution plan that has computed the pair of values of partitionStart and partitionStop. ' type: integer partitionStart: description: 'A step may get data from a range of partitions of a partitioned object, such as table or index, based on predicates and sorting order. The partionStart is the starting partition of the range. The partitionStop is the ending partition of the range. ' type: string partitionStop: description: 'A step may get data from a range of partitions of a partitioned object, such as table or index, based on predicates and sorting order. The partionStart is the starting partition of the range. The partitionStop is the ending partition of the range. ' type: string planHashValue: description: The numerical representation of the SQL execution plan. format: int64 type: integer position: description: The order of processing for steps with the same parent ID. type: integer remarks: description: The place for comments that can be added to the steps of the execution plan. type: string stepId: description: 'The identification number of a step in the SQL execution plan. This is unique within the SQL execution plan. This is not the [OCID](/Content/General/Concepts/identifiers.htm). ' type: integer tempSpace: description: The temporary space usage (in bytes) of the operation (sort or hash-join) as estimated by the CBO. format: int64 type: integer time: description: The elapsed time (in seconds) of the operation as estimated by the CBO. format: int64 type: integer type: object Error: description: Error Information. properties: code: description: A short error code that defines the error, meant for programmatic parsing. type: string message: description: A human-readable error string. type: string required: - code - message SqlMetrics: description: Metrics of the Sql in the Sql tuning set. properties: bufferGets: description: Sum total number of buffer gets. format: int64 type: integer cpuTime: description: Total CPU time consumed by the Sql. format: int64 type: integer directWrites: description: Sum total number of direct path writes. format: int64 type: integer diskReads: description: Sum total number of disk reads. format: int64 type: integer elapsedTime: description: Elapsed time of the Sql. format: int64 type: integer executions: description: Total executions of this SQL statement. format: int64 type: integer type: object ValidateBasicFilterDetails: description: 'Validate the basic filter criteria provided by the user. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: basicFilter: description: 'Specifies the Sql predicate to filter the Sql from the Sql tuning set defined on attributes of the SQLSET_ROW. User could use any combination of the following columns with appropriate values as Sql predicate Refer to the documentation https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_SQLTUNE.html#GUID-1F4AFB03-7B29-46FC-B3F2-CB01EC36326C ' type: string credentialDetails: $ref: '#/components/schemas/SqlTuningSetAdminCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' name: description: The name of the Sql tuning set. type: string owner: description: The owner of the Sql tuning set. type: string required: - owner - name - basicFilter type: object LoadSqlTuningSetDetails: description: 'The details required to load the Sql statements into the Sql tuning set. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: attributeList: default: TYPICAL description: "Specifies the list of Sql statement attributes to return in the result.\nNote that this parameter cannot be made an enum since custom value can take a list of comma separated attribute names.\nAttribute list can take one of the following values.\n TYPICAL - Specifies BASIC plus Sql plan (without row source statistics) and without object reference list (default).\n BASIC - Specifies all attributes (such as execution statistics and binds) except the plans. The execution context is always part of the result.\n ALL - Specifies all attributes.\n CUSTOM - Comma-separated list of the following attribute names.\n - EXECUTION_STATISTICS\n - BIND_LIST\n - OBJECT_LIST\n - SQL_PLAN\n - SQL_PLAN_STATISTICS\nUsage examples:\n 1. \"attributeList\": \"TYPICAL\"\n 2. \"attributeList\": \"ALL\"\n 3. \"attributeList\": \"EXECUTION_STATISTICS,OBJECT_LIST,SQL_PLAN\"\n" type: string baselineName: default: 'null' description: 'Specifies the name of the AWR baseline period. When loading the sql statements from AWR, following inputs has to be provided: beginSnapshot and endSnapshot OR baselineName ' type: string x-default-description: 'null' basicFilter: default: 'null' description: 'Specifies the Sql predicate to filter the Sql from the Sql tuning set defined on attributes of the SQLSET_ROW. User could use any combination of the following columns with appropriate values as Sql predicate Refer to the documentation https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_SQLTUNE.html#GUID-1F4AFB03-7B29-46FC-B3F2-CB01EC36326C ' type: string x-default-description: 'null' beginSnapshot: default: 1 description: Defines the beginning AWR snapshot (non-inclusive). format: int64 type: integer captureMode: default: MODE_REPLACE_OLD_STATS description: "Specifies the capture mode. Note that this parameter is applicable only for UPDATE and MERGE capture options.\nCapture mode can take one of the following values\n - MODE_REPLACE_OLD_STATS\n Replaces statistics when the number of executions is greater than the number stored in the Sql tuning set\n - MODE_ACCUMULATE_STATS\n Adds new values to current values for Sql that is already stored.\n Note that this mode detects if a statement has been aged out, so the final value for a statistics is the sum of the statistics of all cursors that statement existed under.\n" enum: - MODE_REPLACE_OLD_STATS - MODE_ACCUMULATE_STATS type: string captureOption: default: MERGE description: Specifies whether to insert new statements, update existing statements, or both. enum: - INSERT - UPDATE - MERGE type: string commitRows: default: 0 description: 'Specifies whether to commit statements after DML. If a value is provided, then the load commits after each specified number of statements is inserted. If NULL is provided, then the load commits only once, at the end of the operation. ' type: integer credentialDetails: $ref: '#/components/schemas/SqlTuningSetAdminCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' endSnapshot: default: 2 description: Defines the ending AWR snapshot (inclusive). format: int64 type: integer isIgnoreNull: default: true description: 'Specifies whether to update attributes when the new value is NULL. If TRUE, then the procedure does not update an attribute when the new value is NULL. That is, do not override with NULL values unless intentional. Possible values - true or false ' type: boolean loadOption: default: INSERT description: "Specifies which statements are loaded into the Sql tuning set.\nThe possible values are.\n - INSERT (default)\n Adds only new statements.\n - UPDATE\n Updates existing the Sql statements and ignores any new statements.\n - MERGE\n Inserts new statements and updates the information of the existing ones.\n" enum: - INSERT - UPDATE - MERGE type: string loadType: default: INCREMENTAL_CURSOR_CACHE description: Specifies the loading method into the Sql tuning set. enum: - INCREMENTAL_CURSOR_CACHE - CURRENT_CURSOR_CACHE - AWR type: string name: description: The name of the Sql tuning set. type: string owner: default: 'null' description: The owner of the Sql tuning set. type: string x-default-description: 'null' rankingMeasure1: default: 'null' description: 'Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures. ' enum: - ELAPSED_TIME - CPU_TIME - OPTIMIZER_COST - BUFFER_GETS - DISK_READS - DIRECT_WRITES type: string x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/RankingMeasure' rankingMeasure2: default: 'null' description: 'Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures. ' enum: - ELAPSED_TIME - CPU_TIME - OPTIMIZER_COST - BUFFER_GETS - DISK_READS - DIRECT_WRITES type: string x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/RankingMeasure' rankingMeasure3: default: 'null' description: 'Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures. ' enum: - ELAPSED_TIME - CPU_TIME - OPTIMIZER_COST - BUFFER_GETS - DISK_READS - DIRECT_WRITES type: string x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/RankingMeasure' recursiveSql: default: HAS_RECURSIVE_SQL description: Specifies that the filter must include recursive Sql in the Sql tuning set. enum: - HAS_RECURSIVE_SQL - NO_RECURSIVE_SQL type: string repeatInterval: default: 300 description: Defines the amount of time, in seconds, to pause between sampling. type: integer resultLimit: default: 0 description: The top limit Sql from the filtered source, ranked by the ranking measure. type: integer resultPercentage: default: 1.0 description: 'Specifies a filter that picks the top n% according to the supplied ranking measure. Note that this parameter applies only if one ranking measure is supplied. ' format: double type: number showSqlOnly: default: 0 description: 'Flag to indicate whether to create the Sql tuning set or just display the plsql used to create Sql tuning set. ' type: integer totalTimeLimit: default: 1800 description: Defines the total amount of time, in seconds, to execute. type: integer updateAttributes: default: null description: "Specifies the list of Sql statement attributes to update during a merge or update.\nNote that this parameter cannot be made an enum since custom value can take a list of comma separated attribute names.\nUpdate attributes can take one of the following values.\n NULL (default) - Specifies the content of the input cursor except the execution context. On other terms, it is equivalent to ALL without execution contexts such as module and action.\n BASIC - Specifies statistics and binds only.\n TYPICAL - Specifies BASIC with Sql plans (without row source statistics) and without an object reference list.\n ALL - Specifies all attributes, including the execution context attributes such as module and action.\n CUSTOM - List of comma separated attribute names to update\n EXECUTION_CONTEXT\n EXECUTION_STATISTICS\n SQL_BINDS\n SQL_PLAN\n SQL_PLAN_STATISTICS (similar to SQL_PLAN with added row source statistics)\nUsage examples:\n 1. \"updateAttributes\": \"TYPICAL\"\n 2. \"updateAttributes\": \"BASIC\"\n 3. \"updateAttributes\": \"EXECUTION_STATISTICS,SQL_PLAN_STATISTICS,SQL_PLAN\"\n 4. \"updateAttributes\": \"EXECUTION_STATISTICS,SQL_PLAN\"\n" type: string updateCondition: default: null description: 'Specifies when to perform the update. The procedure only performs the update when the specified condition is satisfied. The condition can refer to either the data source or destination. The condition must use the following prefixes to refer to attributes from the source or the destination: OLD — Refers to statement attributes from the SQL tuning set (destination). NEW — Refers to statement attributes from the input statements (source). NULL — No updates are performed. ' enum: - OLD - NEW - 'NULL' type: string updateOption: default: REPLACE description: "Specifies how existing Sql statements are updated.\nThis parameter is applicable only if load_option is specified with UPDATE or MERGE as an option.\nUpdate option can take one of the following values.\n REPLACE (default) - Updates the statement using the new statistics, bind list, object list, and so on.\n ACCUMULATE - Combines attributes when possible (for example, statistics such as elapsed_time), otherwise replaces the existing values (for example, module and action) with the provided values.\n Following Sql statement attributes can be accumulated.\n elapsed_time\n buffer_gets\n direct_writes\n disk_reads\n row_processed\n fetches\n executions\n end_of_fetch_count\n stat_period\n active_stat_period\n" enum: - REPLACE - ACCUMULATE type: string required: - name - loadType type: object DropSqlTuningSetDetails: description: 'The details required to drop a Sql tuning set. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: credentialDetails: $ref: '#/components/schemas/SqlTuningSetAdminCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' name: description: A unique Sql tuning set name. maxLength: 30 minLength: 1 type: string owner: default: 'null' description: Owner of the Sql tuning set. maxLength: 128 minLength: 1 type: string x-default-description: 'null' showSqlOnly: default: 0 description: 'Flag to indicate whether to drop the Sql tuning set or just display the plsql used to drop Sql tuning set. ' type: integer required: - name type: object SqlTuningAdvisorTaskCollection: description: The SQL Tuning Advisor task list. properties: items: description: A list of SQL Tuning Advisor tasks. items: $ref: '#/components/schemas/SqlTuningAdvisorTaskSummary' type: array required: - items type: object DropSqlsInSqlTuningSetDetails: description: 'Drops the selected list of Sql statements from the current Sql tuning set. The basicFilter parameter specifies the Sql predicate to filter the Sql from the Sql tuning set defined on attributes of the SQLSET_ROW. If a valid filter criteria is specified, then, Sql statements matching this filter criteria will be deleted from the current Sql tuning set. If filter criteria is not specified, then, all Sql statements will be deleted from the current Sql tuning set. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: basicFilter: default: 'null' description: 'Specifies the Sql predicate to filter the Sql from the Sql tuning set defined on attributes of the SQLSET_ROW. User could use any combination of the following columns with appropriate values as Sql predicate Refer to the documentation https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_SQLTUNE.html#GUID-1F4AFB03-7B29-46FC-B3F2-CB01EC36326C ' type: string x-default-description: 'null' credentialDetails: $ref: '#/components/schemas/SqlTuningSetAdminCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' name: description: The name of the Sql tuning set. type: string owner: default: 'null' description: The owner of the Sql tuning set. type: string x-default-description: 'null' showSqlOnly: default: 0 description: 'Flag to indicate whether to drop the Sql statements or just display the plsql used to drop the Sql statements. ' type: integer required: - name type: object DatabaseCredentialDetails: description: The credential to connect to the database to perform tablespace administration tasks. discriminator: propertyName: credentialType properties: credentialType: description: The type of the credential for tablespace administration tasks. enum: - SECRET - PASSWORD - NAMED_CREDENTIAL type: string required: - credentialType type: object SqlTuningSetAdminActionStatus: description: The status of a Sql tuning set admin action. properties: errorCode: description: 'The error code that denotes failure if the Sql tuning set admin action is not successful. The error code is "null" if the admin action is successful. ' type: integer errorMessage: description: 'The error message that indicates the reason for failure if the Sql tuning set admin action is not successful. The error message is "null" if the admin action is successful. ' type: string showSqlOnly: description: 'Flag to indicate whether to create the Sql tuning set or just display the plsql used for the selected user action. ' type: integer sqlStatement: description: 'When showSqlOnly is set to 1, this attribute displays the plsql generated for the selected user action. When showSqlOnly is set to 0, this attribute will not be returned. ' type: string status: description: 'The status of a Sql tuning set admin action. ' enum: - SUCCEEDED - FAILED type: string successMessage: description: 'The success message of the Sql tuning set admin action. The success message is "null" if the admin action is non successful. ' type: string required: - status type: object SqlTuningAdvisorTaskSummary: description: The summary of a SQL Tuning Advisor task. properties: daysToExpire: description: The number of days left before the task expires. If the value equals -1, then the task has no expiration time (UNLIMITED). type: integer description: description: The description of the SQL Tuning Advisor task. type: string instanceId: description: The instance ID of the SQL Tuning Advisor task. This is not the [OCID](/Content/General/Concepts/identifiers.htm). type: integer name: description: The name of the SQL Tuning Advisor task. type: string owner: description: The owner of the SQL Tuning Advisor task. type: string recommendationCount: description: The number of recommendations provided for the SQL Tuning Advisor task. type: integer sqlTuningAdvisorTaskId: description: The unique identifier of the SQL Tuning Advisor task. This is not the [OCID](/Content/General/Concepts/identifiers.htm). format: int64 type: integer taskStatus: description: The status of the SQL Tuning Advisor task. enum: - COMPLETED - INITIAL - EXECUTING - INTERRUPTED - ERROR type: string x-obmcs-top-level-enum: '#/definitions/SqlTuningTaskStatusTypes' timeCreated: description: The Creation date of the SQL Tuning Advisor task. format: date-time type: string timeExecutionEnded: description: The end time of the task execution. format: date-time type: string timeExecutionStarted: description: The start time of the task execution. format: date-time type: string totalSqlStatements: description: The total number of SQL statements related to the SQL Tuning Advisor task. type: integer required: - sqlTuningAdvisorTaskId type: object SqlTuningAdvisorTaskRecommendationCollection: description: The SQL Tuning Advisor recommendations for a given SQL statement. properties: items: description: A list of SQL Tuning Advisor recommendations. items: $ref: '#/components/schemas/SqlTuningAdvisorTaskRecommendationSummary' type: array required: - items type: object SqlTuningAdvisorTaskSqlExecutionPlan: description: A SQL execution plan. properties: plan: description: A SQL execution plan as a list of steps. items: $ref: '#/components/schemas/SqlTuningTaskSqlExecutionPlanStep' type: array required: - plan type: object SqlTuningAdvisorTaskRecommendationSummary: description: 'A recommendation for a given object in a SQL Tuning Task. ' properties: benefit: description: The percentage benefit of this implementation. format: float type: number finding: description: Summary of the issue found in the SQL statement. type: string implementActionSql: description: Action sql to be implemented based on the recommendation result. type: string isParallelExecution: description: Indicates whether a SQL Profile recommendation uses parallel execution. type: boolean rationale: description: Describes the reasoning behind the recommendation and how it relates to the finding. type: string recommendation: description: The recommendation for a specific finding. type: string recommendationKey: description: The unique identifier of the recommendation in the scope of the task. type: integer recommendationType: description: Type of recommendation. enum: - STATISTICS - INDEX - SQL_PROFILE - RESTRUCTURE_SQL - ALTERNATIVE_PLANS - ERROR - MISCELLANEOUS type: string sqlTuningAdvisorTaskId: description: The unique identifier of the task. This is not the [OCID](/Content/General/Concepts/identifiers.htm). format: int64 type: integer sqlTuningAdvisorTaskObjectId: description: 'The key of the object to which these recommendations apply. This is not the [OCID](/Content/General/Concepts/identifiers.htm). ' format: int64 type: integer required: - recommendationKey - recommendationType - sqlTuningAdvisorTaskId - sqlTuningAdvisorTaskObjectId type: object CloneSqlTuningTaskDetails: description: 'The request to clone and run a SQL tuning task. The new task uses the same inputs as the one being cloned. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: credentialDetails: $ref: '#/components/schemas/SqlTuningTaskCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' originalTaskId: description: 'The identifier of the SQL tuning task being cloned. This is not the [OCID](/Content/General/Concepts/identifiers.htm). It can be retrieved from the following endpoint [ListSqlTuningAdvisorTasks](#/en/database-management/latest/ManagedDatabase/ListSqlTuningAdvisorTasks). ' format: int64 type: integer taskDescription: description: The description of the SQL tuning task. type: string taskName: description: The name of the SQL tuning task. The name is unique per user in a database, and it is case-sensitive. type: string required: - taskName - originalTaskId type: object DropSqlTuningTaskDetails: description: 'The request to drop a SQL tuning task. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: credentialDetails: $ref: '#/components/schemas/SqlTuningTaskCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' taskId: description: 'The identifier of the SQL tuning task being dropped. This is not the [OCID](/Content/General/Concepts/identifiers.htm). It can be retrieved from the following endpoint [ListSqlTuningAdvisorTasks](#/en/database-management/latest/ManagedDatabase/ListSqlTuningAdvisorTasks). ' format: int64 type: integer required: - taskId type: object SqlTuningSet: description: Details of the Sql tuning set. properties: allSqlStatementsFetched: description: "In OCI database management, there is a limit to fetch only 2000 rows.\nThis flag indicates whether all Sql statements of this Sql tuning set matching the filter criteria are fetched or not.\nPossible values are 'Yes' or 'No'\n - Yes - All Sql statements matching the filter criteria are fetched.\n - No - There are more Sql statements matching the fitler criteria.\n User should fine tune the filter criteria to narrow down the result set.\n" enum: - 'YES' - 'NO' type: string description: description: The description of the Sql tuning set. type: string errorMessage: description: Latest execution error of the plsql that was submitted as a scheduler job. type: string id: description: The unique Sql tuning set identifier. type: integer name: description: The name of the Sql tuning set. type: string owner: description: The owner of the Sql tuning set. type: string scheduledJobName: description: Name of the Sql tuning set scheduler job. type: string sqlList: description: A list of the Sqls associated with the Sql tuning set. items: $ref: '#/components/schemas/SqlInSqlTuningSet' maxItems: 2000 type: array statementCount: description: Number of statements in the Sql tuning set type: integer status: description: Current status of the Sql tuning set. enum: - DISABLED - RETRY_SCHEDULED - SCHEDULED - BLOCKED - RUNNING - COMPLETED - BROKEN - FAILED - REMOTE - RESOURCE_UNAVAILABLE - SUCCEEDED - CHAIN_STALLED type: string x-obmcs-top-level-enum: '#/definitions/SqlTuningSetStatusTypes' timeCreated: description: The created time of the Sql tuning set. format: date-time type: string timeLastModified: description: Last modified time of the Sql tuning set. format: date-time type: string required: - owner - name type: object SqlTuningSetCollection: description: The details in the SQL tuning set summary. properties: items: description: The details in the SQL tuning set summary. items: $ref: '#/components/schemas/SqlTuningSetSummary' type: array managedDatabaseId: description: The [OCID](/Content/General/Concepts/identifiers.htm) of the Managed Database. type: string required: - managedDatabaseId - items type: object SqlTuningAdvisorTaskSummaryReportStatistics: description: The statistics of the statements and findings in the SQL Tuning Advisor summary report. properties: findingBenefits: $ref: '#/components/schemas/SqlTuningAdvisorTaskSummaryFindingBenefits' findingCounts: $ref: '#/components/schemas/SqlTuningAdvisorTaskSummaryFindingCounts' statementCounts: $ref: '#/components/schemas/SqlTuningAdvisorTaskSummaryReportStatementCounts' required: - statementCounts - findingCounts - findingBenefits type: object SqlTuningTaskSqlDetail: description: The details of the SQL statements on which SQL tuning is performed. properties: sqlId: description: The identifier of a SQL statement. type: string required: - sqlId type: object ExecutionPlanStatsComparision: description: 'The comparison report of the SQL execution plan statistics in the original and modified plan. ' properties: modified: $ref: '#/components/schemas/SqlTuningTaskPlanStats' original: $ref: '#/components/schemas/SqlTuningTaskPlanStats' required: - original - modified type: object SqlTuningAdvisorTaskSummaryFindingBenefits: description: The benefits of the findings in the SQL Tuning Advisor summary report. properties: dbTimeAfterImplemented: description: The actual database time of the SQL statements for which SQL Tuning Advisor recommendations are implemented. type: integer dbTimeAfterRecommended: description: The estimated database time of the above SQL statements, if SQL Tuning Advisor recommendations are implemented. type: integer dbTimeBeforeImplemented: description: The actual database time of the above SQL statements, before SQL Tuning Advisor recommendations are implemented. type: integer dbTimeBeforeRecommended: description: The actual database time of the SQL statements for which SQL Tuning Advisor recommendations are not implemented. type: integer required: - dbTimeBeforeRecommended - dbTimeAfterRecommended - dbTimeBeforeImplemented - dbTimeAfterImplemented type: object SaveSqlTuningSetAsDetails: description: 'Save current list of Sql statements into another Sql tuning set. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: attributeList: default: TYPICAL description: "Specifies the list of Sql statement attributes to return in the result.\nNote that this parameter cannot be made an enum since custom value can take a list of comma separated attribute names.\nAttribute list can take one of the following values.\n TYPICAL - Specifies BASIC plus Sql plan (without row source statistics) and without object reference list (default).\n BASIC - Specifies all attributes (such as execution statistics and binds) except the plans. The execution context is always part of the result.\n ALL - Specifies all attributes.\n CUSTOM - Comma-separated list of the following attribute names.\n - EXECUTION_STATISTICS\n - BIND_LIST\n - OBJECT_LIST\n - SQL_PLAN\n - SQL_PLAN_STATISTICS\nUsage examples:\n 1. \"attributeList\": \"TYPICAL\"\n 2. \"attributeList\": \"ALL\"\n 3. \"attributeList\": \"EXECUTION_STATISTICS,OBJECT_LIST,SQL_PLAN\"\n" type: string basicFilter: default: 'null' description: 'Specifies the Sql predicate to filter the Sql from the Sql tuning set defined on attributes of the SQLSET_ROW. User could use any combination of the following columns with appropriate values as Sql predicate Refer to the documentation https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_SQLTUNE.html#GUID-1F4AFB03-7B29-46FC-B3F2-CB01EC36326C ' type: string x-default-description: 'null' commitRows: default: 0 description: 'Specifies whether to commit statements after DML. If a value is provided, then the load commits after each specified number of statements is inserted. If NULL is provided, then the load commits only once, at the end of the operation. ' type: integer createNew: default: 1 description: 'Specifies whether to create a new Sql tuning set or not. Possible values 1 - Create a new Sql tuning set 0 - Do not create a new Sql tuning set ' type: integer credentialDetails: $ref: '#/components/schemas/SqlTuningSetAdminCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' destinationSqlTuningSetDescription: description: The description for the destination Sql tuning set. type: string x-default-description: 'null' destinationSqlTuningSetName: description: The name of the destination Sql tuning set. maxLength: 30 minLength: 1 type: string destinationSqlTuningSetOwner: default: 'null' description: Owner of the destination Sql tuning set. maxLength: 128 minLength: 1 type: string x-default-description: 'null' isIgnoreNull: default: true description: 'Specifies whether to update attributes when the new value is NULL. If TRUE, then the procedure does not update an attribute when the new value is NULL. That is, do not override with NULL values unless intentional. Possible values - true or false ' type: boolean loadOption: default: INSERT description: "Specifies which statements are loaded into the Sql tuning set.\nThe possible values are.\n - INSERT (default)\n Adds only new statements.\n - UPDATE\n Updates existing the Sql statements and ignores any new statements.\n - MERGE\n Inserts new statements and updates the information of the existing ones.\n" enum: - INSERT - UPDATE - MERGE type: string name: description: The name of the Sql tuning set. type: string owner: default: 'null' description: The owner of the Sql tuning set. type: string x-default-description: 'null' planFilter: default: 'null' description: 'Specifies the plan filter. This parameter enables you to select a single plan when a statement has multiple plans. Refer to the documentation https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_SQLSET.html#GUID-9D995019-91AB-4B1E-9EAF-031050789B21 ' enum: - LAST_GENERATED - FIRST_GENERATED - LAST_LOADED - FIRST_LOADED - MAX_ELAPSED_TIME - MAX_BUFFER_GETS - MAX_DISK_READS - MAX_DIRECT_WRITES - MAX_OPTIMIZER_COST type: string x-default-description: 'null' rankingMeasure1: default: 'null' description: 'Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures. ' enum: - ELAPSED_TIME - CPU_TIME - OPTIMIZER_COST - BUFFER_GETS - DISK_READS - DIRECT_WRITES type: string x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/RankingMeasure' rankingMeasure2: default: 'null' description: 'Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures. ' enum: - ELAPSED_TIME - CPU_TIME - OPTIMIZER_COST - BUFFER_GETS - DISK_READS - DIRECT_WRITES type: string x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/RankingMeasure' rankingMeasure3: default: 'null' description: 'Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures. ' enum: - ELAPSED_TIME - CPU_TIME - OPTIMIZER_COST - BUFFER_GETS - DISK_READS - DIRECT_WRITES type: string x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/RankingMeasure' recursiveSql: default: HAS_RECURSIVE_SQL description: Specifies that the filter must include recursive Sql in the Sql tuning set. enum: - HAS_RECURSIVE_SQL - NO_RECURSIVE_SQL type: string resultLimit: default: 0 description: The top limit Sql from the filtered source, ranked by the ranking measure. type: integer resultPercentage: default: 1.0 description: 'Specifies a filter that picks the top n% according to the supplied ranking measure. Note that this parameter applies only if one ranking measure is supplied. ' format: double type: number showSqlOnly: default: 0 description: 'Flag to indicate whether to save the Sql tuning set or just display the plsql used to save Sql tuning set. ' type: integer updateAttributes: default: null description: "Specifies the list of Sql statement attributes to update during a merge or update.\nNote that this parameter cannot be made an enum since custom value can take a list of comma separated attribute names.\nUpdate attributes can take one of the following values.\n NULL (default) - Specifies the content of the input cursor except the execution context. On other terms, it is equivalent to ALL without execution contexts such as module and action.\n BASIC - Specifies statistics and binds only.\n TYPICAL - Specifies BASIC with Sql plans (without row source statistics) and without an object reference list.\n ALL - Specifies all attributes, including the execution context attributes such as module and action.\n CUSTOM - List of comma separated attribute names to update\n EXECUTION_CONTEXT\n EXECUTION_STATISTICS\n SQL_BINDS\n SQL_PLAN\n SQL_PLAN_STATISTICS (similar to SQL_PLAN with added row source statistics)\nUsage examples:\n 1. \"updateAttributes\": \"TYPICAL\"\n 2. \"updateAttributes\": \"BASIC\"\n 3. \"updateAttributes\": \"EXECUTION_STATISTICS,SQL_PLAN_STATISTICS,SQL_PLAN\"\n 4. \"updateAttributes\": \"EXECUTION_STATISTICS,SQL_PLAN\"\n" type: string updateCondition: default: null description: "Specifies when to perform the update.\nThe procedure only performs the update when the specified condition is satisfied.\nThe condition can refer to either the data source or destination.\nThe condition must use the following prefixes to refer to attributes from the source or the destination:\n OLD — Refers to statement attributes from the SQL tuning set (destination).\n NEW — Refers to statement attributes from the input statements (source).\n NULL — No updates are performed.\n" enum: - OLD - NEW - 'NULL' type: string updateOption: default: REPLACE description: "Specifies how existing Sql statements are updated.\nThis parameter is applicable only if load_option is specified with UPDATE or MERGE as an option.\nUpdate option can take one of the following values.\n REPLACE (default) - Updates the statement using the new statistics, bind list, object list, and so on.\n ACCUMULATE - Combines attributes when possible (for example, statistics such as elapsed_time), otherwise replaces the existing values (for example, module and action) with the provided values.\n Following Sql statement attributes can be accumulated.\n elapsed_time\n buffer_gets\n direct_writes\n disk_reads\n row_processed\n fetches\n executions\n end_of_fetch_count\n stat_period\n active_stat_period\n" enum: - REPLACE - ACCUMULATE type: string required: - name - destinationSqlTuningSetName - createNew type: object SqlTuningAdvisorTaskSummaryFindingCounts: description: The number of findings in the SQL Tuning Advisor summary report. properties: alternatePlan: description: The number of distinct SQL statements with alternative plan recommendations. type: integer implementedSqlProfile: description: The number of distinct SQL statements with implemented SQL profiles. type: integer index: description: The number of distinct SQL statements with index recommendations. type: integer recommendedSqlProfile: description: The number of distinct SQL statements with recommended SQL profiles. type: integer restructure: description: The number of distinct SQL statements with restructured SQL recommendations. type: integer statistics: description: The number of distinct SQL statements with stale or missing optimizer statistics recommendations. type: integer required: - recommendedSqlProfile - implementedSqlProfile - index - restructure - statistics - alternatePlan type: object SqlTuningSetSummary: description: The summary information of a SQL tuning set. properties: description: description: The description of the SQL tuning set. type: string errorMessage: description: Latest execution error of the plsql that was submitted as a scheduler job. type: string id: description: The unique Sql tuning set identifier. This is not OCID. type: integer name: description: The name of the SQL tuning set. type: string owner: description: The owner of the SQL tuning set. type: string scheduledJobName: description: Name of the Sql tuning set scheduler job. type: string statementCounts: description: The number of SQL statements in the SQL tuning set. type: integer status: description: Current status of the Sql tuning set. enum: - DISABLED - RETRY_SCHEDULED - SCHEDULED - BLOCKED - RUNNING - COMPLETED - BROKEN - FAILED - REMOTE - RESOURCE_UNAVAILABLE - SUCCEEDED - CHAIN_STALLED type: string x-obmcs-top-level-enum: '#/definitions/SqlTuningSetStatusTypes' timeCreated: description: The created time of the Sql tuning set. format: date-time type: string timeLastModified: description: Last modified time of the Sql tuning set. format: date-time type: string required: - name - owner type: object SqlInSqlTuningSet: description: Sql information in the Sql tuning set. properties: containerDatabaseId: description: The unique container database identifier. format: int64 type: integer metrics: description: A list of the Sqls associated with the Sql tuning set. items: $ref: '#/components/schemas/SqlMetrics' maxItems: 6 type: array module: description: The module of the Sql. type: string planHashValue: description: Plan hash value of the Sql statement. format: int64 type: integer schema: description: The schema name of the Sql. type: string sqlId: description: The unique Sql identifier. type: string sqlText: description: Sql text. type: string required: - sqlId - planHashValue type: object SqlTuningAdvisorTaskSummaryReportIndexFindingSummary: description: A summary for all the index findings in a SQL Tuning Advisor task. Includes the index's hash value, table name, schema, index name, reference count and index columns properties: indexColumns: description: Columns of the index. items: type: string type: array indexHashValue: description: Numerical representation of the index. format: int64 type: integer indexName: description: Name of the index. type: string referenceCount: description: The number of times the index is referenced within the SQL Tuning advisor task findings. type: integer schema: description: Schema related to the index. type: string tableName: description: Table's name related to the index. type: string required: - indexHashValue - indexName - tableName - schema - referenceCount - indexColumns type: object SqlTuningAdvisorTaskFindingSummary: description: 'A summary of the findings of the objects in a tuning task that match a given filter. This includes the kind of findings that were reported, whether the benefits were analyzed, and the number of benefits obtained. ' properties: dbTimeBenefit: description: The time benefit (in seconds) for the highest-rated finding for this object. format: float type: number isAlternativePlanFindingPresent: description: Indicates whether an alternative execution plan was reported for this SQL statement. type: boolean isErrorFindingPresent: description: Indicates whether there is an error in this SQL statement. type: boolean isIndexFindingPresent: description: Indicates whether an index recommendation was reported for this SQL statement. type: boolean isMiscellaneousFindingPresent: description: Indicates whether a miscellaneous finding was reported for this SQL statement. type: boolean isRestructureSqlFindingPresent: description: Indicates whether a restructure SQL recommendation was reported for this SQL statement. type: boolean isSqlProfileFindingImplemented: description: Indicates whether a SQL Profile recommendation has been implemented for this SQL statement. type: boolean isSqlProfileFindingPresent: description: Indicates whether a SQL Profile recommendation was reported for this SQL statement. type: boolean isStatsFindingPresent: description: Indicates whether a statistics recommendation was reported for this SQL statement. type: boolean isTimeoutFindingPresent: description: Indicates whether the task timed out. type: boolean parsingSchema: description: The parsing schema of the object. type: string perExecutionPercentage: description: The per-execution percentage benefit. type: integer sqlKey: description: The unique key of this SQL statement. type: string sqlText: description: The text of the SQL statement. type: string sqlTuningAdvisorTaskId: description: The unique identifier of the SQL Tuning Advisor task. This is not the [OCID](/Content/General/Concepts/identifiers.htm). format: int64 type: integer sqlTuningAdvisorTaskObjectExecutionId: description: The execution id of the analyzed SQL object. This is not the [OCID](/Content/General/Concepts/identifiers.htm). format: int64 type: integer sqlTuningAdvisorTaskObjectId: description: 'The key of the object to which these recommendations apply. This is not the [OCID](/Content/General/Concepts/identifiers.htm). ' format: int64 type: integer required: - sqlTuningAdvisorTaskId - sqlTuningAdvisorTaskObjectId - sqlTuningAdvisorTaskObjectExecutionId - parsingSchema - sqlText - sqlKey type: object SqlTuningAdvisorTaskSummaryReportStatementCounts: description: The number of statements in the SQL Tuning Advisor summary report. properties: distinctSql: description: The number of distinct SQL statements. type: integer errorCount: description: The number of distinct SQL statements with errors. type: integer findingCount: description: The number of distinct SQL statements with findings. type: integer totalSql: description: The total number of SQL statements. type: integer required: - distinctSql - totalSql - findingCount - errorCount type: object SqlTuningSetInput: description: The SQL tuning set for a SQL tuning task. properties: name: description: The name of the SQL tuning set. maxLength: 128 minLength: 1 type: string owner: description: The owner of the SQL tuning set. maxLength: 128 minLength: 1 type: string required: - name - owner type: object CreateSqlTuningSetDetails: description: 'Create an empty Sql tuning sets. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: credentialDetails: $ref: '#/components/schemas/SqlTuningSetAdminCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' description: description: The description of the Sql tuning set. type: string x-default-description: 'null' name: description: A unique Sql tuning set name. maxLength: 30 minLength: 1 type: string owner: default: 'null' description: Owner of the Sql tuning set. maxLength: 128 minLength: 1 type: string x-default-description: 'null' showSqlOnly: default: 0 description: 'Flag to indicate whether to create the Sql tuning set or just display the plsql used to create Sql tuning set. ' type: integer required: - name type: object SqlTuningTaskReturn: description: The returned object for starting or cloning a SQL tuning advisor task. properties: sqlTuningTaskId: description: 'The identifier of the task being started or cloned. This is not the [OCID](/Content/General/Concepts/identifiers.htm). It can be retrieved from the following endpoint [ListSqlTuningAdvisorTasks](#/en/database-management/latest/ManagedDatabase/ListSqlTuningAdvisorTasks). ' format: int64 type: integer required: - sqlTuningTaskId type: object SqlTuningAdvisorTaskSummaryReportTaskInfo: description: The general information regarding the SQL Tuning Advisor task. properties: description: description: The description of the SQL Tuning Advisor task. This is not defined for Auto SQL Tuning tasks. type: string id: description: The ID of the SQL Tuning Advisor task. This is not the [OCID](/Content/General/Concepts/identifiers.htm). format: int64 type: integer name: description: The name of the SQL Tuning Advisor task. type: string owner: description: The owner of the SQL Tuning Advisor task. type: string runningTime: description: The total running time in seconds. This is not defined for Auto SQL Tuning tasks. type: integer status: description: The status of the SQL Tuning Advisor task. This is not defined for Auto SQL Tuning tasks. enum: - COMPLETED - INITIAL - EXECUTING - INTERRUPTED - ERROR type: string x-obmcs-top-level-enum: '#/definitions/SqlTuningTaskStatusTypes' timeEnded: description: The end time of the task execution. format: date-time type: string timeStarted: description: The start time of the task execution. format: date-time type: string required: - id - name - owner - timeStarted - timeEnded type: object SqlTuningTaskPlanStats: description: 'The statistics of a SQL execution plan. ' properties: planStats: additionalProperties: format: double type: number description: 'A map contains the statistics for the SQL execution using the plan. The key of the map is the metric''s name. The value of the map is the metric''s value. ' type: object planStatus: description: 'The status of the execution using the plan. ' enum: - COMPLETE - PARTIAL type: string planType: description: The type of the original or modified plan with profile, index, and so on. type: string required: - planType - planStats - planStatus type: object SqlTuningAdvisorTaskFindingCollection: description: The list of findings for a SQL Tuning Advisor task. properties: items: description: An array of the findings for a tuning task. items: $ref: '#/components/schemas/SqlTuningAdvisorTaskFindingSummary' type: array required: - items type: object SqlTuningSetAdminCredentialDetails: description: The credential to connect to the database to perform Sql tuning set administration tasks. discriminator: propertyName: sqlTuningSetAdminCredentialType properties: role: description: The role of the database user. enum: - NORMAL - SYSDBA type: string sqlTuningSetAdminCredentialType: description: The type of the credential for Sql tuning set administration tasks. enum: - SECRET - PASSWORD type: string username: description: The user to connect to the database. maxLength: 128 minLength: 1 type: string required: - sqlTuningSetAdminCredentialType - username - role type: object SqlTuningTaskCredentialDetails: description: The credential used to connect to the database. discriminator: propertyName: sqlTuningTaskCredentialType properties: role: description: The role of the database user. enum: - NORMAL - SYSDBA type: string sqlTuningTaskCredentialType: description: The type of credential for the SQL tuning task. enum: - SECRET - PASSWORD type: string x-obmcs-top-level-enum: '#/definitions/SqlTuningTaskCredentialTypes' username: description: The user name used to connect to the database. type: string required: - sqlTuningTaskCredentialType - username - role type: object FetchSqlTuningSetDetails: description: 'The details required to fetch the Sql tuning set details. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: basicFilter: default: 'null' description: 'Specifies the Sql predicate to filter the Sql from the Sql tuning set defined on attributes of the SQLSET_ROW. User could use any combination of the following columns with appropriate values as Sql predicate Refer to the documentation https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_SQLTUNE.html#GUID-1F4AFB03-7B29-46FC-B3F2-CB01EC36326C ' type: string x-default-description: 'null' credentialDetails: $ref: '#/components/schemas/SqlTuningSetAdminCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' name: description: The name of the Sql tuning set. type: string owner: description: The owner of the Sql tuning set. type: string rankingMeasure1: default: 'null' description: 'Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures. ' enum: - ELAPSED_TIME - CPU_TIME - OPTIMIZER_COST - BUFFER_GETS - DISK_READS - DIRECT_WRITES type: string x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/RankingMeasure' rankingMeasure2: default: 'null' description: 'Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures. ' enum: - ELAPSED_TIME - CPU_TIME - OPTIMIZER_COST - BUFFER_GETS - DISK_READS - DIRECT_WRITES type: string x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/RankingMeasure' rankingMeasure3: default: 'null' description: 'Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures. ' enum: - ELAPSED_TIME - CPU_TIME - OPTIMIZER_COST - BUFFER_GETS - DISK_READS - DIRECT_WRITES type: string x-default-description: 'null' x-obmcs-top-level-enum: '#/definitions/RankingMeasure' recursiveSql: default: HAS_RECURSIVE_SQL description: Specifies that the filter must include recursive Sql in the Sql tuning set. enum: - HAS_RECURSIVE_SQL - NO_RECURSIVE_SQL type: string resultLimit: default: 0 description: The top limit Sql from the filtered source, ranked by the ranking measure. type: integer resultPercentage: default: 1.0 description: 'Specifies a filter that picks the top n% according to the supplied ranking measure. Note that this parameter applies only if one ranking measure is supplied. ' format: double type: number required: - owner - name type: object SqlTuningAdvisorTaskSummaryReport: description: The content of the SQL Tuning Advisor summary report. properties: indexFindings: description: The list of object findings related to indexes. items: $ref: '#/components/schemas/SqlTuningAdvisorTaskSummaryReportIndexFindingSummary' type: array objectStatFindings: description: The list of object findings related to statistics. items: $ref: '#/components/schemas/SqlTuningAdvisorTaskSummaryReportObjectStatFindingSummary' type: array statistics: $ref: '#/components/schemas/SqlTuningAdvisorTaskSummaryReportStatistics' taskInfo: $ref: '#/components/schemas/SqlTuningAdvisorTaskSummaryReportTaskInfo' required: - taskInfo - statistics type: object StartSqlTuningTaskDetails: description: 'The request to start a SQL tuning task. It takes either credentialDetails or databaseCredential. It''s recommended to provide databaseCredential ' properties: credentialDetails: $ref: '#/components/schemas/SqlTuningTaskCredentialDetails' databaseCredential: $ref: '#/components/schemas/DatabaseCredentialDetails' scope: description: 'The scope for the SQL tuning task. For LIMITED scope, the SQL profile recommendation is excluded, so the task is executed faster. For COMPREHENSIVE scope, the SQL profile recommendation is included. ' enum: - LIMITED - COMPREHENSIVE type: string sqlDetails: description: 'The details of the SQL statement on which tuning is performed. To obtain the details of the SQL statement, you must provide either the sqlTuningSet or the tuple of sqlDetails/timeStarted/timeEnded. ' items: $ref: '#/components/schemas/SqlTuningTaskSqlDetail' type: array sqlTuningSet: $ref: '#/components/schemas/SqlTuningSetInput' statementTimeLimitInMinutes: description: 'The time limit per SQL statement (in minutes). This is for a task with the COMPREHENSIVE scope. The time limit per SQL statement should not be more than the total time limit. ' type: integer taskDescription: description: The description of the SQL tuning task. type: string taskName: description: The name of the SQL tuning task. The name is unique per user in a database, and it is case-sensitive. type: string timeEnded: description: The end time of the period in which SQL statements are running. format: date-time type: string timeStarted: description: The start time of the period in which SQL statements are running. format: date-time type: string totalTimeLimitInMinutes: description: The time limit for running the SQL tuning task. type: integer required: - taskName - totalTimeLimitInMinutes - scope type: object responses: default: description: Unknown Error headers: opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' schema: type: string content: application/json: schema: $ref: '#/components/schemas/Error' x-anchors: x-headers: content-location: description: Content Location of the resource. format: uri-reference type: string etag: description: 'For optimistic concurrency control. See `if-match`. ' type: string location: description: Location of the resource. format: uri-reference type: string opc-next-page: description: 'For pagination of a list of items. When paging through a list, if this header appears in the response, then a partial list might have been returned. Include this value as the `page` parameter for the subsequent GET request to get the next batch of items. ' type: string opc-request-id: description: 'Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. ' type: string opc-work-request-id: description: 'Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. ' type: string x-properties: Sunset: description: 'Sunset date when this operation will stop working, in format, Fri, 29 Jan 2027 00:00:00 GMT. ' type: string cloudDbSystemConnectorCredentialName: description: 'The name of the credential information that used to connect to the DB system resource. The name should be in "x.y" format, where the length of "x" has a maximum of 64 characters, and length of "y" has a maximum of 199 characters. The name strings can contain letters, numbers and the underscore character only. Other characters are not valid, except for the "." character that separates the "x" and "y" portions of the name. *IMPORTANT* - The name must be unique within the OCI region the credential is being created in. If you specify a name that duplicates the name of another credential within the same OCI region, you may overwrite or corrupt the credential that is already using the name. For example: inventorydb.abc112233445566778899 ' maxLength: 255 minLength: 1 type: string definedTags: additionalProperties: additionalProperties: description: 'The value of the tag. Only the String type is supported. ' type: object description: 'Key-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"CostCenter": "42"}` ' type: object description: 'Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: `{"Operations": {"CostCenter": "42"}}` ' type: object externalDbSystemConnectorCredentialName: description: 'The name of the credential information that used to connect to the DB system resource. The name should be in "x.y" format, where the length of "x" has a maximum of 64 characters, and length of "y" has a maximum of 199 characters. The name strings can contain letters, numbers and the underscore character only. Other characters are not valid, except for the "." character that separates the "x" and "y" portions of the name. *IMPORTANT* - The name must be unique within the OCI region the credential is being created in. If you specify a name that duplicates the name of another credential within the same OCI region, you may overwrite or corrupt the credential that is already using the name. For example: inventorydb.abc112233445566778899 ' maxLength: 255 minLength: 1 type: string externalLicenseModel: description: 'The Oracle license model that applies to the external database. ' enum: - LICENSE_INCLUDED - BRING_YOUR_OWN_LICENSE type: string freeformTags: additionalProperties: type: string description: 'Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` ' type: object licenseModel: description: 'The Oracle license model that applies to the database management resources. ' enum: - LICENSE_INCLUDED - BRING_YOUR_OWN_LICENSE type: string lifecycleState: description: The current lifecycle state of the database resource. enum: - CREATING - ACTIVE - INACTIVE - UPDATING - DELETING - DELETED - FAILED type: string securityAttributes: additionalProperties: additionalProperties: description: 'Attribute value and mode. Only the String type is supported for value. Mode is currently always "enforce". ' type: object description: 'Key-value pair representing a security attribute key and value, scoped to a namespace. Example: `{"MaxEgressCount": {"value": "42", "mode": "enforce"}}` ' type: object description: 'Security attributes for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "enforce"}}}` ' type: object systemTags: additionalProperties: additionalProperties: description: 'The value of the tag. Only string, integer and boolean types are supported. ' type: object description: 'Key-value pair representing a defined tag key and value, scoped to a namespace. Example: `{"free-tier-retained": "true"}` ' type: object description: 'System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). System tags can be viewed by users, but can only be created by the system. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` ' type: object x-oracle-package: com.oracle.oci.dpd.dbmgmt