Setting Up a Bucket to Store Autonomous Database Manual Backups

Hello,
We must create an Oracle Cloud Infrastructure Object Storage bucket to hold our Autonomous Database manual backups and configure your database to connect to it. In this blog post I will describe how to do it.

1- If you have not already done so, generate an auth token for the Oracle Cloud Infrastructure Object Storage user to access the bucket.
Please read my previous blog post to create an auth token

2- Open the navigation menu. Under Core Infrastructure, click Object Storage.

3-Select a compartment from the Compartment list on the left side of the page. A list of existing buckets is displayed.

4- Click Create Bucket.

5- In the Create Bucket dialog box, specify the attributes of the bucket:

Bucket Name: The system generates a default bucket name that reflects the current year, month, day, and time. If you change this default to any other bucket name, use letters, numbers, dashes, underscores, and periods. Avoid entering confidential information. For storing a manual backup. Please specify name as backup_[Your Autonomous Database Name] For example, my bucket name is backup_atp.

Storage Tier: Select the tier in which you want to store your data. Available tiers include:

Standard is the primary, default Object Storage tier for storing frequently accessed data that requires fast and immediate access.
Archive is a special tier for storing infrequently accessed data that requires long retention periods. Access to data in the Archive tier is not immediate. You must restore archived data before the data is accessible.
Object Events: Select Emit Object Events if you want to enable the bucket to emit events for object state changes.
Encryption: Buckets are encrypted with keys managed by Oracle by default, but you can optionally encrypt the data in this bucket using your own Vault encryption key. To use Vault for your encryption needs, select Encrypt Using Customer-Managed Keys. Then, select the Vault Compartment and Vault that contain the master encryption key you want to use. Also select the Master Encryption Key Compartment and Master Encryption Key

6- Finally click Create Bucket.

Now the bucket is ready to start uploading objects.

7- Using an Oracle Database client, log in to the database as the administrator set the database default_bucket property to your Oracle Cloud Infrastructure Object Storage tenancy URL. The format of the tenancy URL is https://swiftobjectstorage.region.oraclecloud.com/v1/object_storage_namespace

Please read my previous blog post to create an auth token

For example;

ALTER DATABASE PROPERTY SET default_bucket=’https://swiftobjectstorage.eu-frankfurt-1.oraclecloud.com/v1/frskjd0nbatp’;

Here My Object Storage namespace is frskjd0nbatp and my region eu-frankfurt-1

Note: To determine the Object Storage namespace string to use, click View Bucket in the actions (three dots) menu of the bucket you created in the sixth step

8-With the tenancy user and the auth token referenced in first step, create the credential for your Oracle Cloud Infrastructure Object Storage account. Use DBMS_CLOUD.CREATE_CREDENTIAL to create the credential.

BEGIN
DBMS_CLOUD.CREATE_CREDENTIAL(
credential_name => ‘CRED_NAME’,
username => ‘talip.ozturk@veridatait.com’,
password => ‘Zgkz:2lE)zw:duc}K1>8’
);
END;
/

9- Set the database property default_credential to the credential you created in the previous step.

ALTER DATABASE PROPERTY SET default_credential = ‘ADMIN.CRED_NAME’;

Now, you can take manual backups any time you want. I will write about how to take manual backup in the following post.

How to Create An Auth Token in Autonomous Database?

Hello,
I want to describe How to Create An Auth Token in Autonomous Database.

1- If you’re an administrator creating an auth token for another user: In the Navigation Console (under Governance and Administration), click Identity, and then click Users. Locate the user in the list, and then click the user’s name to view the details.
2- On the left side of the page, click Auth Tokens.

3-Click Generate Token.

4-Enter a description that indicates what this token is for

5- Click Generate Token. The new token string will be displayed

6- Copy the token string immediately, because you can’t retrieve it again after closing the dialog box.

If you want to delete an auth token, click for the auth token you want to delete and click Delete.

Connecting to an Oracle Autonomous Database Using SQL Developer

Hello,
In this blog post I want to describe how to connect to an Autonomous Database.

Applications and tools connect to Autonomous Databases by using Oracle Net Services (also known as SQL*Net). SQL*Net supports a variety of connection types to Autonomous Databases, including Oracle Call Interface (OCI), ODBC drivers, JDBC OC, and JDBC Thin Driver.

To support connections of any type, you’ll need to download the client security credentials and network configuration settings required to access your database. You’ll also need to supply the applicable TNS names or connection strings for a connection, depending on the client application or tool, type of connection, and service level. You can view or copy the TNS names and connection strings in the DB Connection dialog for your Autonomous Database.

Firstly let me download a wallet for an Autonomous Database on shared Exadata infrastructure.

1- Open the navigation menu. Under Database, click Autonomous Transaction Processing or Autonomous Data Warehouse.
2- Choose your Compartment.
3- In the list of Autonomous Databases, click on the display name of the database you are interested in.
4- Click DB Connection.

5-In the Download Client Credentials (Wallet) section, select the Wallet Type. You can choose to download an instance wallet or a regional wallet .

