Tag Archives: create db 19c

Create DB 19C – DBCA-SILENT

CREATE NON-CONTAINER DATABASE ON ORACLE 19C 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 COKE 

Database Binary Version: 19.3.0.0.0
OS                     : Linux x86_64


2. Set the Environment

[oracle@rac1 ~]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
[oracle@rac1 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@rac1 ~]$ which dbca
/u01/app/oracle/product/19.0.0/dbhome_1/bin/dbca
[oracle@rac1 ~]$ dbca 

-- No need to create directory COKE, it will create automatically by dbca


3. Create Database using DBCA silent mode

[oracle@rac1 ~]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName COKE.rajasekhar.com -sid COKE -sysPassword Coke123$ -systemPassword Coke@123 -emConfiguration NONE -datafileDestination /u01/app/oracle/oradata -storageType FS -characterSet AL32UTF8
Prepare for db operation
10% complete
Copying database files
40% complete
Creating and starting Oracle instance
42% complete
46% complete
50% complete
54% complete
60% complete
Completing Database Creation
66% complete
69% complete
70% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/COKE.
Database Information:
Global Database Name:COKE.rajasekhar.com
System Identifier(SID):COKE
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/COKE/COKE.log" for further details.
[oracle@rac1 ~]$


4. Verify

[oracle@rac1 ~]$ cat /etc/oratab | grep -i COKE
COKE:/u01/app/oracle/product/19.0.0/dbhome_1:N
[oracle@rac1 ~]$

[oracle@rac1 ~]$ ps -ef | grep pmon
oracle    4273     1  0 19:53 ?        00:00:00 ora_pmon_COKE
oracle    5240  2552  0 19:56 pts/0    00:00:00 grep --color=auto pmon
[oracle@rac1 ~]$

[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [dell] ? COKE
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jan 26 19:57:31 2020
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

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

NAME      OPEN_MODE            CDB
--------- -------------------- ---
COKE      READ WRITE           NO <----

SQL>

SQL> show con_name

CON_NAME
------------------------------
COKE
SQL>
SQL> archive log list
Database log mode              No Archive Mode <----
Automatic archival             Disabled
Archive destination            /u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch
Oldest online log sequence     3
Current log sequence           5
SQL>
SQL> select name from v$datafile
UNION
select name from v$tempfile; 

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/COKE/sysaux01.dbf
/u01/app/oracle/oradata/COKE/system01.dbf
/u01/app/oracle/oradata/COKE/temp01.dbf
/u01/app/oracle/oradata/COKE/undotbs01.dbf
/u01/app/oracle/oradata/COKE/users01.dbf

SQL> 

listener.ora

LISTENER_COKE =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac1.rajasekhar.com)(PORT = 1523))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1523))
    )
  )

SID_LIST_LISTENER_COKE =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = COKE.rajasekhar.com)
      (ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1)
      (SID_NAME = COKE)
    )
  )

  
tnsnames.ora
 
COKE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1.rajasekhar.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = COKE.rajasekhar.com)
    )
  )


[oracle@rac1 admin]$ tnsping COKE

TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 26-JAN-2020 20:07:59

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

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


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rac1.rajasekhar.com)(PORT = 1523)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = COKE.rajasekhar.com)))
OK (10 msec)
[oracle@rac1 admin]$

[oracle@rac1 admin]$ lsnrctl status LISTENER_COKE

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 26-JAN-2020 20:09:54

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1.rajasekhar.com)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_COKE
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                26-JAN-2020 20:03:42
Uptime                    0 days 0 hr. 6 min. 12 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rac1/listener_coke/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.rajasekhar.com)(PORT=1523)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1523)))
Services Summary...
Service "COKE.rajasekhar.com" has 1 instance(s).
  Instance "COKE", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac1 admin]$

[oracle@rac1 ~]$ sqlplus sys@coke as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jan 26 20:15:24 2020
Version 19.3.0.0.0

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

Enter password:

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

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

