oci.DatabaseManagement.getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
Explore with Pulumi AI
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/v2/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)
public static Output<GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonResult> getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison(GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DatabaseManagement/getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison:getManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparison
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ExecutionId string
- The execution ID for an execution of a SQL tuning task. This is not the OCID.
- ManagedDatabase stringId 
- The OCID of the Managed Database.
- SqlObject stringId 
- The SQL object ID for the SQL tuning task. This is not the OCID.
- SqlTuning stringAdvisor Task Id 
- The SQL tuning task identifier. This is not the OCID.
- OpcNamed stringCredential Id 
- The OCID of the Named Credential.
- ExecutionId string
- The execution ID for an execution of a SQL tuning task. This is not the OCID.
- ManagedDatabase stringId 
- The OCID of the Managed Database.
- SqlObject stringId 
- The SQL object ID for the SQL tuning task. This is not the OCID.
- SqlTuning stringAdvisor Task Id 
- The SQL tuning task identifier. This is not the OCID.
- OpcNamed stringCredential Id 
- The OCID of the Named Credential.
- executionId String
- The execution ID for an execution of a SQL tuning task. This is not the OCID.
- managedDatabase StringId 
- The OCID of the Managed Database.
- sqlObject StringId 
- The SQL object ID for the SQL tuning task. This is not the OCID.
- sqlTuning StringAdvisor Task Id 
- The SQL tuning task identifier. This is not the OCID.
- opcNamed StringCredential Id 
- The OCID of the Named Credential.
- executionId string
- The execution ID for an execution of a SQL tuning task. This is not the OCID.
- managedDatabase stringId 
- The OCID of the Managed Database.
- sqlObject stringId 
- The SQL object ID for the SQL tuning task. This is not the OCID.
- sqlTuning stringAdvisor Task Id 
- The SQL tuning task identifier. This is not the OCID.
- opcNamed stringCredential Id 
- 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_ strid 
- The OCID of the Managed Database.
- sql_object_ strid 
- The SQL object ID for the SQL tuning task. This is not the OCID.
- sql_tuning_ stradvisor_ task_ id 
- The SQL tuning task identifier. This is not the OCID.
- opc_named_ strcredential_ id 
- The OCID of the Named Credential.
- executionId String
- The execution ID for an execution of a SQL tuning task. This is not the OCID.
- managedDatabase StringId 
- The OCID of the Managed Database.
- sqlObject StringId 
- The SQL object ID for the SQL tuning task. This is not the OCID.
- sqlTuning StringAdvisor Task Id 
- The SQL tuning task identifier. This is not the OCID.
- opcNamed StringCredential Id 
- 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.
- ManagedDatabase stringId 
- Modifieds
List<GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified> 
- The statistics of a SQL execution plan.
- Originals
List<GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original> 
- The statistics of a SQL execution plan.
- SqlObject stringId 
- SqlTuning stringAdvisor Task Id 
- OpcNamed stringCredential Id 
- ExecutionId string
- Id string
- The provider-assigned unique ID for this managed resource.
- ManagedDatabase stringId 
- Modifieds
[]GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified 
- The statistics of a SQL execution plan.
- Originals
[]GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original 
- The statistics of a SQL execution plan.
- SqlObject stringId 
- SqlTuning stringAdvisor Task Id 
- OpcNamed stringCredential Id 
- executionId String
- id String
- The provider-assigned unique ID for this managed resource.
- managedDatabase StringId 
- modifieds
List<GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified> 
- The statistics of a SQL execution plan.
- originals
List<GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original> 
- The statistics of a SQL execution plan.
- sqlObject StringId 
- sqlTuning StringAdvisor Task Id 
- opcNamed StringCredential Id 
- executionId string
- id string
- The provider-assigned unique ID for this managed resource.
- managedDatabase stringId 
- modifieds
GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified[] 
- The statistics of a SQL execution plan.
- originals
GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original[] 
- The statistics of a SQL execution plan.
- sqlObject stringId 
- sqlTuning stringAdvisor Task Id 
- opcNamed stringCredential Id 
- execution_id str
- id str
- The provider-assigned unique ID for this managed resource.
- managed_database_ strid 
- modifieds
Sequence[GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Modified] 
- The statistics of a SQL execution plan.
- originals
Sequence[GetManaged Database Sql Tuning Advisor Tasks Execution Plan Stats Comparison Original] 
- The statistics of a SQL execution plan.
- sql_object_ strid 
- sql_tuning_ stradvisor_ task_ id 
- opc_named_ strcredential_ id 
- executionId String
- id String
- The provider-assigned unique ID for this managed resource.
- managedDatabase StringId 
- modifieds List<Property Map>
- The statistics of a SQL execution plan.
- originals List<Property Map>
- The statistics of a SQL execution plan.
- sqlObject StringId 
- sqlTuning StringAdvisor Task Id 
- opcNamed StringCredential Id 
Supporting Types
GetManagedDatabaseSqlTuningAdvisorTasksExecutionPlanStatsComparisonModified           
- PlanStats Dictionary<string, string>
- 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]string
- 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,String>
- 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]: string}
- 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, str]
- 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<String>
- 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, string>
- 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]string
- 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,String>
- 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]: string}
- 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, str]
- 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<String>
- 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 ociTerraform Provider.