6- To obtain the client credentials, click Download Wallet. You will be prompted to provide a password to encrypt the keys inside the wallet. The password must be at least 8 characters long and must include at least 1 letter and either 1 numeric character or 1 special character. Save the client credentials zip file to a secure location

7-Take note of or copy the TNS names or connection strings you need for your connection.

8- Now, Open SQL Developer on your local computer. In the Connections panel, right-click Connections and select New Connection.

9- The New/Select Database Connection dialog appears. Enter the following information:

Connection Name – Enter the name for this cloud connection.
Username – Enter the database username .
Password – Enter the password.
Connection Type – Select Cloud Wallet.
Configuration File – Click Browse, and select the path to your local copy of the Client Credentials zip file, downloaded from the Autonomous Transaction Processing console by you, or given to you by your Autonomous Transaction Processing administrator.
Keystore Password –
If using SQL Developer 18.2.0 or newer: Starting with version 18.2.0, SQL Developer does not require that you enter a Keystore Password and does not provide the Keystore Password field.
If using a version of SQL Developer older than 18.2.0: Enter the password that was generated when you or your Autonomous Transaction Processing administrator downloaded the Client Credentials zip file from the Autonomous Transaction Processing console.
Service – In the drop-down menu, service selections are prepended with database names. Select the tpurgent, tp, high, medium, or low menu item for your database. These service levels map to the TPURGENT, TP, HIGH, MEDIUM and LOW consumer groups, which provide different levels of priority for your session.

10- Click Test. Status: Success displays at the bottom left of the New/Select Database Connection dialog.
11- Click Connect. An entry for the new connection appears under Connections.

Now you connected to Autonomous Transaction Processing Database.

Creating an Oracle Autonomous Database

Hello,
In this blog post I want to describe how to provision a new Autonomous Database using the Oracle Cloud Infrastructure Console.

To create an Autonomous Database;
1- Open the navigation menu on the left side of page. Under Database, click Autonomous Transaction Processing or Autonomous Data Warehouse

2-Click Create Autonomous  Database.

3-In the Create Autonomous Container Database dialog, enter the following database information:

Compartment: Specify the compartment in which the container database will be created.
Display Name: A user-friendly description or other information that helps you easily identify the resource. The display name does not have to be unique. Avoid entering confidential information.
Database Name: The name must contain only letters and numbers, starting with a letter. Maximum of 14 characters.

Note: The following naming restrictions apply to Autonomous Transaction Processing and Autonomous Data Warehouse databases:

Names associated with databases terminated within the last 60 days cannot be used when creating a new database.
A database name cannot be used concurrently for two Autonomous Databases, regardless of workload type.4- Select the desired workload type. For example let me select “Transaction Processing”. And Select Infrastructure Type as Shared.

If you want to create an Autonomous Database database on dedicated Exadata infrastructure then you must select “Dedicated Infrastructure”

5- Let me configure the database CPU Core Count and Storage Configuration
Always Free: Move this selector to the right so that the provisioning workflow shows only the Always Free configuration options. Note that the Core CPU count and Storage configuration fields are disabled when provisioning an Always Free Autonomous Database. Your database will have 1 OCPU, 8 GB of memory, and 20 GB of storage.

Important Note: If your Always Free Autonomous Database has no activity for 7 consecutive days, the database will be automatically stopped. Your data will be preserved, and you can restart the database to continue using it. If the database remains stopped for 3 months, it will be reclaimed.

6- Set the password for the Autonomous Database Admin user by entering a password that meets the following criteria:

Between 12 and 30 characters long
Contains at least one lowercase letter
Contains at least one uppercase letter
Contains at least one number
Does not contain the double quotation mark (“)
Does not contain the string “admin”, regardless of casing

7- When you provision an Always Free Autonomous Database, the license type is set to License included and cannot be adjusted.

8- Finally, click Create Autonomous Database.

9- Oracle Cloud Infrastructure Console will start provisioning the database

After a few minutes,our Autonomous Database will be Up and running.

Creating an Oracle Autonomous Container Database

Hello,
In this blog post I want to describe how to provision a new Autonomous Container Database using the Oracle Cloud Infrastructure Console. Container databases are only necessary for Autonomous Databases on dedicated Exadata infrastructure.
To create an Autonomous Container Database;
1- Open the navigation menu on the left side of page. Under Database, click Autonomous Transaction Processing or Autonomous Data Warehouse

2-Click Create Autonomous Container Database.

3-In the Create Autonomous Container Database dialog, enter the following database information:

Compartment: Specify the compartment in which the container database will be created.
Display Name: A user-friendly description or other information that helps you easily identify the resource. The display name does not have to be unique. Avoid entering confidential information.

4-Choose the Autonomous Exadata Infrastructure you wish to use to create your container database. We already created in previous post https://taliphakanozturken.wordpress.com/2020/04/02/creating-an-oracle-autonomous-exadata-infrastructure-resource/

5-You can select Advanced Options:

Tags – Optionally, you can apply tags.
Management – Optionally, you can specify the backup retention policy, which controls the length of time you retain backups in the Autonomous Container Database. The choices are 7 days, 15 days, 30 days, and 60 days. The default setting is 60 days.

6- Click Create Autonomous Container Database.