Try Oracle Database for free in the cloud with OCI

Oracle Autonomous Database Logo

Always-Free Oracle Autonomous Database instances let you quickly and easily test use Oracle Database 23ai for Free, in a managed environment. To get started, you’ll need an Oracle Cloud Infrastructure (OCI) Free Tier account, which includes up to two serverless Autonomous Database instances free of cost, license included.

In this article, we’ll walk through how to get started using Oracle Autonomous Database, at no charge, in the cloud.

Text box promoting Oracle Autonomous Database features and Always Free offer

Sign up for an Oracle Cloud Free Tier account

If you don’t already have an OCI account, visit https://signup.cloud.oracle.com/ to sign up and create a new account. Note that a valid credit card is required for account creation as a security measure, even for free tier accounts.

Once you sign up, you’ll gain access to to Always-Free resources like Autonomous Database, and a 1 month trial credit to play around with additional services. See the current freely available services on OCI for more information!

A grid layout showcasing various AI and Machine Learning services available in the Oracle Cloud Free Tier, each labeled as 'TRIAL' and including features like Document Understanding, Vision, Speech, Language, Oracle Digital Assistant, and Data Science.

Create an Autonomous Database instance

Log into the OCI console home page to access your new account, and navigate from the home page to Oracle Database, and then Autonomous Database.

Oracle Cloud interface showing the Autonomous Database option under the Oracle Database menu.

From the Autonomous Database page, click “Create Autonomous Database”, and fill out the information for your database, providing a valid name and compartment.

A form for providing basic information for the Oracle Autonomous Database, including fields for selecting the compartment, display name, and database name.

Choose an optimized workload type for your database, depending on how you plan to utilize it. For this example, we’ll choose “Transaction Processing” for a standard transactional/relational workload.

Overview of workload types for Oracle Autonomous Database, highlighting the 'Transaction Processing' option, which is selected.

Select “Serverless” as the database deployment type. Note that dedicated infrastructure (Exadata) is not available for Always Free instances.

Screenshot showing options for choosing a deployment type for Oracle Autonomous Database, highlighting 'Serverless' as the selected choice.

Choose your database version — I recommend the latest, which at time of writing is 23ai. You should also make sure the “Always Free” slider is on to ensure your database instance is created free of charge.

Screenshot of the Oracle Cloud interface for configuring the Autonomous Database, highlighting the 'Always Free' option and the warning about inactivity leading to automatic stopping of the database.

Create a secure password for the database admin user. This is the initial database user that’ll be used on first login to configure your database.

Screenshot showing the 'Create administrator credentials' section with fields for username and password entry for an Oracle Database.

Next, configure the database network access. I recommend selecting “Secure access from allowed IPs and VCNs only”, and clicking the “Add my IP address” so your database is only accessible from your network.

For additional security, mutual TLS (mTLS) authentication can be enabled. If you choose to enable mTLS, you’ll need to authenticate to your database instance using an Oracle wallet, which can be downloaded after the database is created.

Screenshot showing the network access configuration settings for Oracle Autonomous Database, highlighting the option for secure access from allowed IPs and VCNs.

In the license section, note how the database is provisioned as License Included. This is always the case for free-tier database at no additional charge. Bring Your Own License (BYOL) may be selected for paid database instances.

Screenshot of the Oracle Database license selection interface indicating the 'License included' option for database provisioning.

Lastly, provide an operational email address for the database, and click “Create Autonomous Database” to trigger database creation. Within a few moments, your database will be created and ready to use.

Form to enter a contact email for operational notifications with a highlighted button labeled 'Create Autonomous Database'.

Downloading and using a wallet for mTLS

If you didn’t create your database with mTLS authentication, you can skip this section.

To download your database wallet, click on the “Database Connection” button from your database instance screen.

Interface showing 'Database connection' option highlighted for an Oracle Autonomous Database instance.

On the database connection screen, scroll to the wallet section and click “Download Wallet”. You’ll be prompted to enter a password for the wallet, after which the wallet zip file will be downloaded.

Screenshot of the Oracle Cloud interface for downloading client credentials, highlighting the 'Download wallet' option for mTLS connections.

With your database wallet downloaded, you now have all the information needed to connect to your database instance from an application!

Accessing with JDBC and Spring Boot

If you’re a Spring Boot user, Oracle Autonomous Database can be set up with JDBC, optionally using the database wallet path as the TNS_ADMIN value in the JDBC URL.

You can learn more about configuring Spring Boot and JDBC with Oracle Autonomous Database Here.

spring:
  datasource:
    # WALLET_DIR points to the directory containing the database wallet.
    # This is not required if you are not using a wallet.
    # TNS_NAME is the name of your Autonomous Database instance.
    url: jdbc:oracle:thin:@${TNS_NAME}?TNS_ADMIN=${WALLET_DIR}
    username: ${DATABASE_USERNAME}
    password: ${DATABASE_PASSWORD}
    driver-class-name: oracle.jdbc.OracleDriver
    type: oracle.ucp.jdbc.PoolDataSourceImpl
    oracleucp:
      connection-factory-class-name: oracle.jdbc.pool.OracleDataSource
      connection-pool-name: ADBExample
      initial-pool-size: 5
      min-pool-size: 1
      max-pool-size: 30

Add the following Maven dependencies for the wallet connection:

<dependency>
    <groupId>com.oracle.database.spring</groupId>
    <artifactId>oracle-spring-boot-starter-ucp</artifactId>
    <version>25.3.0</version>
</dependency>
<dependency>
    <groupId>com.oracle.database.spring</groupId>
    <artifactId>oracle-spring-boot-starter-wallet</artifactId>
    <version>25.3.0</version>
</dependency>

Navigate to SQL Worksheet

From your database instance, select “Database Actions” -> “SQL” to open a SQL worksheet in a new browser tab. From this OCI Console tab, you can run SQL statements, queries, and more.

You can learn more about on-line database actions Here.

Oracle Database 23ai Free

Autonomous Database is just one of the many ways to run Oracle Database 23ai free, which is now easier than ever to test and use, thanks to container databases and installable downloads. Learn more about Oracle Database 23ai Free.

Leave a Reply