# 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=192,
load_sql_tuning_set_details=oci.database_management.models.LoadSqlTuningSetDetails(
name="EXAMPLE-name-Value",
load_type="AWR",
credential_details=oci.database_management.models.SqlTuningSetAdminPasswordCredentialDetails(
sql_tuning_set_admin_credential_type="PASSWORD",
username="EXAMPLE-username-Value",
role="NORMAL",
password="EXAMPLE-password-Value"),
database_credential=oci.database_management.models.DatabasePasswordCredentialDetails(
credential_type="PASSWORD",
password="EXAMPLE-password-Value",
username="EXAMPLE-username-Value",
role="NORMAL"),
show_sql_only=302,
owner="EXAMPLE-owner-Value",
basic_filter="EXAMPLE-basicFilter-Value",
recursive_sql="NO_RECURSIVE_SQL",
result_percentage=9011.025,
result_limit=681,
ranking_measure1="DISK_READS",
ranking_measure2="ELAPSED_TIME",
ranking_measure3="ELAPSED_TIME",
total_time_limit=137,
repeat_interval=621,
capture_option="UPDATE",
capture_mode="MODE_ACCUMULATE_STATS",
attribute_list="EXAMPLE-attributeList-Value",
load_option="MERGE",
update_option="ACCUMULATE",
update_attributes="EXAMPLE-updateAttributes-Value",
update_condition="NEW",
is_ignore_null=True,
commit_rows=228,
begin_snapshot=201,
end_snapshot=881,
baseline_name="EXAMPLE-baselineName-Value"),
opc_request_id="MK02VRJBXSFTUKSI6RNW<unique_ID>",
opc_retry_token="EXAMPLE-opcRetryToken-Value")
# Get the data from response
print(load_sql_tuning_set_response.data)