This topic describes how to create and delete a PolarDB for PostgreSQL(Compatible with Oracle) database.

Create a database

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. Find the cluster and click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Databases.
  5. Click Create Database.
  6. In the Create Database panel, configure the parameters.
    ParameterDescription
    Database Name
    • The database name must start with a letter and end with a letter or digit.
    • The database name can contain lowercase letters, digits, underscores (_), and hyphens (-).
    • The name must be 2 to 64 characters in length.
    • The name must be unique within the instance.
    Note The database name cannot be test or another keyword that is reserved by the system.
    Database OwnerThe owner of the database. The owner is granted all permissions on the database.
    Supported Character SetThe character set supported by the database. Default value: UTF8. You can select another required character set from the drop-down list.
    CollateThe rule based on which character strings are sorted.
    CtypeThe type of characters supported by the database.
    DescriptionEnter a description for the database. The description can help you manage your database. It must meet the following requirements:
    • The description cannot contain the prefix http:// or https://.
    • The description must start with a letter.
    • The description can contain letters, digits, underscores (_), and hyphens (-).
    • It must be 2 to 256 characters in length.
  7. Click OK.

Delete a database

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. Find the cluster and click the cluster ID.
  4. In the left-side navigation pane, choose Settings and Management > Databases.
  5. Find the database that you want to delete and click Delete in the Actions column.
  6. In the message that appears, click OK.

Related API operations

OperationDescription
CreateDatabaseCreates a database.
DescribeDatabasesQueries the database list.
DeleteDatabaseDeletes a database.