Create Database

This topic describes how to create a database in Oracle Base Database Cloud@Customer.

Before you begin, review the following:

You can create a Database:

Using the Console

Perform the following steps in the Console.

  1. On the Data Infrastructures list page, select the Data Infrastructure that you want to work with. If you need help finding the list page or the Data Infrastructure, see List Data Infrastructures.

  2. On the Data Infrastructure details page, select the VM Cluster tab to view the list of all VM Clusters.
  3. On the VM Clusters tab, select the VM Cluster that you want to work with.
  4. On the VM Cluster details page, select the Databases tab to view the list of all databases.

  5. On the Databases tab, select Create Database.

  6. On the Create Database page, provide the following details.

    • Database name: Specify a user-friendly name to identify the database. The database name must follow these guidelines:

      • Maximum of 8 characters
      • Contains only alphanumeric characters
      • Begins with an alphabetic character
      • Must not match the first 8 characters of any db_unique_name on the VM Cluster
      • Must be unique within the VM Cluster
      • Do not use grid, because it is a reserved name
      • Do not use ASM, because it is a reserved name
    • Unique name for the database: Optionally, specify a unique name for the database. This attribute defines the value of the db_unique_name database parameter. The db_unique_name must follow these guidelines:

      • The value is not case-sensitive.
      • Maximum of 30 characters
      • Can contain alphanumeric characters and underscores (_)
      • Begins with an alphabetic character
      • Must be unique across the fleet or tenancy

    If you do not specify a unique name, the db_unique_name defaults to the following format:

    <db_name>_<3-character unique string>_<region-name>

    If you plan to configure the database for backup to a Recovery Appliance backup destination, the unique database name must match the name configured in the Recovery Appliance.

    • Database version: From the list, select the Oracle AI Database software release that you want to deploy.

    • PDB name: (Optional) Specify the name for the first PDB. A PDB is created with the database.

    To avoid potential service name collisions when using Oracle Net Services to connect to the PDB, ensure that the PDB name is unique across the VM Cluster. If you do not provide a PDB name, a system-generated name is used.

    • Database Home:

      • Database Home source: Select an existing Database Home or create one, as applicable. This field is not available when you create a database from the Database Home details page.
        • Select an existing Database Home: If one or more Database Homes already exist for the selected database version, this option is selected by default. Select a Database Home from the list.
        • Create a new Database Home: If no Database Homes exist for the selected database version, this option is selected by default.
      • Database Home: Specify the name for the new Database Home.

      • Unified Auditing: (Optional) Enable the unified auditing if required. This is enabled by default for Oracle AI Database 26ai.

      • Database image: Determines what Oracle AI Database version is used for the database. You can mix database versions, but not editions. By default, the latest Oracle-published database Software Image is selected.

        Select Change Database Image to use a different Oracle-published image or a custom database Software Image that you have created in advance, then select an Image type:

        • Oracle Provided Database Software Images: These images contain generally available versions of Oracle AI Database software.

        • Custom Database Software Images: These images are created by your organization and contain customized configurations of software updates. Use the Compartment and Database version filters to select the custom database Software Images from a specific compartment or Oracle AI Database software major release version.

          The custom database Software Image must be based on an Oracle AI Database release that meets the following criteria:

          • The release is currently supported by OCI.

          • The release is supported by the hardware model you are provisioning.

        After selecting a Software Image, select the Select button.

        For the available Oracle AI Database major version releases, images are provided for the current version plus the three most recent older versions (N through N - 3). For example, if an instance is using Oracle Database 19c, and the latest version of 19c offered is 19.31.0.0, images available for provisioning are for versions 19.31.0.0, 19.30.0.0, 19.29.0.0 and 19.28.0.0.

    • Administration password:

      • User name: Displays the user name.

      • Password: Enter the Oracle AI Database administration password.
        • This password is used for the following database administration accounts and functions:
          • The password for the SYS and SYSTEM users
          • The Transparent Data Encryption (TDE) keystore password
          • The PDBADMIN user in the first PDB.
        • The password must be:
          • 9 to 30 characters long
          • Contain at least:
          • Two uppercase letters
          • Two lowercase letters
          • Two numeric characters
          • Two special characters
          • Use only the following special characters:
            • _
            • #
            • -
          • Must not contain the tenancy name
          • Must not contain reserved words, such as Oracle or Table, regardless of case
      • Confirm password: Reenter the password.
    • Backups:

      • Enable automatic backups: Turn on to enable automatic backups. Automatic backups are performed daily if enabled.

      • Backup destination type: Select a backup destination for the database. Select one of the following options:

        • Recovery Appliance: Stores backups in a previously defined Oracle Zero Data Loss Recovery Appliance backup destination.

          • Compartment: Select the compartment for the Recovery Appliance backup.
          • Backup destinations: Select a Recovery Appliance backup destination from the list.
          • Recovery appliance connection string: Displays the connection string of the selected recovery appliance.
          • VPC user: Select a virtual private catalog (VPC) user from the list.
          • Password: Enter the password for the VPC user.
          • Enter the source database’s TDE wallet or RMAN password: Enter the password.
          • Real-time data protection: Turn on for continuous data protection. Real-time data protection minimizes the possibility of data loss.
        • Network File System (NFS): Stores backups in a previously defined Network File System (NFS) backup destination.

          • Compartment: Select the compartment for the NFS backup.
          • Backup destinations: Select a NFS backup destination from the list.
    • Encryption:

      • Key management: Select a key management. The default option is Oracle Wallet.

        • Oracle Wallet:
          • Use the administrator password for the TDE wallet: When this option is turned on, the password entered for the SYS user is also used for the TDE wallet. To specify a different TDE wallet password, clear this selection, and then enter and confirm the TDE wallet password.
        • Oracle Key Vault:
          • Compartment: Select the compartment that contains the keystore.
          • Key Store: Select the keystore.
        • External Keystore:
          • TDE wallet password: Enter the TDE wallet password.
          • External keystore credentials: Enter credentials in the format supported by the external keystore provider.
    • Advanced Options: Expand to provide additional details.

      • Management: Expand to provide additional details.

        • Oracle SID prefix: Optionally, specify the Oracle SID prefix for the database. The instance number is automatically appended to the SID prefix to become the instance_name database parameter. If not provided, then the SID prefix defaults to the db_name.

        • Character Set: The character set for the database. The default is AL32UTF8.

        • National character set: The national character set for the database. The default is AL16UTF16.

      • Tags: Expand to provide additional details. You can add free-form tags or defined tags to this resource. You must have permission to use the tag namespace for defined tags. For more information about using tags to manage your resources, see Tags. Tags can be applied later or at any time to a resource.

  7. Select Create.

