This document describe step by step procedure to create database in command line on Oracle Database Appliance x6-2 Small,Medium and Large .
1. Execute create database command to create new database.
[root@oak ~]# odacli create-database -n testdb -m -cl OLTP -s odb1 -v 12.1.0.2
Password for SYS,SYSTEM and PDB Admin:
{
"jobId" : "3f81ab69-19be-46b4-b2ff-f14aaf1bc709",
"status" : "Created",
"message" : null,
"reports" : [ ],
"createTimestamp" : "June 15, 2017 18:00:18 PM PHT",
"resourceList" : [ ],
"description" : "Database service creation with db name: testdb",
"updatedTime" : "June 15, 2017 18:00:18 PM PHT"
}
2. Describe the job to see the status.
[root@oak ~]# odacli describe-job -i 3f81ab69-19be-46b4-b2ff-f14aaf1bc709
Job details
----------------------------------------------------------------
ID: 3f81ab69-19be-46b4-b2ff-f14aaf1bc709
Description: Database service creation with db name: testdb
Status: Running
Created: June 15, 2017 6:00:18 PM PHT
Message:
Task Name Start Time End Time Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Setting up ssh equivalance June 15, 2017 6:00:18 PM PHT June 15, 2017 6:00:18 PM PHT Success
Creating volume dattestdb June 15, 2017 6:00:18 PM PHT June 15, 2017 6:00:28 PM PHT Success
Creating ACFS filesystem for DATA June 15, 2017 6:00:28 PM PHT June 15, 2017 6:00:34 PM PHT Success
Creating DbHome Directory June 15, 2017 6:00:34 PM PHT June 15, 2017 6:00:34 PM PHT Success
Extract DB clones June 15, 2017 6:00:34 PM PHT June 15, 2017 6:01:42 PM PHT Success
Clone Db home June 15, 2017 6:01:42 PM PHT June 15, 2017 6:02:39 PM PHT Success
Enable DB options June 15, 2017 6:02:39 PM PHT June 15, 2017 6:02:47 PM PHT Success
Run Root DB scripts June 15, 2017 6:02:47 PM PHT June 15, 2017 6:02:47 PM PHT Success
configuring Net Security June 15, 2017 6:03:00 PM PHT June 15, 2017 6:03:00 PM PHT Success
Database Service creation June 15, 2017 6:03:00 PM PHT June 15, 2017 6:03:00 PM PHT Running
Database Creation June 15, 2017 6:03:00 PM PHT June 15, 2017 6:03:00 PM PHT Running
3. list the databases to see the creation job status.
[root@oak ~]# odacli list-databases
ID DB Name DB Version CDB Class Shape Storage Status
---------------------------------------- ---------- -------------------- ---------- -------- -------- ---------- ----------
63079e59-9239-45ad-8eef-822179fa3ccc testdb 12.1.0.2.170117 false OLTP odb1 ACFS Creating
4. Again, Describe the job to see the successful status of all the steps.
[root@oak ~]# odacli describe-job -i 3f81ab69-19be-46b4-b2ff-f14aaf1bc709
Job details
----------------------------------------------------------------
ID: 3f81ab69-19be-46b4-b2ff-f14aaf1bc709
Description: Database service creation with db name: testdb
Status: Success
Created: June 15, 2017 6:00:18 PM PHT
Message:
Task Name Start Time End Time Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Setting up ssh equivalance June 15, 2017 6:00:18 PM PHT June 15, 2017 6:00:18 PM PHT Success
Creating volume dattestdb June 15, 2017 6:00:18 PM PHT June 15, 2017 6:00:28 PM PHT Success
Creating ACFS filesystem for DATA June 15, 2017 6:00:28 PM PHT June 15, 2017 6:00:34 PM PHT Success
Creating DbHome Directory June 15, 2017 6:00:34 PM PHT June 15, 2017 6:00:34 PM PHT Success
Extract DB clones June 15, 2017 6:00:34 PM PHT June 15, 2017 6:01:42 PM PHT Success
Clone Db home June 15, 2017 6:01:42 PM PHT June 15, 2017 6:02:39 PM PHT Success
Enable DB options June 15, 2017 6:02:39 PM PHT June 15, 2017 6:02:47 PM PHT Success
Run Root DB scripts June 15, 2017 6:02:47 PM PHT June 15, 2017 6:02:47 PM PHT Success
configuring Net Security June 15, 2017 6:03:00 PM PHT June 15, 2017 6:03:00 PM PHT Success
Database Service creation June 15, 2017 6:03:00 PM PHT June 15, 2017 6:08:48 PM PHT Success
Database Creation June 15, 2017 6:03:00 PM PHT June 15, 2017 6:07:33 PM PHT Success
Running DataPatch June 15, 2017 6:08:27 PM PHT June 15, 2017 6:08:48 PM PHT Success
updating the Database version June 15, 2017 6:08:48 PM PHT June 15, 2017 6:08:48 PM PHT Success
create Users tablespace June 15, 2017 6:08:48 PM PHT June 15, 2017 6:08:50 PM PHT Success
5. List the database to verfiy the creation status.
[root@oak ~]# odacli list-databases
ID DB Name DB Version CDB Class Shape Storage Status
---------------------------------------- ---------- -------------------- ---------- -------- -------- ---------- ----------
63079e59-9239-45ad-8eef-822179fa3ccc testdb 12.1.0.2 false OLTP odb1 ACFS Configured
6. check the databbase process as Oracle user.
[oracle@oak dbvagent]$ ps -ef | grep pmon
grid 7127 1 0 09:49 ? 00:00:01 asm_pmon_+ASM1
oracle 46054 1 0 10:20 ? 00:00:00 ora_pmon_orcl12c
oracle 55026 1 0 18:08 ? 00:00:00 ora_pmon_testdb
oracle 60386 30420 0 18:09 pts/1 00:00:00 grep pmon
oracle 87635 1 0 10:29 ? 00:00:01 ora_pmon_orcl11g
7. Connect to the database.
[oracle@oak dbvagent]$ . oraenv
ORACLE_SID = [orcl12c] ? testdb
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oak dbvagent]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu Jun 15 18:09:48 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
TESTDB READ WRITE PRIMARY
1. Execute create database command to create new database.
[root@oak ~]# odacli create-database -n testdb -m -cl OLTP -s odb1 -v 12.1.0.2
Password for SYS,SYSTEM and PDB Admin:
{
"jobId" : "3f81ab69-19be-46b4-b2ff-f14aaf1bc709",
"status" : "Created",
"message" : null,
"reports" : [ ],
"createTimestamp" : "June 15, 2017 18:00:18 PM PHT",
"resourceList" : [ ],
"description" : "Database service creation with db name: testdb",
"updatedTime" : "June 15, 2017 18:00:18 PM PHT"
}
2. Describe the job to see the status.
[root@oak ~]# odacli describe-job -i 3f81ab69-19be-46b4-b2ff-f14aaf1bc709
Job details
----------------------------------------------------------------
ID: 3f81ab69-19be-46b4-b2ff-f14aaf1bc709
Description: Database service creation with db name: testdb
Status: Running
Created: June 15, 2017 6:00:18 PM PHT
Message:
Task Name Start Time End Time Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Setting up ssh equivalance June 15, 2017 6:00:18 PM PHT June 15, 2017 6:00:18 PM PHT Success
Creating volume dattestdb June 15, 2017 6:00:18 PM PHT June 15, 2017 6:00:28 PM PHT Success
Creating ACFS filesystem for DATA June 15, 2017 6:00:28 PM PHT June 15, 2017 6:00:34 PM PHT Success
Creating DbHome Directory June 15, 2017 6:00:34 PM PHT June 15, 2017 6:00:34 PM PHT Success
Extract DB clones June 15, 2017 6:00:34 PM PHT June 15, 2017 6:01:42 PM PHT Success
Clone Db home June 15, 2017 6:01:42 PM PHT June 15, 2017 6:02:39 PM PHT Success
Enable DB options June 15, 2017 6:02:39 PM PHT June 15, 2017 6:02:47 PM PHT Success
Run Root DB scripts June 15, 2017 6:02:47 PM PHT June 15, 2017 6:02:47 PM PHT Success
configuring Net Security June 15, 2017 6:03:00 PM PHT June 15, 2017 6:03:00 PM PHT Success
Database Service creation June 15, 2017 6:03:00 PM PHT June 15, 2017 6:03:00 PM PHT Running
Database Creation June 15, 2017 6:03:00 PM PHT June 15, 2017 6:03:00 PM PHT Running
3. list the databases to see the creation job status.
[root@oak ~]# odacli list-databases
ID DB Name DB Version CDB Class Shape Storage Status
---------------------------------------- ---------- -------------------- ---------- -------- -------- ---------- ----------
63079e59-9239-45ad-8eef-822179fa3ccc testdb 12.1.0.2.170117 false OLTP odb1 ACFS Creating
4. Again, Describe the job to see the successful status of all the steps.
[root@oak ~]# odacli describe-job -i 3f81ab69-19be-46b4-b2ff-f14aaf1bc709
Job details
----------------------------------------------------------------
ID: 3f81ab69-19be-46b4-b2ff-f14aaf1bc709
Description: Database service creation with db name: testdb
Status: Success
Created: June 15, 2017 6:00:18 PM PHT
Message:
Task Name Start Time End Time Status
---------------------------------------- ----------------------------------- ----------------------------------- ----------
Setting up ssh equivalance June 15, 2017 6:00:18 PM PHT June 15, 2017 6:00:18 PM PHT Success
Creating volume dattestdb June 15, 2017 6:00:18 PM PHT June 15, 2017 6:00:28 PM PHT Success
Creating ACFS filesystem for DATA June 15, 2017 6:00:28 PM PHT June 15, 2017 6:00:34 PM PHT Success
Creating DbHome Directory June 15, 2017 6:00:34 PM PHT June 15, 2017 6:00:34 PM PHT Success
Extract DB clones June 15, 2017 6:00:34 PM PHT June 15, 2017 6:01:42 PM PHT Success
Clone Db home June 15, 2017 6:01:42 PM PHT June 15, 2017 6:02:39 PM PHT Success
Enable DB options June 15, 2017 6:02:39 PM PHT June 15, 2017 6:02:47 PM PHT Success
Run Root DB scripts June 15, 2017 6:02:47 PM PHT June 15, 2017 6:02:47 PM PHT Success
configuring Net Security June 15, 2017 6:03:00 PM PHT June 15, 2017 6:03:00 PM PHT Success
Database Service creation June 15, 2017 6:03:00 PM PHT June 15, 2017 6:08:48 PM PHT Success
Database Creation June 15, 2017 6:03:00 PM PHT June 15, 2017 6:07:33 PM PHT Success
Running DataPatch June 15, 2017 6:08:27 PM PHT June 15, 2017 6:08:48 PM PHT Success
updating the Database version June 15, 2017 6:08:48 PM PHT June 15, 2017 6:08:48 PM PHT Success
create Users tablespace June 15, 2017 6:08:48 PM PHT June 15, 2017 6:08:50 PM PHT Success
5. List the database to verfiy the creation status.
[root@oak ~]# odacli list-databases
ID DB Name DB Version CDB Class Shape Storage Status
---------------------------------------- ---------- -------------------- ---------- -------- -------- ---------- ----------
63079e59-9239-45ad-8eef-822179fa3ccc testdb 12.1.0.2 false OLTP odb1 ACFS Configured
6. check the databbase process as Oracle user.
[oracle@oak dbvagent]$ ps -ef | grep pmon
grid 7127 1 0 09:49 ? 00:00:01 asm_pmon_+ASM1
oracle 46054 1 0 10:20 ? 00:00:00 ora_pmon_orcl12c
oracle 55026 1 0 18:08 ? 00:00:00 ora_pmon_testdb
oracle 60386 30420 0 18:09 pts/1 00:00:00 grep pmon
oracle 87635 1 0 10:29 ? 00:00:01 ora_pmon_orcl11g
7. Connect to the database.
[oracle@oak dbvagent]$ . oraenv
ORACLE_SID = [orcl12c] ? testdb
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oak dbvagent]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu Jun 15 18:09:48 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
TESTDB READ WRITE PRIMARY
No comments:
Post a Comment