Create a database from the command-line interface.
Note:
If you provisioned the appliance without creating an initial database, then you must create a Oracle home. If the version of the database home is different from the migrated database, create a database home for the migrated database. You might want to create a database home specifically for the migrated database.
Caution:
When you create a database with Transparent Data Encryption (TDE) enabled, you are prompted to set a password for the TDE wallet. Provide a strong password for security compliance. Enter this password carefully when setting it for the first time, and ensure that this password is available to you at all times for database management operations. Failure to provide the TDE wallet password when prompted, will cause an error in accessing encrypted data.
This example creates a new database named PRODDB with database version 19.10,
and a new database home, if a database home does not exist.
1. Use the odacli list-dbhomes command to display a list of database homes
and verify that a database home exists for the database version.
Note the ID if you want to use an existing database home or if you want to get more details. Use the odacli describe-dbhomes command to get more
details about a specific database home.
# odacli list-dbhomes ID Name DB Version --- --- --- b727bf80-c99e-4846-ac1f-28a81a725df6 OraDB199_home1 19.10.0.0.0 (continued) Home Location --- /u01/app/orauser/product/19.0.0.0/dbhome_1
2. Create a database home if a database home does not exist for the database version.
If you want to create a database home for specifically for the migrated database, you can use the odacli create-dbhome command, or you can create the
database home when you create the database. The example creates a database home for database version 19.10.0.0.0.
# odacli create-dbhome -v 19.10.0.0.0
3. Create a database. You can use an existing database home ID or you can create a database home when creating the database.
To create a database named PRODDB that uses an existing database home with ID b727bf80-c99e-4846-ac1f-28a81a725df6:
# odacli create-database -n PRODDB -io -dh b727bf80-c99e-4846- ac1f-28a81a725df6
To create a database named PRODDB with database version 19.10.0.0.0 and a
database home:
# odacli create-database -n PRODDB -v 19.10.0.0.0 -io
To create a TDE-enabled database named PRODDB:
# odacli create-database -n PRODDB -t
Cloning a Database from Backup
Use the Browser User Interface to clone a database from a backup.
When you backup a database in Oracle Database Appliance, a backup report is created. Save the backup report as a JSON file and you can use the file to create a database on the same appliance, or a different appliance.
The following are the prerequisites to cloning a database from a backup:
1. The source database backup location must be Object Store or External FRA (Network File System).
2. If you use Object Store backup location, then obtain Object Store Credentials for the host.
3. If you use an External FRA (Network File System) backup location, then obtain the Network File System (NFS) mount point location.
4. Create a backup policy using the object store credentials or NFS mount point as the backup destination.
5. Attach the backup policy to the database that you want to backup. If the source database does not have TDE enabled, then providing the Backup Encryption password is mandatory when attaching Objectstore backup policy. However, the Backup Encryption password is optional when attaching the NFS backup policy. If the source database has TDE enabled, then you must specify the TDE password, and not the Backup Encryption password.
6. Create a manual backup of the database and save the backup report generated when the backup completes.
Follow these steps to create a database from backup:
1. Log into the Browser User Interface:
https://host-ip-address:7093/mgmt/index.html 2. Click the Database tab.
3. Click Create Database to display the Create Database page.
4. Click Clone Database from Backup, then click Next to display the Clone Database from Backup page.
5. Select the Backup Destination from which you want to create the database. If your backup destination is ObjectStore:
a. Select Backup Destination as ObjectStore.
b. Select your Object Store Credential Name.
c. Enter the password in the Backup Encryption Passwords field and the
Confirm Backup Encryption Passwords field.
If your backup destination is Network File System (NFS):
a. Select Backup Destination as External FRA.
b. Enter the password in the Backup Encryption Passwords field and the
Confirm Backup Encryption Passwords field.
6. Click Browse and select the backup report from which you want to create the database.
When the backup report is loaded, additional fields appear on the page and are populated based on the backup report. You can edit some of the fields.
For Standard Edition Oracle Database 19c or later, you cannot clone Oracle RAC or Oracle RAC One Node Database. You can only clone a single-instance Oracle Database. For Standard Edition Oracle Database 19.6 or later, you can choose to enable high-availability for single-instance database.
7. In the DB Name field, enter a name for the database.
The name must contain lowercase alphanumeric characters and cannot exceed 8 characters. The Oracle system identifier (SID) is always set to the database name.
8. Enter the password in the SYS and PDB Admin User Password field and the
Confirm Password field.
9. Specify the Networks.
10. If your source database has Transparent Database Encryption (TDE) enabled, then you can enable TDE on the cloned database. If the source database has TDE enabled, then the backup report has the TDE wallet backup location and the TDE
Wallet Backup Location field in the BUI displays this value. Specify and confirm
the TDE Password.
11. Click Create.
12. Click Yes to confirm that you want to clone a database from the selected Object Store or External FRA.
When you submit the job, the job ID and a link to the job appears. Click the link to display the job status and details.
13. Validate that the job completed. You can track the job in the Activity tab in the Browser User Interface, or run the command odacli describe-job with the
job ID.