# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).
import oci
# Create a default config using DEFAULT profile in default location
# Refer to
# https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File
# for more info
config = oci.config.from_file()
# Initialize service client with default config file
database_management_client = oci.database_management.SqlTuningClient(config)
# Send the request to service, some parameters are not required, see API
# doc for more info
load_sql_tuning_set_response = database_management_client.load_sql_tuning_set(
managed_database_id="ocid1.test.oc1..<unique_ID>EXAMPLE-managedDatabaseId-Value",
sql_tuning_set_id=329,
load_sql_tuning_set_details=oci.database_management.models.LoadSqlTuningSetDetails(
name="EXAMPLE-name-Value",
load_type="INCREMENTAL_CURSOR_CACHE",
credential_details=oci.database_management.models.SqlTuningSetAdminSecretCredentialDetails(
sql_tuning_set_admin_credential_type="SECRET",
username="EXAMPLE-username-Value",
role="NORMAL",
secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-secretId-Value"),
database_credential=oci.database_management.models.DatabaseSecretCredentialDetails(
credential_type="SECRET",
password_secret_id="ocid1.test.oc1..<unique_ID>EXAMPLE-passwordSecretId-Value",
username="EXAMPLE-username-Value",
role="NORMAL"),
show_sql_only=208,
owner="EXAMPLE-owner-Value",
basic_filter="EXAMPLE-basicFilter-Value",
recursive_sql="NO_RECURSIVE_SQL",
result_percentage=183.92503,
result_limit=792,
ranking_measure1="ELAPSED_TIME",
ranking_measure2="ELAPSED_TIME",
ranking_measure3="CPU_TIME",
total_time_limit=352,
repeat_interval=792,
capture_option="INSERT",
capture_mode="MODE_REPLACE_OLD_STATS",
attribute_list="EXAMPLE-attributeList-Value",
load_option="MERGE",
update_option="REPLACE",
update_attributes="EXAMPLE-updateAttributes-Value",
update_condition="NULL",
is_ignore_null=False,
commit_rows=54,
begin_snapshot=338,
end_snapshot=519,
baseline_name="EXAMPLE-baselineName-Value"),
opc_request_id="ZZRSF3MW9O2UVE9XGVCI<unique_ID>",
opc_retry_token="EXAMPLE-opcRetryToken-Value")
# Get the data from response
print(load_sql_tuning_set_response.data)