SYSDATE
-----------------------------
26-JAN-2020 20:15:45

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
Email: br8dba@gmail.com
WhatsApp : +
Linkedin: https://www.linkedin.com/in/rajasekhar-amudala/

Create DB 19C – DBCA-GUI

Create Non-CDB Oracle Database 19c on Linux using DBCA (GUI)

Table of Contents
___________________________________________________________________________________________________

1. Environment
2. Invoke dbca
3. Verify
___________________________________________________________________________________________________


1. Environment

Platform		: Linuxx86_64 (OEL 7)
Server Name		: RAC1.RAJASEKHAR.COM, IP: 192.168.2.101
DB Version		: Oracle 19.3.0.0.0, File system: Normal
NON-CDB Name	        : DELL
Oracle Home Path        : /u01/app/oracle/product/19.0.0/dbhome_1


2. Invoke dbca

[oracle@rac1 ~]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
[oracle@rac1 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@rac1 ~]$ which dbca
/u01/app/oracle/product/19.0.0/dbhome_1/bin/dbca  <---
[oracle@rac1 ~]$ dbca 


































3. Verify

[oracle@rac1 ~]$ cat /etc/oratab | grep -i dell
dell:/u01/app/oracle/product/19.0.0/dbhome_1:N  <-----
[oracle@rac1 ~]$

[oracle@rac1 ~]$ ps -ef | grep pmon
oracle   24068     1  0 18:57 ?        00:00:00 ora_pmon_dell
oracle   25204  2552  0 19:01 pts/0    00:00:00 grep --color=auto pmon
[oracle@rac1 ~]$

[oracle@rac1 ~]$ . oraenv
ORACLE_SID = [DELL] ? dell
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jan 26 19:02:20 2020
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

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

NAME      OPEN_MODE            CDB
--------- -------------------- ---
DELL      READ WRITE           NO  <-----

SQL> show con_name

CON_NAME
------------------------------
dell
SQL> select name from v$datafile
UNION
select name from v$tempfile; 

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/DELL/sysaux01.dbf
/u01/app/oracle/oradata/DELL/system01.dbf
/u01/app/oracle/oradata/DELL/temp01.dbf
/u01/app/oracle/oradata/DELL/undotbs01.dbf
/u01/app/oracle/oradata/DELL/users01.dbf

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@rac1 ~]$ ps -ef | grep tns
root        15     2  0 12:28 ?        00:00:00 [netns]
oracle   19876     1  0 18:41 ?        00:00:00 /u01/app/oracle/product/19.0.0/dbhome_1/bin/tnslsnr LISTENER_DELL -inherit
oracle   25594  2552  0 19:03 pts/0    00:00:00 grep --color=auto tns
[oracle@rac1 ~]$

[oracle@rac1 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER_DELL =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac1.rajasekhar.com)(PORT = 1522))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
    )
  )

[oracle@rac1 admin]$

[oracle@rac1 ~]$ lsnrctl status LISTENER_DELL | grep -i "dell"
Alias                     LISTENER_DELL
Listener Log File         /u01/app/oracle/diag/tnslsnr/rac1/listener_dell/alert/log.xml
Service "dell.rajasekhar.com" has 1 instance(s).
  Instance "dell", status READY, has 1 handler(s) for this service...
Service "dellXDB.rajasekhar.com" has 1 instance(s).
  Instance "dell", status READY, has 1 handler(s) for this service...
[oracle@rac1 ~]$



[oracle@rac1 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_DELL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = rac1.rajasekhar.com)(PORT = 1522))


DELL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac1.rajasekhar.com)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dell.rajasekhar.com)
    )
  )

[oracle@rac1 admin]$


[oracle@rac1 ~]$ tnsping dell

TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 26-JAN-2020 19:04:49

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

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


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

[oracle@rac1 ~]$ sqlplus sys@dell as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Jan 26 19:06:48 2020
Version 19.3.0.0.0

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

Enter password:

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

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

SYSDATE
-----------------------------
26-JAN-2020 19:07:06

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
Email: br8dba@gmail.com
WhatsApp : +
Linkedin: https://www.linkedin.com/in/rajasekhar-amudala/