Creating a Database System

Create an OCI Database with PostgreSQL database system.

After the necessary OCI prerequisites and network are in place, you can create the database system.

  1. Create or choose a vault for the database administrator password. For more information, see Managing Vaults.
  2. Create a key for the database password. For more information, see Managing Keys.
  3. Create a secret for the database password. For more information, see Managing Secrets.
    1. Open the navigation menu and click Databases. Under PostgreSQL, click Databases.
    2. (Optional) In the List scope section, under Compartment, select a compartment.
    3. Click Create PostgreSQL DB system.
    4. In the Create PostgreSQL DBSystem screen, select Create new DBsystem, then click Next.
    5. Set the DBsystem Configuration by providing values for the following:
      • DBsystem name: Enter a name for the database system.
      • Description: Optionally, enter a description for the database system.
      • PostgreSQL major version: Choose a major version of the PostgreSQL database. The only allowed value is 14.
    6. In the Database system section, enter a value for Node count. One primary node is required. Extra nodes are reserved as read replica nodes.
    7. Performance tier: Select the performance tier for the database. The default value is 300,000 IOPS. For more information, see Performance Tiers.
    8. Select an option for Data placement:
      • Regional: Data is durably stored in multiple availability domains in the region.
      • Availability Domain-specific: Data is durably stored in the selected availability domain.
    9. Set the Hardware configuration for the database system using the following:
      • OCPU count: Choose the number of OCPUs per node.
      • Available Shapes: Select the shape of the database nodes.
    10. Set the Network configuration of the database system by providing values for the following:
      • Virtual Cloud Network: Select the VCN in which you want to create the database. If you need to create a VCN, click create a VCN and see VCNs and Subnets.
      • Subnet: Choose the private subnet of the selected VCN.
      • Private IP address: A private IP address in the subnet for the database instance. The value is optional. If an IP address isn't provided, one is chosen from among the available IP addresses in the specified subnet.
    11. Provide the DBsystem administrator credentials to the database. Administrators don't get superuser access. An OCI Database with PostgreSQL admin user can create users and roles.
      1. Username: Specify the username of the administrator. This value can't be changed after the database system is created.
      2. Choose one of the following Password options:
        • Input password:
          1. Password: Specify the administrator password.
          2. Confirm password: Confirm the administrator password.
        • Use OCI Vault:
          1. Vault: Select the vault that contains the administrator password.
          2. Secret: Select the secret containing the administrator password.
          3. Secret version: Select a secret version.
    12. The Management policy section gives you the opportunity to specify backup and maintenance policies for the database system:
      1. Automatic backups: Select Enable automatic backups to enable automatic backups. If you don't select automatic backups, you must manage backups manually. We recommend that you enable automatic backups. After enabling automatic backups, you can set the following options:
        • Backup frequency: Choose how often a backup is created.
        • Day of the week: Choose the day of the week that the backup is created.
        • Backup start time: Choose the time that the backup is created.
        • Backup retention period (days): Enter a value, in days, that the backup will be retained before it's deleted by the system.
      2. Maintenance: Select a Maintenance type option. For more information, see Maintenance.
        • Set by Oracle: Oracle chooses the best day and time to start any essential maintenance.
        • Schedule your own maintenance: Specify the day of the week and the maintenance start time (in UTC timezone) that you want to schedule any essential maintenance activity, such as OS or instance upgrades. If you don't specify a day and time, Oracle chooses it for you.
    13. (Optional) Click Show advanced options to set configuration variables or add tags for the database system.
    14. (Optional) Configurations: Select an existing database configuration.
    15. (Optional) Tags: If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you're not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.
    16. After configuring the database system, click Next.
    17. Review the database system configuration, then click Create.
  • Use the oci psql db-system create command and required parameters to create a database system:

    oci psql db-system create --compartment-id <compartment_OCID> --db-version <db_version> --display-name <display_name> --network-details <file://network-details.json> --shape <shape> --storage-details <file://storage-details.json> --system-type <system_type> [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the CreateDbSystem operation to create a database system.

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.