1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getManagedDatabaseSqlPlanBaselineConfiguration
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.DatabaseManagement.getManagedDatabaseSqlPlanBaselineConfiguration

Explore with Pulumi AI

This data source provides details about a specific Managed Database Sql Plan Baseline Configuration resource in Oracle Cloud Infrastructure Database Management service.

Gets the configuration details of SQL plan baselines for the specified Managed Database. The details include the settings for the capture and use of SQL plan baselines, SPM Evolve Advisor task, and SQL Management Base.

Example Usage

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

const testManagedDatabaseSqlPlanBaselineConfiguration = oci.DatabaseManagement.getManagedDatabaseSqlPlanBaselineConfiguration({
    managedDatabaseId: testManagedDatabase.id,
    opcNamedCredentialId: managedDatabaseSqlPlanBaselineConfigurationOpcNamedCredentialId,
});
Copy
import pulumi
import pulumi_oci as oci

test_managed_database_sql_plan_baseline_configuration = oci.DatabaseManagement.get_managed_database_sql_plan_baseline_configuration(managed_database_id=test_managed_database["id"],
    opc_named_credential_id=managed_database_sql_plan_baseline_configuration_opc_named_credential_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.GetManagedDatabaseSqlPlanBaselineConfiguration(ctx, &databasemanagement.GetManagedDatabaseSqlPlanBaselineConfigurationArgs{
			ManagedDatabaseId:    testManagedDatabase.Id,
			OpcNamedCredentialId: pulumi.StringRef(managedDatabaseSqlPlanBaselineConfigurationOpcNamedCredentialId),
		}, 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 testManagedDatabaseSqlPlanBaselineConfiguration = Oci.DatabaseManagement.GetManagedDatabaseSqlPlanBaselineConfiguration.Invoke(new()
    {
        ManagedDatabaseId = testManagedDatabase.Id,
        OpcNamedCredentialId = managedDatabaseSqlPlanBaselineConfigurationOpcNamedCredentialId,
    });

});
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.GetManagedDatabaseSqlPlanBaselineConfigurationArgs;
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 testManagedDatabaseSqlPlanBaselineConfiguration = DatabaseManagementFunctions.getManagedDatabaseSqlPlanBaselineConfiguration(GetManagedDatabaseSqlPlanBaselineConfigurationArgs.builder()
            .managedDatabaseId(testManagedDatabase.id())
            .opcNamedCredentialId(managedDatabaseSqlPlanBaselineConfigurationOpcNamedCredentialId)
            .build());

    }
}
Copy
variables:
  testManagedDatabaseSqlPlanBaselineConfiguration:
    fn::invoke:
      function: oci:DatabaseManagement:getManagedDatabaseSqlPlanBaselineConfiguration
      arguments:
        managedDatabaseId: ${testManagedDatabase.id}
        opcNamedCredentialId: ${managedDatabaseSqlPlanBaselineConfigurationOpcNamedCredentialId}
Copy

Using getManagedDatabaseSqlPlanBaselineConfiguration

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 getManagedDatabaseSqlPlanBaselineConfiguration(args: GetManagedDatabaseSqlPlanBaselineConfigurationArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseSqlPlanBaselineConfigurationResult>
function getManagedDatabaseSqlPlanBaselineConfigurationOutput(args: GetManagedDatabaseSqlPlanBaselineConfigurationOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseSqlPlanBaselineConfigurationResult>
Copy
def get_managed_database_sql_plan_baseline_configuration(managed_database_id: Optional[str] = None,
                                                         opc_named_credential_id: Optional[str] = None,
                                                         opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseSqlPlanBaselineConfigurationResult
def get_managed_database_sql_plan_baseline_configuration_output(managed_database_id: Optional[pulumi.Input[str]] = None,
                                                         opc_named_credential_id: Optional[pulumi.Input[str]] = None,
                                                         opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseSqlPlanBaselineConfigurationResult]
Copy
func GetManagedDatabaseSqlPlanBaselineConfiguration(ctx *Context, args *GetManagedDatabaseSqlPlanBaselineConfigurationArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlPlanBaselineConfigurationResult, error)
func GetManagedDatabaseSqlPlanBaselineConfigurationOutput(ctx *Context, args *GetManagedDatabaseSqlPlanBaselineConfigurationOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlPlanBaselineConfigurationResultOutput
Copy

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

public static class GetManagedDatabaseSqlPlanBaselineConfiguration 
{
    public static Task<GetManagedDatabaseSqlPlanBaselineConfigurationResult> InvokeAsync(GetManagedDatabaseSqlPlanBaselineConfigurationArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseSqlPlanBaselineConfigurationResult> Invoke(GetManagedDatabaseSqlPlanBaselineConfigurationInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetManagedDatabaseSqlPlanBaselineConfigurationResult> getManagedDatabaseSqlPlanBaselineConfiguration(GetManagedDatabaseSqlPlanBaselineConfigurationArgs args, InvokeOptions options)
public static Output<GetManagedDatabaseSqlPlanBaselineConfigurationResult> getManagedDatabaseSqlPlanBaselineConfiguration(GetManagedDatabaseSqlPlanBaselineConfigurationArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DatabaseManagement/getManagedDatabaseSqlPlanBaselineConfiguration:getManagedDatabaseSqlPlanBaselineConfiguration
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ManagedDatabaseId This property is required. string
The OCID of the Managed Database.
OpcNamedCredentialId string
The OCID of the Named Credential.
ManagedDatabaseId This property is required. string
The OCID of the Managed Database.
OpcNamedCredentialId string
The OCID of the Named Credential.
managedDatabaseId This property is required. String
The OCID of the Managed Database.
opcNamedCredentialId String
The OCID of the Named Credential.
managedDatabaseId This property is required. string
The OCID of the Managed Database.
opcNamedCredentialId string
The OCID of the Named Credential.
managed_database_id This property is required. str
The OCID of the Managed Database.
opc_named_credential_id str
The OCID of the Named Credential.
managedDatabaseId This property is required. String
The OCID of the Managed Database.
opcNamedCredentialId String
The OCID of the Named Credential.

getManagedDatabaseSqlPlanBaselineConfiguration Result

The following output properties are available:

AutoCaptureFilters List<GetManagedDatabaseSqlPlanBaselineConfigurationAutoCaptureFilter>
The capture filters used in automatic initial plan capture.
AutoSpmEvolveTaskParameters List<GetManagedDatabaseSqlPlanBaselineConfigurationAutoSpmEvolveTaskParameter>
The set of parameters used in an SPM evolve task.
Id string
The provider-assigned unique ID for this managed resource.
IsAutoSpmEvolveTaskEnabled bool
Indicates whether the Automatic SPM Evolve Advisor task is enabled (true) or not (false).
IsAutomaticInitialPlanCaptureEnabled bool
Indicates whether the automatic capture of SQL plan baselines is enabled (true) or not (false).
IsHighFrequencyAutoSpmEvolveTaskEnabled bool
Indicates whether the high frequency Automatic SPM Evolve Advisor task is enabled (true) or not (false).
IsSqlPlanBaselinesUsageEnabled bool
Indicates whether the database uses SQL plan baselines (true) or not (false).
ManagedDatabaseId string
PlanRetentionWeeks int
The number of weeks to retain unused plans before they are purged.
SpaceBudgetMb double
The maximum SYSAUX space that can be used for SQL Management Base in MB.
SpaceBudgetPercent double
The maximum percent of SYSAUX space that can be used for SQL Management Base.
SpaceUsedMb double
The space used by SQL Management Base in MB.
OpcNamedCredentialId string
AutoCaptureFilters []GetManagedDatabaseSqlPlanBaselineConfigurationAutoCaptureFilter
The capture filters used in automatic initial plan capture.
AutoSpmEvolveTaskParameters []GetManagedDatabaseSqlPlanBaselineConfigurationAutoSpmEvolveTaskParameter
The set of parameters used in an SPM evolve task.
Id string
The provider-assigned unique ID for this managed resource.
IsAutoSpmEvolveTaskEnabled bool
Indicates whether the Automatic SPM Evolve Advisor task is enabled (true) or not (false).
IsAutomaticInitialPlanCaptureEnabled bool
Indicates whether the automatic capture of SQL plan baselines is enabled (true) or not (false).
IsHighFrequencyAutoSpmEvolveTaskEnabled bool
Indicates whether the high frequency Automatic SPM Evolve Advisor task is enabled (true) or not (false).
IsSqlPlanBaselinesUsageEnabled bool
Indicates whether the database uses SQL plan baselines (true) or not (false).
ManagedDatabaseId string
PlanRetentionWeeks int
The number of weeks to retain unused plans before they are purged.
SpaceBudgetMb float64
The maximum SYSAUX space that can be used for SQL Management Base in MB.
SpaceBudgetPercent float64
The maximum percent of SYSAUX space that can be used for SQL Management Base.
SpaceUsedMb float64
The space used by SQL Management Base in MB.
OpcNamedCredentialId string
autoCaptureFilters List<GetManagedDatabaseSqlPlanBaselineConfigurationAutoCaptureFilter>
The capture filters used in automatic initial plan capture.
autoSpmEvolveTaskParameters List<GetManagedDatabaseSqlPlanBaselineConfigurationAutoSpmEvolveTaskParameter>
The set of parameters used in an SPM evolve task.
id String
The provider-assigned unique ID for this managed resource.
isAutoSpmEvolveTaskEnabled Boolean
Indicates whether the Automatic SPM Evolve Advisor task is enabled (true) or not (false).
isAutomaticInitialPlanCaptureEnabled Boolean
Indicates whether the automatic capture of SQL plan baselines is enabled (true) or not (false).
isHighFrequencyAutoSpmEvolveTaskEnabled Boolean
Indicates whether the high frequency Automatic SPM Evolve Advisor task is enabled (true) or not (false).
isSqlPlanBaselinesUsageEnabled Boolean
Indicates whether the database uses SQL plan baselines (true) or not (false).
managedDatabaseId String
planRetentionWeeks Integer
The number of weeks to retain unused plans before they are purged.
spaceBudgetMb Double
The maximum SYSAUX space that can be used for SQL Management Base in MB.
spaceBudgetPercent Double
The maximum percent of SYSAUX space that can be used for SQL Management Base.
spaceUsedMb Double
The space used by SQL Management Base in MB.
opcNamedCredentialId String
autoCaptureFilters GetManagedDatabaseSqlPlanBaselineConfigurationAutoCaptureFilter[]
The capture filters used in automatic initial plan capture.
autoSpmEvolveTaskParameters GetManagedDatabaseSqlPlanBaselineConfigurationAutoSpmEvolveTaskParameter[]
The set of parameters used in an SPM evolve task.
id string
The provider-assigned unique ID for this managed resource.
isAutoSpmEvolveTaskEnabled boolean
Indicates whether the Automatic SPM Evolve Advisor task is enabled (true) or not (false).
isAutomaticInitialPlanCaptureEnabled boolean
Indicates whether the automatic capture of SQL plan baselines is enabled (true) or not (false).
isHighFrequencyAutoSpmEvolveTaskEnabled boolean
Indicates whether the high frequency Automatic SPM Evolve Advisor task is enabled (true) or not (false).
isSqlPlanBaselinesUsageEnabled boolean
Indicates whether the database uses SQL plan baselines (true) or not (false).
managedDatabaseId string
planRetentionWeeks number
The number of weeks to retain unused plans before they are purged.
spaceBudgetMb number
The maximum SYSAUX space that can be used for SQL Management Base in MB.
spaceBudgetPercent number
The maximum percent of SYSAUX space that can be used for SQL Management Base.
spaceUsedMb number
The space used by SQL Management Base in MB.
opcNamedCredentialId string
auto_capture_filters Sequence[databasemanagement.GetManagedDatabaseSqlPlanBaselineConfigurationAutoCaptureFilter]
The capture filters used in automatic initial plan capture.
auto_spm_evolve_task_parameters Sequence[databasemanagement.GetManagedDatabaseSqlPlanBaselineConfigurationAutoSpmEvolveTaskParameter]
The set of parameters used in an SPM evolve task.
id str
The provider-assigned unique ID for this managed resource.
is_auto_spm_evolve_task_enabled bool
Indicates whether the Automatic SPM Evolve Advisor task is enabled (true) or not (false).
is_automatic_initial_plan_capture_enabled bool
Indicates whether the automatic capture of SQL plan baselines is enabled (true) or not (false).
is_high_frequency_auto_spm_evolve_task_enabled bool
Indicates whether the high frequency Automatic SPM Evolve Advisor task is enabled (true) or not (false).
is_sql_plan_baselines_usage_enabled bool
Indicates whether the database uses SQL plan baselines (true) or not (false).
managed_database_id str
plan_retention_weeks int
The number of weeks to retain unused plans before they are purged.
space_budget_mb float
The maximum SYSAUX space that can be used for SQL Management Base in MB.
space_budget_percent float
The maximum percent of SYSAUX space that can be used for SQL Management Base.
space_used_mb float
The space used by SQL Management Base in MB.
opc_named_credential_id str
autoCaptureFilters List<Property Map>
The capture filters used in automatic initial plan capture.
autoSpmEvolveTaskParameters List<Property Map>
The set of parameters used in an SPM evolve task.
id String
The provider-assigned unique ID for this managed resource.
isAutoSpmEvolveTaskEnabled Boolean
Indicates whether the Automatic SPM Evolve Advisor task is enabled (true) or not (false).
isAutomaticInitialPlanCaptureEnabled Boolean
Indicates whether the automatic capture of SQL plan baselines is enabled (true) or not (false).
isHighFrequencyAutoSpmEvolveTaskEnabled Boolean
Indicates whether the high frequency Automatic SPM Evolve Advisor task is enabled (true) or not (false).
isSqlPlanBaselinesUsageEnabled Boolean
Indicates whether the database uses SQL plan baselines (true) or not (false).
managedDatabaseId String
planRetentionWeeks Number
The number of weeks to retain unused plans before they are purged.
spaceBudgetMb Number
The maximum SYSAUX space that can be used for SQL Management Base in MB.
spaceBudgetPercent Number
The maximum percent of SYSAUX space that can be used for SQL Management Base.
spaceUsedMb Number
The space used by SQL Management Base in MB.
opcNamedCredentialId String

Supporting Types

GetManagedDatabaseSqlPlanBaselineConfigurationAutoCaptureFilter

ModifiedBy This property is required. string
The database user who last updated the filter value.
Name This property is required. string
The name of the automatic capture filter.

  • AUTO_CAPTURE_SQL_TEXT: Search pattern to apply to SQL text.
  • AUTO_CAPTURE_PARSING_SCHEMA_NAME: Parsing schema to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_MODULE: Module to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_ACTION: Action to include or exclude for SQL plan management automatic capture.
TimeLastModified This property is required. string
The time the filter value was last updated.
ValuesToExcludes This property is required. List<string>
A list of filter values to exclude.
ValuesToIncludes This property is required. List<string>
A list of filter values to include.
ModifiedBy This property is required. string
The database user who last updated the filter value.
Name This property is required. string
The name of the automatic capture filter.

  • AUTO_CAPTURE_SQL_TEXT: Search pattern to apply to SQL text.
  • AUTO_CAPTURE_PARSING_SCHEMA_NAME: Parsing schema to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_MODULE: Module to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_ACTION: Action to include or exclude for SQL plan management automatic capture.
TimeLastModified This property is required. string
The time the filter value was last updated.
ValuesToExcludes This property is required. []string
A list of filter values to exclude.
ValuesToIncludes This property is required. []string
A list of filter values to include.
modifiedBy This property is required. String
The database user who last updated the filter value.
name This property is required. String
The name of the automatic capture filter.

  • AUTO_CAPTURE_SQL_TEXT: Search pattern to apply to SQL text.
  • AUTO_CAPTURE_PARSING_SCHEMA_NAME: Parsing schema to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_MODULE: Module to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_ACTION: Action to include or exclude for SQL plan management automatic capture.
timeLastModified This property is required. String
The time the filter value was last updated.
valuesToExcludes This property is required. List<String>
A list of filter values to exclude.
valuesToIncludes This property is required. List<String>
A list of filter values to include.
modifiedBy This property is required. string
The database user who last updated the filter value.
name This property is required. string
The name of the automatic capture filter.

  • AUTO_CAPTURE_SQL_TEXT: Search pattern to apply to SQL text.
  • AUTO_CAPTURE_PARSING_SCHEMA_NAME: Parsing schema to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_MODULE: Module to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_ACTION: Action to include or exclude for SQL plan management automatic capture.
timeLastModified This property is required. string
The time the filter value was last updated.
valuesToExcludes This property is required. string[]
A list of filter values to exclude.
valuesToIncludes This property is required. string[]
A list of filter values to include.
modified_by This property is required. str
The database user who last updated the filter value.
name This property is required. str
The name of the automatic capture filter.

  • AUTO_CAPTURE_SQL_TEXT: Search pattern to apply to SQL text.
  • AUTO_CAPTURE_PARSING_SCHEMA_NAME: Parsing schema to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_MODULE: Module to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_ACTION: Action to include or exclude for SQL plan management automatic capture.
time_last_modified This property is required. str
The time the filter value was last updated.
values_to_excludes This property is required. Sequence[str]
A list of filter values to exclude.
values_to_includes This property is required. Sequence[str]
A list of filter values to include.
modifiedBy This property is required. String
The database user who last updated the filter value.
name This property is required. String
The name of the automatic capture filter.

  • AUTO_CAPTURE_SQL_TEXT: Search pattern to apply to SQL text.
  • AUTO_CAPTURE_PARSING_SCHEMA_NAME: Parsing schema to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_MODULE: Module to include or exclude for SQL plan management auto capture.
  • AUTO_CAPTURE_ACTION: Action to include or exclude for SQL plan management automatic capture.
timeLastModified This property is required. String
The time the filter value was last updated.
valuesToExcludes This property is required. List<String>
A list of filter values to exclude.
valuesToIncludes This property is required. List<String>
A list of filter values to include.

GetManagedDatabaseSqlPlanBaselineConfigurationAutoSpmEvolveTaskParameter

AllowedTimeLimit This property is required. int
The global time limit in seconds. This is the total time allowed for the task.
AlternatePlanBaselines This property is required. List<string>
Determines which alternative plans should be loaded.
AlternatePlanLimit This property is required. int
Specifies the maximum number of plans to load in total (that is, not the limit for each SQL statement). A value of zero indicates UNLIMITED number of plans.
AlternatePlanSources This property is required. List<string>
Determines which sources to search for additional plans.
ArePlansAutoAccepted This property is required. bool
Specifies whether to accept recommended plans automatically.
AllowedTimeLimit This property is required. int
The global time limit in seconds. This is the total time allowed for the task.
AlternatePlanBaselines This property is required. []string
Determines which alternative plans should be loaded.
AlternatePlanLimit This property is required. int
Specifies the maximum number of plans to load in total (that is, not the limit for each SQL statement). A value of zero indicates UNLIMITED number of plans.
AlternatePlanSources This property is required. []string
Determines which sources to search for additional plans.
ArePlansAutoAccepted This property is required. bool
Specifies whether to accept recommended plans automatically.
allowedTimeLimit This property is required. Integer
The global time limit in seconds. This is the total time allowed for the task.
alternatePlanBaselines This property is required. List<String>
Determines which alternative plans should be loaded.
alternatePlanLimit This property is required. Integer
Specifies the maximum number of plans to load in total (that is, not the limit for each SQL statement). A value of zero indicates UNLIMITED number of plans.
alternatePlanSources This property is required. List<String>
Determines which sources to search for additional plans.
arePlansAutoAccepted This property is required. Boolean
Specifies whether to accept recommended plans automatically.
allowedTimeLimit This property is required. number
The global time limit in seconds. This is the total time allowed for the task.
alternatePlanBaselines This property is required. string[]
Determines which alternative plans should be loaded.
alternatePlanLimit This property is required. number
Specifies the maximum number of plans to load in total (that is, not the limit for each SQL statement). A value of zero indicates UNLIMITED number of plans.
alternatePlanSources This property is required. string[]
Determines which sources to search for additional plans.
arePlansAutoAccepted This property is required. boolean
Specifies whether to accept recommended plans automatically.
allowed_time_limit This property is required. int
The global time limit in seconds. This is the total time allowed for the task.
alternate_plan_baselines This property is required. Sequence[str]
Determines which alternative plans should be loaded.
alternate_plan_limit This property is required. int
Specifies the maximum number of plans to load in total (that is, not the limit for each SQL statement). A value of zero indicates UNLIMITED number of plans.
alternate_plan_sources This property is required. Sequence[str]
Determines which sources to search for additional plans.
are_plans_auto_accepted This property is required. bool
Specifies whether to accept recommended plans automatically.
allowedTimeLimit This property is required. Number
The global time limit in seconds. This is the total time allowed for the task.
alternatePlanBaselines This property is required. List<String>
Determines which alternative plans should be loaded.
alternatePlanLimit This property is required. Number
Specifies the maximum number of plans to load in total (that is, not the limit for each SQL statement). A value of zero indicates UNLIMITED number of plans.
alternatePlanSources This property is required. List<String>
Determines which sources to search for additional plans.
arePlansAutoAccepted This property is required. Boolean
Specifies whether to accept recommended plans automatically.

Package Details

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