1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getManagedDatabaseSqlTuningAdvisorTasksRecommendation
Oracle Cloud Infrastructure v2.28.0 published on Thursday, Mar 27, 2025 by Pulumi

oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTasksRecommendation

Explore with Pulumi AI

This data source provides details about a specific Managed Database Sql Tuning Advisor Tasks Recommendation resource in Oracle Cloud Infrastructure Database Management service.

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.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagedDatabaseSqlTuningAdvisorTasksRecommendation = oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTasksRecommendation({
    executionId: testExecution.id,
    managedDatabaseId: testManagedDatabase.id,
    sqlObjectId: testObject.id,
    sqlTuningAdvisorTaskId: testSqlTuningAdvisorTask.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_managed_database_sql_tuning_advisor_tasks_recommendation = oci.DatabaseManagement.get_managed_database_sql_tuning_advisor_tasks_recommendation(execution_id=test_execution["id"],
    managed_database_id=test_managed_database["id"],
    sql_object_id=test_object["id"],
    sql_tuning_advisor_task_id=test_sql_tuning_advisor_task["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/databasemanagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databasemanagement.GetManagedDatabaseSqlTuningAdvisorTasksRecommendation(ctx, &databasemanagement.GetManagedDatabaseSqlTuningAdvisorTasksRecommendationArgs{
			ExecutionId:            testExecution.Id,
			ManagedDatabaseId:      testManagedDatabase.Id,
			SqlObjectId:            testObject.Id,
			SqlTuningAdvisorTaskId: testSqlTuningAdvisorTask.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testManagedDatabaseSqlTuningAdvisorTasksRecommendation = Oci.DatabaseManagement.GetManagedDatabaseSqlTuningAdvisorTasksRecommendation.Invoke(new()
    {
        ExecutionId = testExecution.Id,
        ManagedDatabaseId = testManagedDatabase.Id,
        SqlObjectId = testObject.Id,
        SqlTuningAdvisorTaskId = testSqlTuningAdvisorTask.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DatabaseManagement.DatabaseManagementFunctions;
import com.pulumi.oci.DatabaseManagement.inputs.GetManagedDatabaseSqlTuningAdvisorTasksRecommendationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testManagedDatabaseSqlTuningAdvisorTasksRecommendation = DatabaseManagementFunctions.getManagedDatabaseSqlTuningAdvisorTasksRecommendation(GetManagedDatabaseSqlTuningAdvisorTasksRecommendationArgs.builder()
            .executionId(testExecution.id())
            .managedDatabaseId(testManagedDatabase.id())
            .sqlObjectId(testObject.id())
            .sqlTuningAdvisorTaskId(testSqlTuningAdvisorTask.id())
            .build());

    }
}
Copy
variables:
  testManagedDatabaseSqlTuningAdvisorTasksRecommendation:
    fn::invoke:
      function: oci:DatabaseManagement:getManagedDatabaseSqlTuningAdvisorTasksRecommendation
      arguments:
        executionId: ${testExecution.id}
        managedDatabaseId: ${testManagedDatabase.id}
        sqlObjectId: ${testObject.id}
        sqlTuningAdvisorTaskId: ${testSqlTuningAdvisorTask.id}
Copy

Using getManagedDatabaseSqlTuningAdvisorTasksRecommendation

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getManagedDatabaseSqlTuningAdvisorTasksRecommendation(args: GetManagedDatabaseSqlTuningAdvisorTasksRecommendationArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResult>
function getManagedDatabaseSqlTuningAdvisorTasksRecommendationOutput(args: GetManagedDatabaseSqlTuningAdvisorTasksRecommendationOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResult>
Copy
def get_managed_database_sql_tuning_advisor_tasks_recommendation(execution_id: Optional[str] = None,
                                                                 managed_database_id: Optional[str] = None,
                                                                 sql_object_id: Optional[str] = None,
                                                                 sql_tuning_advisor_task_id: Optional[str] = None,
                                                                 opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResult
def get_managed_database_sql_tuning_advisor_tasks_recommendation_output(execution_id: Optional[pulumi.Input[str]] = None,
                                                                 managed_database_id: Optional[pulumi.Input[str]] = None,
                                                                 sql_object_id: Optional[pulumi.Input[str]] = None,
                                                                 sql_tuning_advisor_task_id: Optional[pulumi.Input[str]] = None,
                                                                 opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResult]
Copy
func GetManagedDatabaseSqlTuningAdvisorTasksRecommendation(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTasksRecommendationArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResult, error)
func GetManagedDatabaseSqlTuningAdvisorTasksRecommendationOutput(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTasksRecommendationOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResultOutput
Copy

> Note: This function is named GetManagedDatabaseSqlTuningAdvisorTasksRecommendation in the Go SDK.

public static class GetManagedDatabaseSqlTuningAdvisorTasksRecommendation 
{
    public static Task<GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResult> InvokeAsync(GetManagedDatabaseSqlTuningAdvisorTasksRecommendationArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResult> Invoke(GetManagedDatabaseSqlTuningAdvisorTasksRecommendationInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResult> getManagedDatabaseSqlTuningAdvisorTasksRecommendation(GetManagedDatabaseSqlTuningAdvisorTasksRecommendationArgs args, InvokeOptions options)
public static Output<GetManagedDatabaseSqlTuningAdvisorTasksRecommendationResult> getManagedDatabaseSqlTuningAdvisorTasksRecommendation(GetManagedDatabaseSqlTuningAdvisorTasksRecommendationArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DatabaseManagement/getManagedDatabaseSqlTuningAdvisorTasksRecommendation:getManagedDatabaseSqlTuningAdvisorTasksRecommendation
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ExecutionId This property is required. string
The execution ID for an execution of a SQL tuning task. This is not the OCID.
ManagedDatabaseId This property is required. string
The OCID of the Managed Database.
SqlObjectId This property is required. string
The SQL object ID for the SQL tuning task. This is not the OCID.
SqlTuningAdvisorTaskId This property is required. string
The SQL tuning task identifier. This is not the OCID.
ExecutionId This property is required. string
The execution ID for an execution of a SQL tuning task. This is not the OCID.
ManagedDatabaseId This property is required. string
The OCID of the Managed Database.
SqlObjectId This property is required. string
The SQL object ID for the SQL tuning task. This is not the OCID.
SqlTuningAdvisorTaskId This property is required. string
The SQL tuning task identifier. This is not the OCID.
executionId This property is required. String
The execution ID for an execution of a SQL tuning task. This is not the OCID.
managedDatabaseId This property is required. String
The OCID of the Managed Database.
sqlObjectId This property is required. String
The SQL object ID for the SQL tuning task. This is not the OCID.
sqlTuningAdvisorTaskId This property is required. String
The SQL tuning task identifier. This is not the OCID.
executionId This property is required. string
The execution ID for an execution of a SQL tuning task. This is not the OCID.
managedDatabaseId This property is required. string
The OCID of the Managed Database.
sqlObjectId This property is required. string
The SQL object ID for the SQL tuning task. This is not the OCID.
sqlTuningAdvisorTaskId This property is required. string
The SQL tuning task identifier. This is not the OCID.
execution_id This property is required. str
The execution ID for an execution of a SQL tuning task. This is not the OCID.
managed_database_id This property is required. str
The OCID of the Managed Database.
sql_object_id This property is required. str
The SQL object ID for the SQL tuning task. This is not the OCID.
sql_tuning_advisor_task_id This property is required. str
The SQL tuning task identifier. This is not the OCID.
executionId This property is required. String
The execution ID for an execution of a SQL tuning task. This is not the OCID.
managedDatabaseId This property is required. String
The OCID of the Managed Database.
sqlObjectId This property is required. String
The SQL object ID for the SQL tuning task. This is not the OCID.
sqlTuningAdvisorTaskId This property is required. String
The SQL tuning task identifier. This is not the OCID.

getManagedDatabaseSqlTuningAdvisorTasksRecommendation Result

The following output properties are available:

ExecutionId string
Id string
The provider-assigned unique ID for this managed resource.
Items List<GetManagedDatabaseSqlTuningAdvisorTasksRecommendationItem>
A list of SQL Tuning Advisor recommendations.
ManagedDatabaseId string
SqlObjectId string
SqlTuningAdvisorTaskId string
The unique identifier of the task. This is not the OCID.
ExecutionId string
Id string
The provider-assigned unique ID for this managed resource.
Items []GetManagedDatabaseSqlTuningAdvisorTasksRecommendationItem
A list of SQL Tuning Advisor recommendations.
ManagedDatabaseId string
SqlObjectId string
SqlTuningAdvisorTaskId string
The unique identifier of the task. This is not the OCID.
executionId String
id String
The provider-assigned unique ID for this managed resource.
items List<GetManagedDatabaseSqlTuningAdvisorTasksRecommendationItem>
A list of SQL Tuning Advisor recommendations.
managedDatabaseId String
sqlObjectId String
sqlTuningAdvisorTaskId String
The unique identifier of the task. This is not the OCID.
executionId string
id string
The provider-assigned unique ID for this managed resource.
items GetManagedDatabaseSqlTuningAdvisorTasksRecommendationItem[]
A list of SQL Tuning Advisor recommendations.
managedDatabaseId string
sqlObjectId string
sqlTuningAdvisorTaskId string
The unique identifier of the task. This is not the OCID.
execution_id str
id str
The provider-assigned unique ID for this managed resource.
items Sequence[databasemanagement.GetManagedDatabaseSqlTuningAdvisorTasksRecommendationItem]
A list of SQL Tuning Advisor recommendations.
managed_database_id str
sql_object_id str
sql_tuning_advisor_task_id str
The unique identifier of the task. This is not the OCID.
executionId String
id String
The provider-assigned unique ID for this managed resource.
items List<Property Map>
A list of SQL Tuning Advisor recommendations.
managedDatabaseId String
sqlObjectId String
sqlTuningAdvisorTaskId String
The unique identifier of the task. This is not the OCID.

Supporting Types

GetManagedDatabaseSqlTuningAdvisorTasksRecommendationItem

Benefit This property is required. double
The percentage benefit of this implementation.
Finding This property is required. string
Summary of the issue found in the SQL statement.
ImplementActionSql This property is required. string
Action sql to be implemented based on the recommendation result.
IsParallelExecution This property is required. bool
Indicates whether a SQL Profile recommendation uses parallel execution.
Rationale This property is required. string
Describes the reasoning behind the recommendation and how it relates to the finding.
Recommendation This property is required. string
The recommendation for a specific finding.
RecommendationKey This property is required. int
The unique identifier of the recommendation in the scope of the task.
RecommendationType This property is required. string
Type of recommendation.
SqlTuningAdvisorTaskId This property is required. string
The SQL tuning task identifier. This is not the OCID.
SqlTuningAdvisorTaskObjectId This property is required. string
The key of the object to which these recommendations apply. This is not the OCID.
Benefit This property is required. float64
The percentage benefit of this implementation.
Finding This property is required. string
Summary of the issue found in the SQL statement.
ImplementActionSql This property is required. string
Action sql to be implemented based on the recommendation result.
IsParallelExecution This property is required. bool
Indicates whether a SQL Profile recommendation uses parallel execution.
Rationale This property is required. string
Describes the reasoning behind the recommendation and how it relates to the finding.
Recommendation This property is required. string
The recommendation for a specific finding.
RecommendationKey This property is required. int
The unique identifier of the recommendation in the scope of the task.
RecommendationType This property is required. string
Type of recommendation.
SqlTuningAdvisorTaskId This property is required. string
The SQL tuning task identifier. This is not the OCID.
SqlTuningAdvisorTaskObjectId This property is required. string
The key of the object to which these recommendations apply. This is not the OCID.
benefit This property is required. Double
The percentage benefit of this implementation.
finding This property is required. String
Summary of the issue found in the SQL statement.
implementActionSql This property is required. String
Action sql to be implemented based on the recommendation result.
isParallelExecution This property is required. Boolean
Indicates whether a SQL Profile recommendation uses parallel execution.
rationale This property is required. String
Describes the reasoning behind the recommendation and how it relates to the finding.
recommendation This property is required. String
The recommendation for a specific finding.
recommendationKey This property is required. Integer
The unique identifier of the recommendation in the scope of the task.
recommendationType This property is required. String
Type of recommendation.
sqlTuningAdvisorTaskId This property is required. String
The SQL tuning task identifier. This is not the OCID.
sqlTuningAdvisorTaskObjectId This property is required. String
The key of the object to which these recommendations apply. This is not the OCID.
benefit This property is required. number
The percentage benefit of this implementation.
finding This property is required. string
Summary of the issue found in the SQL statement.
implementActionSql This property is required. string
Action sql to be implemented based on the recommendation result.
isParallelExecution This property is required. boolean
Indicates whether a SQL Profile recommendation uses parallel execution.
rationale This property is required. string
Describes the reasoning behind the recommendation and how it relates to the finding.
recommendation This property is required. string
The recommendation for a specific finding.
recommendationKey This property is required. number
The unique identifier of the recommendation in the scope of the task.
recommendationType This property is required. string
Type of recommendation.
sqlTuningAdvisorTaskId This property is required. string
The SQL tuning task identifier. This is not the OCID.
sqlTuningAdvisorTaskObjectId This property is required. string
The key of the object to which these recommendations apply. This is not the OCID.
benefit This property is required. float
The percentage benefit of this implementation.
finding This property is required. str
Summary of the issue found in the SQL statement.
implement_action_sql This property is required. str
Action sql to be implemented based on the recommendation result.
is_parallel_execution This property is required. bool
Indicates whether a SQL Profile recommendation uses parallel execution.
rationale This property is required. str
Describes the reasoning behind the recommendation and how it relates to the finding.
recommendation This property is required. str
The recommendation for a specific finding.
recommendation_key This property is required. int
The unique identifier of the recommendation in the scope of the task.
recommendation_type This property is required. str
Type of recommendation.
sql_tuning_advisor_task_id This property is required. str
The SQL tuning task identifier. This is not the OCID.
sql_tuning_advisor_task_object_id This property is required. str
The key of the object to which these recommendations apply. This is not the OCID.
benefit This property is required. Number
The percentage benefit of this implementation.
finding This property is required. String
Summary of the issue found in the SQL statement.
implementActionSql This property is required. String
Action sql to be implemented based on the recommendation result.
isParallelExecution This property is required. Boolean
Indicates whether a SQL Profile recommendation uses parallel execution.
rationale This property is required. String
Describes the reasoning behind the recommendation and how it relates to the finding.
recommendation This property is required. String
The recommendation for a specific finding.
recommendationKey This property is required. Number
The unique identifier of the recommendation in the scope of the task.
recommendationType This property is required. String
Type of recommendation.
sqlTuningAdvisorTaskId This property is required. String
The SQL tuning task identifier. This is not the OCID.
sqlTuningAdvisorTaskObjectId This property is required. String
The key of the object to which these recommendations apply. This is not the OCID.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.