The Database details page is now displayed. While the creation process is running, the state of the database is Provisioning. When the database creation process completes, the state of the database changes to Available.

Using dbaascli Utility

To create an Oracle AI Database in the specified database home of required version, use the dbaascli database create command.

You can use the dbaascli database create command to:

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:

    sudo -s
  3. Run the following command:

    dbaascli database create --dbName database name --oracleHome Oracle Home Path

    Parameters:

    Parameter Description
    --dbName specifies the name of the database
    --oracleHome specifies Oracle home location

    To create a CDB, run the following command:

    dbaascli database create --dbName database name --oracleHome Oracle Home Path

    To create a non-CDB, run the following command:

    dbaascli database create --dbName database name --oracleHome Oracle Home Path --createAsCDB false

    When prompted, enter the sys and tde passwords.

  4. Exit the root user command shell:

    exit

    For more details on advanced supported options, see dbaascli database create.

Running Prerequisite Checks Prior to Creating Oracle AI Database

To run prerequisites checks, use the --executePrereqs command option. This will perform only the prerequisite checks without performing the actual Oracle AI Database creation.

  1. Connect to the virtual machine as the opc user.

    For detailed instructions, see Connecting to a Virtual Machine with SSH.

  2. Start a root user command shell:

    sudo -s
  3. Run the following command:

    dbaascli database create --dbName database name --oracleHome Oracle Home Path --executePrereqs

    Parameters:

    Parameter Description
    --dbName specifies the name of the database
    --oracleHome specifies the Oracle home location
  4. Exit the root user command shell:

    exit

    For more details on advanced supported options, see dbaascli database create.

Resuming or Reverting Oracle AI Database Creation Operation

To resume or revert a failed database creation operation, use the --resume or --revert command option.

For example:

dbaascli database create --dbName database name --oracleHome Oracle Home Path --resume

Note:

Using dbaascli to Duplicate a Cloud Database

You can create a duplicate database using dbaascli. This new database can be in the same cloud region as the source region or across the regions. The following steps describe how to create a duplicate database on cloud.

Note: If a database is configured with OCI Vault for TDE encryption and you want to duplicate a database, then refer to the following sections.

Prepare for duplication:

Ensure that the following prerequisites are met:

Run prerequisite checks:

To run prerequisites checks, use the --executePrereqs command option. This will perform only the prerequisite checks without performing the actual Oracle Database duplication.

dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --sourceDBTdeConfigMethod FILE --tdeConfigMethod FILE --executePrereqs

Duplicate the database:

dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --sourceDBTdeConfigMethod FILE --tdeConfigMethod FILE

Note: If source database is using OKV for TDE keystore management, current duplicate database operation does not support this configuration.

Duplicate an On-Premises Database

Using dbaascli, you can duplicate an on-prem database onto the cloud. This can be done with the dbaascli database duplicate command. This command creates a new database on the cloud, which is a duplicate of an on-prem database along with its data. While this process is going on, the on-prem database remains still operational. You can migrate your applications to the duplicated database on the cloud after due verification.

Prepare for duplication:

The migration process includes the following prerequisites to be met.

Verify the necessary RPMs:

This process requires a minimum dbaastools RPM version of 23.3.2.0.0 but updating to the latest dbaastools rpm is always recommended.

Run the prerequisite checks:

To run the prerequisite checks, use the --executePrereqs command option. This will perform only the prerequisite checks without performing the actual Oracle Database duplication.

dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet> --executePrereqs

Duplicate the database:

Duplicate the database using the following command:

dbaascli database duplicate --dbName <database name> --oracleHome <Oracle Home Path> --sourceDBConnectionString <source database EZConnect string> --sourceDBTDEWalletLocation <location of copied wallet>

For example:

dbaascli database duplicate --sourceDBConnectionString xyzhost.oracle.com:1521/dbuniquename.oracle.com --dbName orcl --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_1 --sourceDBTDEWalletLocation /tmp/wallet_copy/tde --waitForCompletion false

Upon successful completion of this command, the database is duplicated to Cloud and ready for sanity checks for application usage. Once verification is done, application connections can be migrated to the Cloud database.

Refer to dbaascli database duplicate -help for additional configuration options.

Few considerations for migration:

Troubleshooting the database duplication:

If the operation fails, you will have an option to resume the operation by providing the --resume argument to the same command. Alternatively, clean up the database using dbaascli database delete -dbname <dbname> -force, and then rerun the database duplicate command.