Sunday, 12 January 2025

Installation of Oracle Database using DBCA interactive mode

Installing a database using Database Configuration Assistant's (DBCA) graphical & interactive mode is quite simple. It's just like installing any other software but here you must take few decision when going through different screens. I'll talk about it with each snap below where needed.

Interactive method seems easier but is time consuming, as you grow experienced, you'll realize that using script to create database via Silent installation method is more convenient & faster.  

Follow below steps to install database using DBCA's interactive mode.

1) Run DBCA from '$ORACLE_HOME/bin" location via ORACLE user.

[oracle@oravm19c ~]$ cd $ORACLE_HOME/bin
[oracle@oravm19c bin]$ ls dbca*
dbca
[oracle@oravm19c bin]$ ./dbca

Note: For any issue with DISPLAY not opening, check my post - How to fix DISPLAY issue when installing Oracle Database Software?

2) Select option to 'Create Database'.


3) Select 'Advanced Configuration', it gives you more control in DB creation options.


4) Go with 'General Purpose' template.


5) Provide 'Global DB Name', SID would be auto filled but you can alter if you want. In the below options, decide whether you want to configured it as a Container database or not. Also, you have the option or create a PDB right or SKIP to create it later.
Note: You'll be only able to create a PDB later is you create your database as a container database. Otherwise it would be treated as a non-CDB which cannot have a PDB.
I have chosen to create as container database with no PDB at this point.


6) Option to change storage attributes for your Datafiles. I like to stick with template options.


7) 'Fast Recovery Area' and 'Archiving' can be enabled later. I am skipping it for now.


8) Choose to create a Listener if you don't have 1 on your server. Otherwise, any existing one would also be listed and you can choose to use that or have a new one.


9) Not going to use these for now, so skipping. Can be enabled later.


10) Provide memory to your database. I like to have control of both SGA and PGA memories hence going with 'Automatic Shared Memory Management'. Also other tabs shows options for processes, Character set and connection type 'Dedicated or Shared'. You can choose as per your need.


11) EM Database Express is with very limited options. Hence skipping.


12) Provide credentials for SYS and SYSTEM schema. You can choose to keep same password or different for both.


13) You can add post scripts, or it's ok to proceed with 'Create Database'.


14) Final summary of DB creation option. Crosscheck if everything is as per your need OR you want to alter anything. Click on FINISH to start DB creation.


15) Let it complete


15) And it's done.



Post Installation Checks:


Setup the environment and connect to your newly created database. You must run few queries to see if everything is working as expected.

[oracle@oravm19c bin]$ . oraenv
ORACLE_SID = [cdb1] ? 
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oravm19c bin]$ 
[oracle@oravm19c bin]$ 
[oracle@oravm19c bin]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Jan 11 10:39:29 2025
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 from V$database;

NAME	  OPEN_MODE
--------- --------------------
CDB1	  READ WRITE

SQL> show pdbs;

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO


[oracle@oravm19c bin]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 11-JAN-2025 10:47:25

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oravm19c.practice.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                11-JAN-2025 10:22:15
Uptime                    0 days 0 hr. 25 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.3.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oravm19c/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oravm19c.practice.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "86b637b62fdf7a65e053f706e80a27ca.practice.com" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "cdb1.practice.com" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
Service "cdb1XDB.practice.com" has 1 instance(s).
  Instance "cdb1", status READY, has 1 handler(s) for this service...
The command completed successfully

As you can see, my database is successfully created and is in READ WRITE mode, there are no PDBs except for SEED PDB which can be used further to created PDBs anytime. Also my listener is configured properly and ready to serve connections to CDB1's instance.

I hope this helps !!

No comments:

Post a Comment