Tag Archives: CREATE NON-CDB ON ORACLE 12C IN SILENT MODE

CREATE NON-CDB ON ORACLE 12C IN SILENT MODE

CREATE NON-CONTAINER DATABASE ON ORACLE 12C IN SILENT MODE USING DBCA

Contents
___________________________________________________________________________________________________

1. Overview
2. Set the Environment
3. Create Database using DBCA silent mode
4. Verify
___________________________________________________________________________________________________

1. Overview

Usually to create database we will use DBCA graphical user interface.

Some times may not have access to a graphical user interface then we can use the DBCA silent mode to create a database.

We are going to create NON-CONTAINER database as EOPSDEV 

Database Binary Version: 12.2.0.1.0
OS                     : Linux x86_64


2. Set the Environment

[oracle@localhost ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1
[oracle@localhost ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@localhost ~]$ which dbca
/u01/app/oracle/product/12.2.0.1/bin/dbca
[oracle@localhost ~]$


[oracle@localhost ~]$ mkdir -p /u02/oradata
[oracle@localhost ~]$

-- No need to create folder EOPSDEV, it will create automatically by dbca


3. Create Database using DBCA silent mode

[oracle@localhost ~]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName EOPSDEV.localhost.com -sid EOPSDEV -sysPassword sys -systemPassword sys -emConfiguration NONE -datafileDestination /u02/oradata -storageType FS -characterSet AL32UTF8
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Copying database files
1% complete
2% complete
18% complete
33% complete
Creating and starting Oracle instance
35% complete
40% complete
44% complete
49% complete
50% complete
53% complete
55% complete
Completing Database Creation
56% complete
57% complete
58% complete
62% complete
65% complete
66% complete
Executing Post Configuration Actions
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/EOPSDEV/EOPSDEV.log" for further details.
[oracle@localhost ~]$


4. Verify

[oracle@localhost ~]$ cat /etc/oratab | grep -i EOPSDEV
EOPSDEV:/u01/app/oracle/product/12.2.0.1:N
[oracle@localhost ~]$

[oracle@localhost ~]$ ps -ef | grep pmon
oracle    8975     1  0 08:16 ?        00:00:00 ora_pmon_EOPSDEV <---
oracle    9865  6053  0 08:26 pts/0    00:00:00 grep pmon
[oracle@localhost ~]$

[oracle@localhost ~]$ . oraenv
ORACLE_SID = [oracle] ? EOPSDEV
The Oracle base has been set to /u01/app/oracle
[oracle@localhost ~]$

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Jun 22 08:27:03 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name,open_mode,cdb from v$database;

NAME      OPEN_MODE            CDB
--------- -------------------- ---
EOPSDEV   READ WRITE           NO <------ NON-CDB

SQL> 
SQL> show con_name

CON_NAME
------------------------------
EOPSDEV

SQL>

SQL> archive log list
Database log mode              No Archive Mode  <------
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/12.2.0.1/dbs/arch
Oldest online log sequence     1
Current log sequence           1
SQL>

SQL> select name from v$datafile
UNION
select name from v$tempfile;  2    3

NAME
--------------------------------------------------------------------------------
/u02/oradata/EOPSDEV/sysaux01.dbf
/u02/oradata/EOPSDEV/system01.dbf
/u02/oradata/EOPSDEV/temp01.dbf
/u02/oradata/EOPSDEV/undotbs01.dbf
/u02/oradata/EOPSDEV/users01.dbf

SQL>

[oracle@localhost ~]$ ps -ef | grep tns
root        22     2  0 06:34 ?        00:00:00 [netns]
oracle    2946     1  0 06:35 ?        00:00:00 /u01/app/oracle/product/12.2.0.1/bin/tnslsnr LISTENER -inherit
oracle   10545  6053  0 08:31 pts/0    00:00:00 grep tns
[oracle@localhost ~]$
[oracle@localhost ~]$ lsnrctl status LISTENER | grep -i EOPSDEV
Service "EOPSDEV.localhost.com" has 1 instance(s).
  Instance "EOPSDEV", status READY, has 1 handler(s) for this service...
Service "EOPSDEVXDB.localhost.com" has 1 instance(s).
  Instance "EOPSDEV", status READY, has 1 handler(s) for this service...
[oracle@localhost ~]$

TNS Entry Automatically will be added to TNSNAMES.ORA

[oracle@localhost ~]$ tnsping EOPSDEV

TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 22-JUN-2018 08:31:55

Copyright (c) 1997, 2016, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/12.2.0.1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = EOPSDEV.localhost.com)))
OK (10 msec)
[oracle@localhost ~]$

EOPSDEV =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = EOPSDEV.localhost.com)
    )
  )

[oracle@localhost ~]$ sqlplus sys@EOPSDEV AS SYSDBA

SQL*Plus: Release 12.2.0.1.0 Production on Fri Jun 22 08:33:13 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> 
SQL> select to_char(sysdate,'DD-MON-YYYY HH24:MI:SS') "SYSDATE" FROM DUAL;

SYSDATE
-----------------------------
22-JUN-2018 08:35:20

SQL> 

Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.

Thank you,
Rajasekhar Amudala