1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

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

    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.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision = oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison({
        executionId: testExecution.id,
        managedDatabaseId: testManagedDatabase.id,
        sqlObjectId: testObject.id,
        sqlTuningAdvisorTaskId: testSqlTuningAdvisorTask.id,
        opcNamedCredentialId: managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparision = oci.DatabaseManagement.get_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparison(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"],
        opc_named_credential_id=managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparision_opc_named_credential_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DatabaseManagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DatabaseManagement.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(ctx, &databasemanagement.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs{
    			ExecutionId:            testExecution.Id,
    			ManagedDatabaseId:      testManagedDatabase.Id,
    			SqlObjectId:            testObject.Id,
    			SqlTuningAdvisorTaskId: testSqlTuningAdvisorTask.Id,
    			OpcNamedCredentialId:   pulumi.StringRef(managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision = Oci.DatabaseManagement.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison.Invoke(new()
        {
            ExecutionId = testExecution.Id,
            ManagedDatabaseId = testManagedDatabase.Id,
            SqlObjectId = testObject.Id,
            SqlTuningAdvisorTaskId = testSqlTuningAdvisorTask.Id,
            OpcNamedCredentialId = managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId,
        });
    
    });
    
    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.GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs;
    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 testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision = DatabaseManagementFunctions.getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs.builder()
                .executionId(testExecution.id())
                .managedDatabaseId(testManagedDatabase.id())
                .sqlObjectId(testObject.id())
                .sqlTuningAdvisorTaskId(testSqlTuningAdvisorTask.id())
                .opcNamedCredentialId(managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId)
                .build());
    
        }
    }
    
    variables:
      testManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparision:
        fn::invoke:
          Function: oci:DatabaseManagement:getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
          Arguments:
            executionId: ${testExecution.id}
            managedDatabaseId: ${testManagedDatabase.id}
            sqlObjectId: ${testObject.id}
            sqlTuningAdvisorTaskId: ${testSqlTuningAdvisorTask.id}
            opcNamedCredentialId: ${managedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisionOpcNamedCredentialId}
    

    Using getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison

    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 getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(args: GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult>
    function getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutput(args: GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult>
    def get_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparison(execution_id: Optional[str] = None,
                                                                                      managed_database_id: Optional[str] = None,
                                                                                      opc_named_credential_id: Optional[str] = None,
                                                                                      sql_object_id: Optional[str] = None,
                                                                                      sql_tuning_advisor_task_id: Optional[str] = None,
                                                                                      opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult
    def get_managed_database_sql_tuning_advisor_tasks_execution_plan_stats_comparison_output(execution_id: Optional[pulumi.Input[str]] = None,
                                                                                      managed_database_id: Optional[pulumi.Input[str]] = None,
                                                                                      opc_named_credential_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[GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult]
    func GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult, error)
    func GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutput(ctx *Context, args *GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResultOutput

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

    public static class GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison 
    {
        public static Task<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> InvokeAsync(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs args, InvokeOptions? opts = null)
        public static Output<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> Invoke(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DatabaseManagement/getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison:getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison Result

    The following output properties are available:

    ExecutionId string
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    Modifieds List<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified>
    The statistics of a SQL execution plan.
    Originals List<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal>
    The statistics of a SQL execution plan.
    SqlObjectId string
    SqlTuningAdvisorTaskId string
    OpcNamedCredentialId string
    ExecutionId string
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedDatabaseId string
    Modifieds []GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified
    The statistics of a SQL execution plan.
    Originals []GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal
    The statistics of a SQL execution plan.
    SqlObjectId string
    SqlTuningAdvisorTaskId string
    OpcNamedCredentialId string
    executionId String
    id String
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId String
    modifieds List<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified>
    The statistics of a SQL execution plan.
    originals List<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal>
    The statistics of a SQL execution plan.
    sqlObjectId String
    sqlTuningAdvisorTaskId String
    opcNamedCredentialId String
    executionId string
    id string
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId string
    modifieds GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified[]
    The statistics of a SQL execution plan.
    originals GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal[]
    The statistics of a SQL execution plan.
    sqlObjectId string
    sqlTuningAdvisorTaskId string
    opcNamedCredentialId string
    executionId String
    id String
    The provider-assigned unique ID for this managed resource.
    managedDatabaseId String
    modifieds List<Property Map>
    The statistics of a SQL execution plan.
    originals List<Property Map>
    The statistics of a SQL execution plan.
    sqlObjectId String
    sqlTuningAdvisorTaskId String
    opcNamedCredentialId String

    Supporting Types

    GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified

    PlanStats Dictionary<string, object>
    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.
    PlanStatus string
    The status of the execution using the plan.
    PlanType string
    The type of the original or modified plan with profile, index, and so on.
    PlanStats map[string]interface{}
    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.
    PlanStatus string
    The status of the execution using the plan.
    PlanType string
    The type of the original or modified plan with profile, index, and so on.
    planStats Map<String,Object>
    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.
    planStatus String
    The status of the execution using the plan.
    planType String
    The type of the original or modified plan with profile, index, and so on.
    planStats {[key: string]: any}
    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.
    planStatus string
    The status of the execution using the plan.
    planType string
    The type of the original or modified plan with profile, index, and so on.
    plan_stats Mapping[str, Any]
    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.
    plan_status str
    The status of the execution using the plan.
    plan_type str
    The type of the original or modified plan with profile, index, and so on.
    planStats Map<Any>
    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.
    planStatus String
    The status of the execution using the plan.
    planType String
    The type of the original or modified plan with profile, index, and so on.

    GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonOriginal

    PlanStats Dictionary<string, object>
    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.
    PlanStatus string
    The status of the execution using the plan.
    PlanType string
    The type of the original or modified plan with profile, index, and so on.
    PlanStats map[string]interface{}
    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.
    PlanStatus string
    The status of the execution using the plan.
    PlanType string
    The type of the original or modified plan with profile, index, and so on.
    planStats Map<String,Object>
    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.
    planStatus String
    The status of the execution using the plan.
    planType String
    The type of the original or modified plan with profile, index, and so on.
    planStats {[key: string]: any}
    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.
    planStatus string
    The status of the execution using the plan.
    planType string
    The type of the original or modified plan with profile, index, and so on.
    plan_stats Mapping[str, Any]
    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.
    plan_status str
    The status of the execution using the plan.
    plan_type str
    The type of the original or modified plan with profile, index, and so on.
    planStats Map<Any>
    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.
    planStatus String
    The status of the execution using the plan.
    planType String
    The type of the original or modified plan with profile, index, and so on.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi