1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getManagedDatabaseSqlPlanBaselineConfiguration
Oracle Cloud Infrastructure v1.34.0 published on Friday, May 3, 2024 by Pulumi

oci.DatabaseManagement.getManagedDatabaseSqlPlanBaselineConfiguration

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.34.0 published on Friday, May 3, 2024 by Pulumi

    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,
    });
    
    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)
    
    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.GetManagedDatabaseSqlPlanBaselineConfiguration(ctx, &databasemanagement.GetManagedDatabaseSqlPlanBaselineConfigurationArgs{
    			ManagedDatabaseId:    testManagedDatabase.Id,
    			OpcNamedCredentialId: pulumi.StringRef(managedDatabaseSqlPlanBaselineConfigurationOpcNamedCredentialId),
    		}, 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 testManagedDatabaseSqlPlanBaselineConfiguration = Oci.DatabaseManagement.GetManagedDatabaseSqlPlanBaselineConfiguration.Invoke(new()
        {
            ManagedDatabaseId = testManagedDatabase.Id,
            OpcNamedCredentialId = managedDatabaseSqlPlanBaselineConfigurationOpcNamedCredentialId,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      testManagedDatabaseSqlPlanBaselineConfiguration:
        fn::invoke:
          Function: oci:DatabaseManagement:getManagedDatabaseSqlPlanBaselineConfiguration
          Arguments:
            managedDatabaseId: ${testManagedDatabase.id}
            opcNamedCredentialId: ${managedDatabaseSqlPlanBaselineConfigurationOpcNamedCredentialId}
    

    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>
    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]
    func GetManagedDatabaseSqlPlanBaselineConfiguration(ctx *Context, args *GetManagedDatabaseSqlPlanBaselineConfigurationArgs, opts ...InvokeOption) (*GetManagedDatabaseSqlPlanBaselineConfigurationResult, error)
    func GetManagedDatabaseSqlPlanBaselineConfigurationOutput(ctx *Context, args *GetManagedDatabaseSqlPlanBaselineConfigurationOutputArgs, opts ...InvokeOption) GetManagedDatabaseSqlPlanBaselineConfigurationResultOutput

    > 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)
    }
    public static CompletableFuture<GetManagedDatabaseSqlPlanBaselineConfigurationResult> getManagedDatabaseSqlPlanBaselineConfiguration(GetManagedDatabaseSqlPlanBaselineConfigurationArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DatabaseManagement/getManagedDatabaseSqlPlanBaselineConfiguration:getManagedDatabaseSqlPlanBaselineConfiguration
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ManagedDatabaseId string
    The OCID of the Managed Database.
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    ManagedDatabaseId string
    The OCID of the Managed Database.
    OpcNamedCredentialId string
    The OCID of the Named Credential.
    managedDatabaseId String
    The OCID of the Managed Database.
    opcNamedCredentialId String
    The OCID of the Named Credential.
    managedDatabaseId string
    The OCID of the Managed Database.
    opcNamedCredentialId string
    The OCID of the Named Credential.
    managed_database_id str
    The OCID of the Managed Database.
    opc_named_credential_id str
    The OCID of the Named Credential.
    managedDatabaseId 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 string
    The database user who last updated the filter value.
    Name 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 string
    The time the filter value was last updated.
    ValuesToExcludes List<string>
    A list of filter values to exclude.
    ValuesToIncludes List<string>
    A list of filter values to include.
    ModifiedBy string
    The database user who last updated the filter value.
    Name 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 string
    The time the filter value was last updated.
    ValuesToExcludes []string
    A list of filter values to exclude.
    ValuesToIncludes []string
    A list of filter values to include.
    modifiedBy String
    The database user who last updated the filter value.
    name 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 String
    The time the filter value was last updated.
    valuesToExcludes List<String>
    A list of filter values to exclude.
    valuesToIncludes List<String>
    A list of filter values to include.
    modifiedBy string
    The database user who last updated the filter value.
    name 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 string
    The time the filter value was last updated.
    valuesToExcludes string[]
    A list of filter values to exclude.
    valuesToIncludes string[]
    A list of filter values to include.
    modified_by str
    The database user who last updated the filter value.
    name 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 str
    The time the filter value was last updated.
    values_to_excludes Sequence[str]
    A list of filter values to exclude.
    values_to_includes Sequence[str]
    A list of filter values to include.
    modifiedBy String
    The database user who last updated the filter value.
    name 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 String
    The time the filter value was last updated.
    valuesToExcludes List<String>
    A list of filter values to exclude.
    valuesToIncludes List<String>
    A list of filter values to include.

    GetManagedDatabaseSqlPlanBaselineConfigurationAutoSpmEvolveTaskParameter

    AllowedTimeLimit int
    The global time limit in seconds. This is the total time allowed for the task.
    AlternatePlanBaselines List<string>
    Determines which alternative plans should be loaded.
    AlternatePlanLimit 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 List<string>
    Determines which sources to search for additional plans.
    ArePlansAutoAccepted bool
    Specifies whether to accept recommended plans automatically.
    AllowedTimeLimit int
    The global time limit in seconds. This is the total time allowed for the task.
    AlternatePlanBaselines []string
    Determines which alternative plans should be loaded.
    AlternatePlanLimit 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 []string
    Determines which sources to search for additional plans.
    ArePlansAutoAccepted bool
    Specifies whether to accept recommended plans automatically.
    allowedTimeLimit Integer
    The global time limit in seconds. This is the total time allowed for the task.
    alternatePlanBaselines List<String>
    Determines which alternative plans should be loaded.
    alternatePlanLimit 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 List<String>
    Determines which sources to search for additional plans.
    arePlansAutoAccepted Boolean
    Specifies whether to accept recommended plans automatically.
    allowedTimeLimit number
    The global time limit in seconds. This is the total time allowed for the task.
    alternatePlanBaselines string[]
    Determines which alternative plans should be loaded.
    alternatePlanLimit 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 string[]
    Determines which sources to search for additional plans.
    arePlansAutoAccepted boolean
    Specifies whether to accept recommended plans automatically.
    allowed_time_limit int
    The global time limit in seconds. This is the total time allowed for the task.
    alternate_plan_baselines Sequence[str]
    Determines which alternative plans should be loaded.
    alternate_plan_limit 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 Sequence[str]
    Determines which sources to search for additional plans.
    are_plans_auto_accepted bool
    Specifies whether to accept recommended plans automatically.
    allowedTimeLimit Number
    The global time limit in seconds. This is the total time allowed for the task.
    alternatePlanBaselines List<String>
    Determines which alternative plans should be loaded.
    alternatePlanLimit 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 List<String>
    Determines which sources to search for additional plans.
    arePlansAutoAccepted 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.
    oci logo
    Oracle Cloud Infrastructure v1.34.0 published on Friday, May 3, 2024 by Pulumi