Step 4 - Create a New Database with the CLI
There are many options you can specify when using the CLI to create a new database. Type odacli create-database –h to see the options. Note that only the database name is required. Create a new database and database home named db3
as follows. You will be prompted for a password for SYS, SYSTEM, and PDB admin. To meet password complexity requirements, use WELcome12##
for this lab.
$ odacli create-database -n db3 -v 19.13.0.0
Job details
----------------------------------------------------------------
ID: 2051bf5b-4815-4cd2-8d85-e51367ba3269
Description: Database service creation with db name: db3
Status: Created
Created: February 26, 2022 1:45:49 AM UTC
Message:
Task Name Start Time End Time Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
$ odacli describe-job -i 2051bf5b-4815-4cd2-8d85-e51367ba3269
Job details
----------------------------------------------------------------
ID: 2051bf5b-4815-4cd2-8d85-e51367ba3269
Description: Database service creation with db name: db3
Status: Success
Created: February 26, 2022 1:45:49 AM UTC
Message:
Task Name Start Time End Time Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Validating dbHome available space February 26, 2022 1:45:50 AM UTC February 26, 2022 1:45:50 AM UTC Success
Setting up ssh equivalance February 26, 2022 1:45:50 AM UTC February 26, 2022 1:45:50 AM UTC Success
Setting up ssh equivalance February 26, 2022 1:45:50 AM UTC February 26, 2022 1:45:50 AM UTC Success
Creating ACFS database home February 26, 2022 1:45:51 AM UTC February 26, 2022 1:45:51 AM UTC Success
Validating dbHome available space February 26, 2022 1:45:51 AM UTC February 26, 2022 1:45:51 AM UTC Success
Configuring user access to ACFS DBHome base storage February 26, 2022 1:45:51 AM UTC February 26, 2022 1:45:51 AM UTC Success
Creating DbHome Directory February 26, 2022 1:45:51 AM
In an actual appliance, this command would run a job in the background for approximately 40 minutes. As with the GUI, you can monitor the progress if you choose, but the Linux prompt returns immediately. Because this is a simulation, you should see your new database and home almost immediately. Verify creation of the new database using the following odacli command:
$ odacli list-databases
ID DB Name DB Type DB Version CDB Class Shape Storage Status DbHomeID
---------------------------------------- ---------- -------- -------------------- ---------- -------- -------- ---------------------- ----------------------------------------
d1e615c3-5855-4b19-9ad0-40b620ac5f13 db2 SI 19.13.0.0.211019 false OLTP odb1 ASM CONFIGURED a1314be1-2c6f-411f-b2c7-61444449f02b
324a42ea-bba2-477d-8bca-5a26af159f1c db3 SI 19.13.0.0.211019 false OLTP odb1 ASM CONFIGURED ecfa440e-2482-40c1-8ccd-67316cd48ba2