Create a Database

This article explains how to create a database in bare metal DB systems. When you launch a bare metal DB system, an initial database is created in that system. After provisioning your system, you can create additional databases at any time by using the Console or the API.

Note:

  • This topic applies only to bare metal DB systems. Virtual machine DB systems can only contain a single database, which is created when the DB system is provisioned.
  • Database backups on virtual machine DB systems can only be restored to an existing bare metal DB system or a newly-created virtual machine or bare metal DB system.

The database edition will be the edition of the DB system in which the database is created, and each new database is created in a separate database home. You can create an empty database or reproduce a database by using a backup.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be granted security access in a policy by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don’t have permission or are unauthorized, verify with your administrator what type of access you have and which compartment to work in.

For administrators: The policy in Let database admins manage Oracle Cloud database systems lets the specified group do everything with databases and related Database resources.

If you're new to policies, see Getting Started with Policies and Common Policies. If you want to dig deeper into writing policies for databases, see Details for the Database Service.

Options for Creating a Container Database from a Backup

When creating a new database using a backup stored in Object Storage as the source, you have the following backup source options:

  • Daily automatic backup. Requires that you have automatic backups enabled and an available backup to use. If you are creating a database from an automatic backup, you can choose any level 0 weekly backup, or a level 1 incremental backup created after the most recent level 0 backup.
  • On-demand full backup.
  • Standalone backup.
  • Last archived redo log backup. Requires that you have automatic backups enabled. This backup combines data from the most recent daily automatic backup and data from archived redo logs, and represents the most current backup available. The time of the last archived redo log backup is visible on the database details page in the Last Backup Time field.
  • Point-in-time out of place restore. Specify a timestamp to create a new copy of the database that included data up to a specified point in time. The timestamp must be earlier or equal to the Last Backup Time time displayed on the database details page. Note the following limitations when performing a point-in-time out of place restore:

    • The timestamp must be within the recovery window of the database
    • The timestamp must be available within the database incarnation of the available automatic backups
    • The timestamp cannot fall within two overlapping database incarnations
    • The create database operation will fail if the database has undergone structural changes since the specified timestamp. Structural changes include operations such as creating or dropping a tablespace.
    • The create database operation cannot be started if another point-in-time database copy operation is in progress.

For information on configuring your DB system to back up to Object Storage, see Back Up a Database Using the Console.

Create a New Database In an Existing DB System

Create a Database From a Backup In an Existing DB System

Use the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Use these API operations to create databases on bare metal DB systems.

Database homes:

  • ListDbHomes
  • GetDbHome
  • CreateDbHome
  • DeleteDbHome

Databases:

  • CreateDatabase

For the complete list of APIs for the Database service, see Database Service API.