Thursday, March 17, 2022

Create Passwordfile inside DiskGroup for RAC database and add to srvctl

Create Passwordfile inside DiskGroup for RAC database and add to srvctl:


Steps:
1. Check database status:
2. Check database configuration:
3. Create passwordfile inside diskgroup 
4. Add passwordfile into srvctl config:

1. Check database status:
[oracle@oraclenode1 dbs]$ srvctl status database -d TESTDB
Instance TESTDB1 is running on node oraclenode1
Instance TESTDB2 is running on node oraclenode2
[oracle@oraclenode1 dbs]$

2. Check database configuration:
[oracle@oraclenode1 dbhome_1]$ srvctl config database -d TESTDB
Database unique name: TESTDB
Database name: TESTDB
Oracle home: /u01/app/oracle/product/19.0.0.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/TESTDB/PARAMETERFILE/spfileTESTDB.ora
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,RECO
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: oinstall
OSOPER group: oinstall
Database instances: TESTDB1,TESTDB2
Configured nodes: oraclenode1,oraclenode2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[oracle@oraclenode1 dbhome_1]$

3. Create passwordfile inside diskgroup 
[oracle@oraclenode1 dbs]$ orapwd file='+DATA/TESTDB/PASSWORD/orapwTESTDB' dbuniquename='TESTDB'
Enter password for SYS:
[oracle@oraclenode1 dbs]$

[oracle@oraclenode1 ~]$ asmcmd -p
ASMCMD [+] > cd +DATA/TESTDB/PASSWORD
ASMCMD [+DATA/TESTDB/PASSWORD] > ls -l
Type      Redund  Striped  Time             Sys  Name
PASSWORD  UNPROT  COARSE   MAR 16 17:00:00  N    orapwtestdb => +DATA/TESTDB/PASSWORD/pwdtestdb.349.1099502001
PASSWORD  UNPROT  COARSE   MAR 16 17:00:00  Y    pwdtestdb.349.1099502001
ASMCMD [+DATA/TESTDB/PASSWORD] >

4. Add passwordfile into srvctl config:
[oracle@oraclenode1 dbs]$ srvctl modify database -d TESTDB -pwfile '+DATA/TESTDB/PASSWORD/orapwTESTDB'
[oracle@oraclenode1 dbs]$ srvctl config database -d TESTDB
Database unique name: TESTDB
Database name: TESTDB
Oracle home: /u01/app/oracle/product/19.0.0.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/TESTDB/PARAMETERFILE/spfileTESTDB.ora
Password file: +DATA/TESTDB/PASSWORD/orapwTESTDB
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,RECO
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: oinstall
OSOPER group: oinstall
Database instances: TESTDB1,TESTDB2
Configured nodes: oraclenode1,oraclenode2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[oracle@oraclenode1 dbs]$

Regards,
Mallik

sample listener.ora and tnsnames.ora file for RAC PROD and DR/Standby database

sample listener.ora and tnsnames.ora file for RAC PROD and DR/Standby database


PROD RAC DB:
DB: RAC12C (RAC12C1 & RAC12C2)
Nodes: node1 & node2

DR/Standby RAC DB:
DB: RACSB (RACSB1 & RACSB2)
Nodes: oraclenode1 & oraclenode2

PROD:

[oracle@node1 ~]$ srvctl status database -d RAC12C
Instance RAC12C1 is running on node node1
Instance RAC12C2 is running on node node2
[oracle@node1 ~]$

[oracle@node1 ~]$ lsnrctl status LISTENER_RAC12C

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 17-MAR-2022 00:22:44

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node1-vip.localdomain.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_RAC12C
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                24-FEB-2022 05:15:14
Uptime                    20 days 19 hr. 7 min. 30 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/node1/listener_rac12c/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.135)(PORT=1522)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.133)(PORT=1522)))
Services Summary...
Service "RAC12C" has 1 instance(s).
  Instance "RAC12C1", status READY, has 1 handler(s) for this service...
Service "RAC12CXDB" has 1 instance(s).
  Instance "RAC12C1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@node1 ~]$

[oracle@node2 ~]$ lsnrctl status LISTENER_RAC12C

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 17-MAR-2022 00:27:37

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node2-vip.localdomain.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_RAC12C
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                15-MAR-2022 05:05:35
Uptime                    1 days 19 hr. 22 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/node2/listener_rac12c/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.137)(PORT=1522)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.134)(PORT=1522)))
Services Summary...
Service "RAC12C" has 1 instance(s).
  Instance "RAC12C2", status READY, has 1 handler(s) for this service...
Service "RAC12CXDB" has 1 instance(s).
  Instance "RAC12C2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@node2 ~]$

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

ADR_BASE_LISTENER_RAC12C = /u01/app/oracle

LISTENER_RAC12C =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip.localdomain.com)(PORT = 1522))
  )

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_RAC12C=ON               # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER_RAC12C=SUBNET         # line added by Agent
[oracle@node1 admin]$

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

ADR_BASE_LISTENER_RAC12C = /u01/app/oracle

LISTENER_RAC12C =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.localdomain.com)(PORT = 1522))
  )


ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_RAC12C=ON               # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER_RAC12C=SUBNET         # line added by Agent
[oracle@node2 admin]$

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

RAC12C =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = nodescan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
    )
  )

RAC12C1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip.localdomain.com)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
      (SID = RAC12C1)
    )
  )

RAC12C2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.localdomain.com)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
      (SID = RAC12C2)
    )
  )

RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orclscan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
    )
  )

RACSB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode1-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB1)
    )
  )

RACSB2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode2-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB2)
    )
  )
[oracle@node1 admin]$

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

RAC12C =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = nodescan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
    )
  )

RAC12C1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip.localdomain.com)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
      (SID = RAC12C1)
    )
  )

RAC12C2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.localdomain.com)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
      (SID = RAC12C2)
    )
  )

RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orclscan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
    )
  )

RACSB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode1-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB1)
    )
  )

RACSB2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode2-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB2)
    )
  )
[oracle@node2 admin]$


DR/Standby:

[oracle@oraclenode1 admin]$ srvctl status database -d RACSB
Instance RACSB1 is running on node oraclenode1
Instance RACSB2 is running on node oraclenode2
[oracle@oraclenode1 admin]$

[oracle@oraclenode1 admin]$ lsnrctl status LISTENER_RACSB

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 17-MAR-2022 00:16:31

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oraclenode1-vip.localdomain.com)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_RACSB
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                15-MAR-2022 21:07:23
Uptime                    1 days 3 hr. 9 min. 7 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oraclenode1/listener_racsb/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.138)(PORT=1523)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.110)(PORT=1523)))
Services Summary...
Service "RACSB" has 1 instance(s).
  Instance "RACSB1", status READY, has 1 handler(s) for this service...
Service "RACSBXDB" has 1 instance(s).
  Instance "RACSB1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oraclenode1 admin]$ 

[oracle@oraclenode2 admin]$ lsnrctl status LISTENER_RACSB

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 17-MAR-2022 00:16:55

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oraclenode2-vip.localdomain.com)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_RACSB
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                15-MAR-2022 21:18:17
Uptime                    1 days 2 hr. 58 min. 38 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oraclenode2/listener_racsb/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.170)(PORT=1523)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.115)(PORT=1523)))
Services Summary...
Service "RACSB" has 1 instance(s).
  Instance "RACSB2", status READY, has 1 handler(s) for this service...
Service "RACSBXDB" has 1 instance(s).
  Instance "RACSB2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oraclenode2 admin]$

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

LISTENER_RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode1-vip.localdomain.com)(PORT = 1523))
  )

ADR_BASE_LISTENER_RACSB = /u01/app/oracle

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_RACSB=ON                # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER_RACSB=SUBNET          # line added by Agent
[oracle@oraclenode1 admin]$

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

LISTENER_RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode2-vip.localdomain.com)(PORT = 1523))
  )

ADR_BASE_LISTENER_RACSB = /u01/app/oracle

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_RACSB=ON                # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER_RACSB=SUBNET          # line added by Agent
[oracle@oraclenode2 admin]$

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

RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orclscan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
    )
  )

RACSB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode1-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB1)
    )
  )

RACSB2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode2-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB2)
    )
  )

RAC12C =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = nodescan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
    )
  )

RAC12C1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip.localdomain.com)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
      (SID = RAC12C1)
    )
  )

RAC12C2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.localdomain.com)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
      (SID = RAC12C2)
    )
  )

[oracle@oraclenode1 admin]$

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

RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orclscan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
    )
  )

RACSB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode1-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB1)
    )
  )

RACSB2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode2-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB2)
    )
  )

RAC12C =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = nodescan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
    )
  )

RAC12C1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip.localdomain.com)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
      (SID = RAC12C1)
    )
  )

RAC12C2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.localdomain.com)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RAC12C)
      (SID = RAC12C2)
    )
  )
[oracle@oraclenode2 admin]$

Regards,
Mallik

sample listener.ora and tnsnames.ora file for RAC database

sample listener.ora and tnsnames.ora file for RAC database:


Node1:
======
[oracle@oraclenode1 ~]$ cd /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/

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

LISTENER_RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode1-vip.localdomain.com)(PORT = 1523))
  )

ADR_BASE_LISTENER_RACSB = /u01/app/oracle

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_RACSB=ON                # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER_RACSB=SUBNET          # line added by Agent
[oracle@oraclenode1 admin]$

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

RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orclscan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
    )
  )

RACSB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode1-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB1)
    )
  )

RACSB2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode2-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB2)
    )
  )
[oracle@oraclenode1 admin]$

Node2:
======
[oracle@oraclenode2 ~]$ cd /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/
[oracle@oraclenode2 admin]$

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

LISTENER_RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode2-vip.localdomain.com)(PORT = 1523))
  )

ADR_BASE_LISTENER_RACSB = /u01/app/oracle

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_RACSB=ON                # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER_RACSB=SUBNET          # line added by Agent
[oracle@oraclenode2 admin]$

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

RACSB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orclscan.localdomain.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
    )
  )

RACSB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode1-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB1)
    )
  )

RACSB2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = oraclenode2-vip.localdomain.com)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = RACSB)
      (SID = RACSB2)
    )
  )
[oracle@oraclenode2 admin]$

node1:
[oracle@oraclenode1 admin]$ ps -ef|grep tns
root        35     2  0 Feb18 ?        00:00:00 [netns]
oracle    1221     1  0 Feb20 ?        00:01:40 /u01/app/19.0.0.0/grid/bin/tnslsnr LISTENER_SCAN3 -no_crs_notify -inherit
oracle    1232     1  0 Feb20 ?        00:01:41 /u01/app/19.0.0.0/grid/bin/tnslsnr LISTENER_SCAN2 -no_crs_notify -inherit
oracle   13800     1  0 Feb20 ?        00:10:28 /u01/app/19.0.0.0/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
oracle   25752     1  0 Mar15 ?        00:00:02 /u01/app/oracle/product/12.2.0.1/dbhome_1/bin/tnslsnr LISTENER_RACSB -inherit
oracle   26674  1482  0 00:15 pts/0    00:00:00 grep --color=auto tns
oracle   29163     1  0 Mar16 ?        00:00:00 /u01/app/19.0.0.0/grid/bin/tnslsnr LISTENER -inherit
[oracle@oraclenode1 admin]$

[oracle@oraclenode1 admin]$ lsnrctl status LISTENER_RACSB

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 17-MAR-2022 00:16:31

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oraclenode1-vip.localdomain.com)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_RACSB
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                15-MAR-2022 21:07:23
Uptime                    1 days 3 hr. 9 min. 7 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oraclenode1/listener_racsb/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.138)(PORT=1523)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.110)(PORT=1523)))
Services Summary...
Service "RACSB" has 1 instance(s).
  Instance "RACSB1", status READY, has 1 handler(s) for this service...
Service "RACSBXDB" has 1 instance(s).
  Instance "RACSB1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oraclenode1 admin]$


node2:
[oracle@oraclenode2 admin]$ ps -ef|grep tns
root        35     2  0 Feb18 ?        00:00:00 [netns]
oracle    1460     1  0 Feb20 ?        00:00:55 /u01/app/19.0.0.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
oracle    1498     1  0 Feb20 ?        00:01:54 /u01/app/19.0.0.0/grid/bin/tnslsnr LISTENER_SCAN1 -no_crs_notify -inherit
oracle    1552     1  0 Feb20 ?        00:11:20 /u01/app/19.0.0.0/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
oracle    8260     1  0 Mar15 ?        00:00:02 /u01/app/oracle/product/12.2.0.1/dbhome_1/bin/tnslsnr LISTENER_RACSB -inherit
oracle    8901 27466  0 00:15 pts/0    00:00:00 grep --color=auto tns
[oracle@oraclenode2 admin]$

[oracle@oraclenode2 admin]$ lsnrctl status LISTENER_RACSB

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 17-MAR-2022 00:16:55

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oraclenode2-vip.localdomain.com)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_RACSB
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                15-MAR-2022 21:18:17
Uptime                    1 days 2 hr. 58 min. 38 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.2.0.1/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oraclenode2/listener_racsb/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.170)(PORT=1523)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.38.4.115)(PORT=1523)))
Services Summary...
Service "RACSB" has 1 instance(s).
  Instance "RACSB2", status READY, has 1 handler(s) for this service...
Service "RACSBXDB" has 1 instance(s).
  Instance "RACSB2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oraclenode2 admin]$

Regards,
Mallik

Cluster Commands

Cluster Commands:

How to get a master node:
[root@oraclenode1 ~]# oclumon manage -get master
Master = oraclenode1

How to get a cluster name:
[oracle@oraclenode1 admin]$ cemutlo -n
orcl-clu

[oracle@oraclenode1 admin]$ olsnodes -c
orcl-clu

How to get scan details:
[oracle@oraclenode1 admin]$  srvctl config scan
SCAN name: orclscan, Network: 1
Subnet IPv4: 10.38.4.0/255.255.252.0/ens192, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 10.38.4.126
SCAN VIP is enabled.
SCAN 2 IPv4 VIP: 10.38.4.154
SCAN VIP is enabled.
SCAN 3 IPv4 VIP: 10.38.4.162
SCAN VIP is enabled.

Create Password file inside DISK Group:
orapwd file='+DATA/TESTDB/PASSWORD/orapwTESTDB' dbuniquename='TESTDB'

Add password details to cluster database:
srvctl modify database -d TESTDB -pwfile '+DATA/TESTDB/PASSWORD/orapwTESTDB'

Regards,
Mallik

Saturday, March 12, 2022

#DBAchallenge -3 || Interview Questions on RMAN, SGA, PGA, Patching, Password fIle and Query Running Slow

#DBAchallenge -3

Interesting Question 1...

How many RMAN channels you will allocate for a database backup?

What all resource you are going to check before allocating the RMAN channels?

To Make it simple...

If I have DB with 4 CPU assigned each CPU has single thread then how many RMAN channel you will allocate? Do you consider PGA and SGA before allocating channels?

Answer 1…

--- RMAN channels should be allocated purely based on number of CPUs, No need to consider SGA/PGA sizing while allocating the channel because automatic memory management will take care of assigning the adequate large pool memory during the RMAN backups.

--- In case if you have 4 CPUs assigned for your database then allocate 2 channels for RMAN and leave the other 2 channels for other your database and ASM operations.

--- Remember in case if you undersize your SGA and PGA which is not only impacting on your RMAN backups but also your database performance, make sure assign the adequate memory (SGA/PGA) allocation for your database.


Case1:

--- I have 16 CPUs on my server and out of 16 CPUs I have assigned 8CPUs (Using CPU_Caging) for my database in that case I can assign max 6 channels to RMAN backup and I will leave 1 or 2 buffer CPUs for my database operation.

Case2:

--- I have 16 CPUs on my server and default my database will take all 16 CPUs in my database if you don’t use CPU caging in that case I can allocate 12 channels to RMAN backup and I will remaining 4 channels for my database, ASM and OS operations.

Case3:

--- I have 16 CPUs on my server and in case if you are running multiple databases then its little challenging since you have to consider when the backups are running for all these DBs, how many CPUs are assigning inside my database and I need to assign some buffer CPUs for my database, ASM and OS operations.

SQL>show parameter cpu_count

[root@oraclelab1]# lscpu |grep "CPU(s):"

https://www.oracle.com/technetwork/database/performance/instance-caging-wp-166854.pdf


Interesting Question 2...

I got a downtime

Today for DB1,

Tomorrow for DB2.

I want to patch these both the databases,

Remember both the DBs are running on a same server.

How to accomplish this task?

Answer 2…

--- We can deal this situation in different scenarios

Case1:

--- In case both the DBs are running from different Oracle Home then no need to worry, you can patch these databases independently irrespective of whether these are RAC database or standalone databases.

Case2:

--- In case both the DBs are running from same Oracle Home and in case both are RAC databases then you no need to worry about downtime you can do rolling patching today or tomorrow anytime which does not need a downtime.

Case3:

--- In case both the DBs are running from same Oracle Home and in this situation, we can clone Oracle Home and patch that cloned oracle Home and move 1 database on cloned Oracle Home and run that database with datapatch and we can patch the other Oracle Home & respective database on tomorrow’s downtime

Note:

Point to considering during this clone process is In case both the DBs are using the same listener then you have to create a new listener for that cloned Oracle Home and you need to register that database with that new listener.

 

Interesting Question 3...

I have a server with 10GB RAM 4 CPU/cores with single thread for each core.

I want to create a new database in it,

How much SGA, I can allocate?

How much PGA, I can allocate?

How much CPU/Core I can allocate for the new DB?

Answer 3…

--- Default 40% of RAM will be allocated to SGA

     Cal: 40* Total RAM = SGA 

--- PGA allocation depends on number of process you defined on database

     Cal: 3MB * Number of Process = PGA

--- We no need to assign any CPUs for my database default it will take all the CPUs available on my server. We can limit the number of CPUs for my database using parameter called cpu_count inside my database.

--- This CPUs allocation inside my database depends on How many DBs you are running and how critical are these DBs.

[oracle@oraclelab1]$ grep -i SGA $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc

         <percentageMemTOSGA>40</percentageMemTOSGA>

SGA:

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:30011178429375

PGA:

https://oracle-base.com/articles/12c/pga_aggregate_limit_12cR1


Interesting Question 4...

Seems this is commonly asked question in most of the interview...

My query is running fine till yesterday but all of sudden today it is taking more time?

How will you troubleshoot this situation?

Answer 5…

We should ask cross question:

--- Is only this query is running slow or all other queries running slow?

     --- all queries are having issue then its DB related issue if not then its only this query has issue

--- Only this user facing this issue or all other facing this issue.

     --- In case only this user having issue then it might be this user level permission or access issue otherwise this is query issue

--- We drilled down the issue whether it is at DB level issue or this query level issue

     --- In case of if its DB level issue then we can check load on DB, check any backups or expdp/impdp running on server, load on Server, IO stats, memory stats, vmstats, AWR report and other OS analysis.

     --- In case of its query level issue then we can troubleshoot further like

     --- table_stats on tables involved in this query (Gather stats)

     --- Index status on these tables (Rebuild Index)

     --- Fragmentation on these tables (Table Move or Table shrink)

     --- Check for execution plan and verify any change in the execution plan

     --- In case change in plan then use SQL profile to peg the best execution plan.


Interesting Question 5...

Password file... 📂

What is the use of password file in database?

What are the use cases of password file?

What is the impact in case if I lost or corrupt password file?

Answer 5…

--- Password file is needed for remote administration activities from your sysdba user.

--- If the DBA wants to start up an Oracle or ASM instance there must be a way for Oracle to authenticate the DBA. Obviously, DBA password cannot be stored in the database, because Oracle cannot access the database before the instance is started up. Therefore, the authentication of the DBA must happen outside of the database.

User Cases:

--- Remote administration activities

--- DR or Standby sync

--- In case passwordfile corrupt or lost then there is no impact on running database, you can recreate the passwordfile online using orapdw utility

--- In case of DR database if passwordfile corrupt or lost then DR will goes out of sync.

SQL> desc v$pwfile_users;

[oracle@oraclelab1 dbs]$ ls -ltr $ORACLE_HOME/dbs/orapw*

 

Regards,

Mallik

Tuesday, March 1, 2022

RAC to RAC Database Restore Recover Vs RMAN Clone

RAC to RAC Database Restore Recover Vs RMAN Clone:

===================================================

1. Prestep take source DB backups and transfer it to target
2. Restore and Recover schenario:
3. RMAN Clone schenario:
4. Post Restore/Clone Steps:



1. Prestep take source DB backups and transfer it to target
==========================================================
rman target /
run {
allocate channel ch1 device type disk;
backup as backupset database format '/u01/backup/Fullback_%T_%U'
plus archivelog format '/u01/backup/Archive_%T_%U';
backup current controlfile format '/u01/backup/Controlback_%T_%U';
backup spfile format '/u01/backup/spfile_%T_%U';
release channel ch1;
}

scp /u01/backup/* oracle@target:/u01/backup/.


[oracle@oranode1 backup]$ . oraenv
ORACLE_SID = [DEVDB1] ?
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19.0.0.0/dbhome_1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oranode1 backup]$
[oracle@oranode1 backup]$ env |grep ORA
ORACLE_SID=DEVDB1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oranode1 backup]$
[oracle@oranode1 backup]$ pwd
/u01/backup
[oracle@oranode1 backup]$ ls -ltrh
total 0
[oracle@oranode1 backup]$
[oracle@oranode1 backup]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Fri Feb 18 19:51:40 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DEVDB (DBID=1000656445)

RMAN> run {
allocate channel ch1 device type disk;
2> 3> backup as backupset database format '/u01/backup/Fullback_%T_%U'
4> plus archivelog format '/u01/backup/Archive_%T_%U';
5> backup current controlfile format '/u01/backup/Controlback_%T_%U';
backup spfile format '/u01/backup/spfile_%T_%U';
6> 7> release channel ch1;
8> }

using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: SID=295 instance=DEVDB1 device type=DISK


Starting backup at 18-FEB-22
current log archived
channel ch1: starting archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=2 sequence=7 RECID=2 STAMP=1096938623
input archived log thread=1 sequence=19 RECID=1 STAMP=1096938621
input archived log thread=1 sequence=20 RECID=3 STAMP=1096938655
input archived log thread=2 sequence=8 RECID=4 STAMP=1096938655
input archived log thread=1 sequence=21 RECID=5 STAMP=1096940093
input archived log thread=2 sequence=9 RECID=6 STAMP=1096940093
input archived log thread=1 sequence=22 RECID=7 STAMP=1096940114
input archived log thread=2 sequence=10 RECID=8 STAMP=1096940084
input archived log thread=1 sequence=23 RECID=9 STAMP=1097005913
input archived log thread=2 sequence=11 RECID=10 STAMP=1097005882
channel ch1: starting piece 1 at 18-FEB-22
channel ch1: finished piece 1 at 18-FEB-22
piece handle=/u01/backup/Archive_20220218_050m3uhu_1_1 tag=TAG20220218T195153 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:03
Finished backup at 18-FEB-22

Starting backup at 18-FEB-22
channel ch1: starting full datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/DEVDB/DATAFILE/sysaux.268.1095926363
input datafile file number=00001 name=+DATA/DEVDB/DATAFILE/system.267.1095926327
input datafile file number=00004 name=+DATA/DEVDB/DATAFILE/undotbs1.269.1095926387
input datafile file number=00005 name=+DATA/DEVDB/DATAFILE/undotbs2.275.1095926641
input datafile file number=00007 name=+DATA/DEVDB/DATAFILE/users.270.1095926389
channel ch1: starting piece 1 at 18-FEB-22
channel ch1: finished piece 1 at 18-FEB-22
piece handle=/u01/backup/Fullback_20220218_060m3ui1_1_1 tag=TAG20220218T195156 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:15
Finished backup at 18-FEB-22

Starting backup at 18-FEB-22
current log archived
channel ch1: starting archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=1 sequence=24 RECID=11 STAMP=1097005932
input archived log thread=2 sequence=12 RECID=12 STAMP=1097005902
channel ch1: starting piece 1 at 18-FEB-22
channel ch1: finished piece 1 at 18-FEB-22
piece handle=/u01/backup/Archive_20220218_070m3uij_1_1 tag=TAG20220218T195213 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
Finished backup at 18-FEB-22

Starting backup at 18-FEB-22
channel ch1: starting full datafile backup set
channel ch1: specifying datafile(s) in backup set
including current control file in backup set
channel ch1: starting piece 1 at 18-FEB-22
channel ch1: finished piece 1 at 18-FEB-22
piece handle=/u01/backup/Controlback_20220218_080m3uik_1_1 tag=TAG20220218T195214 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
Finished backup at 18-FEB-22

Starting backup at 18-FEB-22
channel ch1: starting full datafile backup set
channel ch1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ch1: starting piece 1 at 18-FEB-22
channel ch1: finished piece 1 at 18-FEB-22
piece handle=/u01/backup/spfile_20220218_0a0m417c_1_1 tag=TAG20220218T195216 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
Finished backup at 18-FEB-22

Starting Control File and SPFILE Autobackup at 18-FEB-22
piece handle=+RECO/DEVDB/AUTOBACKUP/2022_02_18/s_1097005938.273.1097005939 comment=NONE
Finished Control File and SPFILE Autobackup at 18-FEB-22

released channel: ch1

RMAN> exit

Recovery Manager complete.
[oracle@oranode1 backup]$ ls

Target:
[oracle@oraclenode1 backup]$ pwd
/u01/backup
[oracle@oraclenode1 backup]$ ls -ltrh
total 0
[oracle@oraclenode1 backup]$

Source:
[oracle@oranode1 backup]$ ls -ltrh
total 2.5G
-rw-r----- 1 oracle oinstall 441M Feb 18 19:51 Archive_20220218_050m3uhu_1_1
-rw-r----- 1 oracle oinstall 2.1G Feb 18 19:52 Fullback_20220218_060m3ui1_1_1
-rw-r----- 1 oracle oinstall  12K Feb 18 19:52 Archive_20220218_070m3uij_1_1
-rw-r----- 1 oracle oinstall  11M Feb 18 19:52 Controlback_20220218_080m3uik_1_1
-rw-r----- 1 oracle oinstall 112K Feb 18 19:52 spfile_20220218_0a0m417c_1_1
[oracle@oranode1 backup]$ pwd
/u01/backup
[oracle@oranode1 backup]$ scp /u01/backup/* oracle@10.38.4.110:/u01/backup/.
oracle@10.38.4.110's password:
Archive_20220218_050m3uhu_1_1 100%  440MB 110.1MB/s   00:04
Archive_20220218_070m3uij_1_1 100%   12KB   7.7MB/s   00:00
Controlback_20220218_080m3uik_1_1 100%   10MB  89.0MB/s   00:00
Fullback_20220218_060m3ui1_1_1 100% 2079MB 139.7MB/s   00:14
spfile_20220218_0a0m417c_1_1 100%  112KB  32.1MB/s   00:00
[oracle@oranode1 backup]$

Target:
[oracle@oraclenode1 backup]$ ls -ltrh
total 2.5G
-rw-r-----. 1 oracle oinstall 441M Feb 18 19:53 Archive_20220218_050m3uhu_1_1
-rw-r-----. 1 oracle oinstall  12K Feb 18 19:54 Archive_20220218_070m3uij_1_1
-rw-r-----. 1 oracle oinstall  11M Feb 18 19:54 Controlback_20220218_080m3uik_1_1
-rw-r-----. 1 oracle oinstall 2.1G Feb 18 19:54 Fullback_20220218_060m3ui1_1_1
-rw-r-----. 1 oracle oinstall 112K Feb 18 19:54 spfile_20220218_0a0m417c_1_1
[oracle@oraclenode1 backup]$


2. Restore and Recover scenario:
=================================
[oracle@oraclenode1 backup]$ ll
total 2412632
-rw-r-----. 1 oracle oinstall  263259648 Feb 18 02:08 Archive_20220218_050m3uhu_1_1
-rw-r-----. 1 oracle oinstall      67072 Feb 18 02:08 Archive_20220218_070m3uij_1_1
-rw-r-----. 1 oracle oinstall   10682368 Feb 18 02:08 Controlback_20220218_080m3uik_1_1
-rw-r-----. 1 oracle oinstall 2196406272 Feb 18 02:08 Fullback_20220218_060m3ui1_1_1
-rw-r-----. 1 oracle oinstall     114688 Feb 18 02:20 spfile_20220218_0a0m417c_1_1
[oracle@oraclenode1 backup]$ 

sqlplus / as sysdba
startup nomount pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initDEVDB.ora';

rman target /
restore spfile from '/u01/backup/spfile_20220218_0a0m417c_1_1';
restore controlfile from '/u01/backup/Controlback_20220218_080m3uik_1_1';
alter database mount;
catalog start with '/u01/backup/';
run {
restore database;
recover database;
}
alter database open resetlogs;

sqlplus / as sysdba
select name, open_mode from v$database;


[oracle@oraclenode1 dbs]$ pwd
/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs
[oracle@oraclenode1 dbs]$ cat initDEVDB.ora
*.db_name=DEVDB
*.db_unique_name=DEVDB
*.cluster_database=false
*.audit_file_dest='/u01/app/oracle/admin/DEVDB/adump'
*.db_create_file_dest='+DATA'
*.db_create_online_log_dest_1='+DATA'
*.db_create_online_log_dest_2='+RECO'
#*.db_file_name_convert='+DATA/DEVDB','+DATA/TESTDB'
#*.log_file_name_convert='+DATA/DEVDB','+DATA/TESTDB','+RECO/DEVDB','+RECO/TESTDB'
*.control_files='+DATA/DEVDB/controlfile/control01.ctl','+RECO/DEVDB/controlfile/control02.ctl'
*.db_recovery_file_dest_size=8931M
*.db_recovery_file_dest='+RECO'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'
[oracle@oraclenode1 dbs]$

[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Feb 18 19:15:37 2022
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL> startup nomount pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initDEVDB.ora';
ORACLE instance started.

Total System Global Area  343932624 bytes
Fixed Size                  8896208 bytes
Variable Size             276824064 bytes
Database Buffers           50331648 bytes
Redo Buffers                7880704 bytes
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@oraclenode1 dbs]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Fri Feb 18 19:16:02 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DEVDB (not mounted)

RMAN> restore spfile from '/u01/backup/spfile_20220218_0a0m417c_1_1';

Starting restore at 18-FEB-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=437 device type=DISK

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/backup/spfile_20220218_0a0m417c_1_1
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 18-FEB-22

RMAN> exit


Recovery Manager complete.
[oracle@oraclenode1 dbs]$ ll
total 20
-rw-rw----. 1 oracle oinstall 1544 Feb 18 19:15 hc_DEVDB.dat
-rw-r--r--. 1 oracle oinstall  586 Feb 18 19:15 initDEVDB.ora
-rw-r--r--. 1 oracle oinstall  591 Feb 18 19:15 initTESTDB.ora
-rw-r-----. 1 oracle oinstall 5632 Feb 18 19:16 spfileDEVDB.ora
[oracle@oraclenode1 dbs]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Fri Feb 18 19:17:03 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DEVDB (not mounted)

RMAN> restore controlfile from '/u01/backup/Controlback_20220218_080m3uik_1_1';

Starting restore at 18-FEB-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=437 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=+DATA/DEVDB/controlfile/control01.ctl
output file name=+RECO/DEVDB/controlfile/control02.ctl
Finished restore at 18-FEB-22

RMAN> alter database mount;

released channel: ORA_DISK_1
Statement processed

RMAN> catalog start with '/u01/backup/';

Starting implicit crosscheck backup at 18-FEB-22
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=437 device type=DISK
Crosschecked 3 objects
Finished implicit crosscheck backup at 18-FEB-22

Starting implicit crosscheck copy at 18-FEB-22
using channel ORA_DISK_1
Finished implicit crosscheck copy at 18-FEB-22

searching for all files in the recovery area
cataloging files...
no files cataloged

searching for all files that match the pattern /u01/backup/

List of Files Unknown to the Database
=====================================
File Name: /u01/backup/Controlback_20220218_080m3uik_1_1
File Name: /u01/backup/spfile_20220218_0a0m417c_1_1

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /u01/backup/Controlback_20220218_080m3uik_1_1
File Name: /u01/backup/spfile_20220218_0a0m417c_1_1

RMAN> run {
restore database;
recover database;
}2> 3> 4>

Starting restore at 18-FEB-22
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATA/DEVDB/DATAFILE/system.267.1095926327
channel ORA_DISK_1: restoring datafile 00003 to +DATA/DEVDB/DATAFILE/sysaux.268.1095926363
channel ORA_DISK_1: restoring datafile 00004 to +DATA/DEVDB/DATAFILE/undotbs1.269.1095926387
channel ORA_DISK_1: restoring datafile 00005 to +DATA/DEVDB/DATAFILE/undotbs2.275.1095926641
channel ORA_DISK_1: restoring datafile 00007 to +DATA/DEVDB/DATAFILE/users.270.1095926389
channel ORA_DISK_1: reading from backup piece /u01/backup/Fullback_20220218_060m3ui1_1_1
channel ORA_DISK_1: piece handle=/u01/backup/Fullback_20220218_060m3ui1_1_1 tag=TAG20220218T013457
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 18-FEB-22

Starting recover at 18-FEB-22
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=22
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=10
channel ORA_DISK_1: reading from backup piece /u01/backup/Archive_20220218_070m3uij_1_1
channel ORA_DISK_1: piece handle=/u01/backup/Archive_20220218_070m3uij_1_1 tag=TAG20220218T013515
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=+RECO/DEVDB/ARCHIVELOG/2022_02_18/thread_1_seq_22.1199.1097003871 thread=1 sequence=22
archived log file name=+RECO/DEVDB/ARCHIVELOG/2022_02_18/thread_2_seq_10.1132.1097003871 thread=2 sequence=10
channel default: deleting archived log(s)
archived log file name=+RECO/DEVDB/ARCHIVELOG/2022_02_18/thread_1_seq_22.1199.1097003871 RECID=9 STAMP=1097003870
unable to find archived log
archived log thread=1 sequence=23
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/18/2022 19:17:52
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 23 and starting SCN of 3760150

RMAN> alter database open resetlogs;

Statement processed

RMAN> exit


Recovery Manager complete.
[oracle@oraclenode1 dbs]$
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Feb 18 19:18:45 2022
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
--------- --------------------
DEVDB     READ WRITE

SQL>


3. RMAN Clone scenario:
=========================
[oracle@oraclenode1 backup]$ ll
total 2412632
-rw-r-----. 1 oracle oinstall  263259648 Feb 18 02:08 Archive_20220218_050m3uhu_1_1
-rw-r-----. 1 oracle oinstall      67072 Feb 18 02:08 Archive_20220218_070m3uij_1_1
-rw-r-----. 1 oracle oinstall   10682368 Feb 18 02:08 Controlback_20220218_080m3uik_1_1
-rw-r-----. 1 oracle oinstall 2196406272 Feb 18 02:08 Fullback_20220218_060m3ui1_1_1
-rw-r-----. 1 oracle oinstall     114688 Feb 18 02:20 spfile_20220218_0a0m417c_1_1
[oracle@oraclenode1 backup]$ 

sqlplus / as sysdba
startup nomount pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initTESTDB.ora';

rman auxiliary /
duplicate target database to TESTDB backup location '/u01/backup' nofilenamecheck;

sqlplus / as sysdba
select name, open_mode from v$database;


[oracle@oraclenode1 dbs]$ pwd
/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs
[oracle@oraclenode1 dbs]$ cat initTESTDB.ora
*.db_name=TESTDB
*.db_unique_name=TESTDB
*.cluster_database=false
*.audit_file_dest='/u01/app/oracle/admin/TESTDB/adump'
*.db_create_file_dest='+DATA'
*.db_create_online_log_dest_1='+DATA'
*.db_create_online_log_dest_2='+RECO'
*.db_file_name_convert='+DATA/DEVDB','+DATA/TESTDB'
*.log_file_name_convert='+DATA/DEVDB','+DATA/TESTDB','+RECO/DEVDB','+RECO/TESTDB'
*.control_files='+DATA/TESTDB/controlfile/control01.ctl','+RECO/TESTDB/controlfile/control02.ctl'
*.db_recovery_file_dest_size=8931M
*.db_recovery_file_dest='+RECO'
*.log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'
[oracle@oraclenode1 dbs]$

[oracle@oraclenode1 dbs]$ . oraenv
ORACLE_SID = [TESTDB] ?
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19.0.0.0/dbhome_1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclenode1 dbs]$
[oracle@oraclenode1 dbs]$ env |grep ORA
ORACLE_SID=TESTDB
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclenode1 dbs]$
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Feb 18 19:32:33 2022
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL> startup nomount pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initTESTDB.ora';
ORACLE instance started.

Total System Global Area  343932624 bytes
Fixed Size                  8896208 bytes
Variable Size             276824064 bytes
Database Buffers           50331648 bytes
Redo Buffers                7880704 bytes
SQL> 


[oracle@oraclenode1 dbs]$ rman auxiliary /

Recovery Manager: Release 19.0.0.0.0 - Production on Fri Feb 18 19:37:14 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to auxiliary database: TESTDB (not mounted)

RMAN> duplicate target database to TESTDB backup location '/u01/backup' nofilenamecheck;

Starting Duplicate Db at 18-FEB-22
searching for database ID
found backup of database ID 1000656445

contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area     343932624 bytes

Fixed Size                     8896208 bytes
Variable Size                276824064 bytes
Database Buffers              50331648 bytes
Redo Buffers                   7880704 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''DEVDB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''TESTDB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile from  '/u01/backup/Controlback_20220218_080m3uik_1_1';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''DEVDB'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''TESTDB'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area     343932624 bytes

Fixed Size                     8896208 bytes
Variable Size                276824064 bytes
Database Buffers              50331648 bytes
Redo Buffers                   7880704 bytes

Starting restore at 18-FEB-22
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=424 device type=DISK

channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output file name=+DATA/TESTDB/controlfile/control01.ctl
output file name=+RECO/TESTDB/controlfile/control02.ctl
Finished restore at 18-FEB-22

database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=424 device type=DISK
RMAN-05529: warning: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.

contents of Memory Script:
{
   set until scn  3760150;
   set newname for datafile  1 to
 "+DATA";
   set newname for datafile  3 to
 "+DATA";
   set newname for datafile  4 to
 "+DATA";
   set newname for datafile  5 to
 "+DATA";
   set newname for datafile  7 to
 "+DATA";
   restore
   clone database
   ;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 18-FEB-22
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00003 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00004 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00005 to +DATA
channel ORA_AUX_DISK_1: restoring datafile 00007 to +DATA
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/Fullback_20220218_060m3ui1_1_1
channel ORA_AUX_DISK_1: piece handle=/u01/backup/Fullback_20220218_060m3ui1_1_1 tag=TAG20220218T013457
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 18-FEB-22

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=1097005160 file name=+DATA/TESTDB/DATAFILE/system.310.1097005153
datafile 3 switched to datafile copy
input datafile copy RECID=7 STAMP=1097005160 file name=+DATA/TESTDB/DATAFILE/sysaux.340.1097005153
datafile 4 switched to datafile copy
input datafile copy RECID=8 STAMP=1097005160 file name=+DATA/TESTDB/DATAFILE/undotbs1.301.1097005153
datafile 5 switched to datafile copy
input datafile copy RECID=9 STAMP=1097005160 file name=+DATA/TESTDB/DATAFILE/undotbs2.326.1097005153
datafile 7 switched to datafile copy
input datafile copy RECID=10 STAMP=1097005160 file name=+DATA/TESTDB/DATAFILE/users.265.1097005153

contents of Memory Script:
{
   set until scn  3760150;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 18-FEB-22
using channel ORA_AUX_DISK_1

starting media recovery

channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=22
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=2 sequence=10
channel ORA_AUX_DISK_1: reading from backup piece /u01/backup/Archive_20220218_070m3uij_1_1
channel ORA_AUX_DISK_1: piece handle=/u01/backup/Archive_20220218_070m3uij_1_1 tag=TAG20220218T013515
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=+RECO/TESTDB/ARCHIVELOG/2022_02_18/thread_1_seq_22.1138.1097005161 thread=1 sequence=22
archived log file name=+RECO/TESTDB/ARCHIVELOG/2022_02_18/thread_2_seq_10.1304.1097005161 thread=2 sequence=10
channel clone_default: deleting archived log(s)
archived log file name=+RECO/TESTDB/ARCHIVELOG/2022_02_18/thread_1_seq_22.1138.1097005161 RECID=1 STAMP=1097005161
channel clone_default: deleting archived log(s)
archived log file name=+RECO/TESTDB/ARCHIVELOG/2022_02_18/thread_2_seq_10.1304.1097005161 RECID=2 STAMP=1097005161
media recovery complete, elapsed time: 00:00:01
Finished recover at 18-FEB-22
Oracle instance started

Total System Global Area     343932624 bytes

Fixed Size                     8896208 bytes
Variable Size                276824064 bytes
Database Buffers              50331648 bytes
Redo Buffers                   7880704 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''TESTDB'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
}
executing Memory Script

sql statement: alter system set  db_name =  ''TESTDB'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile
Oracle instance started

Total System Global Area     343932624 bytes

Fixed Size                     8896208 bytes
Variable Size                276824064 bytes
Database Buffers              50331648 bytes
Redo Buffers                   7880704 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TESTDB" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP     1 ( '+RECO', '+DATA' ) SIZE 200 M  REUSE,
  GROUP     2 ( '+RECO', '+DATA' ) SIZE 200 M  REUSE
 DATAFILE
  '+DATA/TESTDB/DATAFILE/system.310.1097005153'
 CHARACTER SET AL32UTF8

sql statement: ALTER DATABASE ADD LOGFILE

  INSTANCE 'i2'
  GROUP     3 ( '+DATA', '+RECO' ) SIZE 200 M  REUSE,
  GROUP     4 ( '+DATA', '+RECO' ) SIZE 200 M  REUSE

contents of Memory Script:
{
   set newname for tempfile  1 to
 "+DATA";
   switch clone tempfile all;
   catalog clone datafilecopy  "+DATA/TESTDB/DATAFILE/sysaux.340.1097005153",
 "+DATA/TESTDB/DATAFILE/undotbs1.301.1097005153",
 "+DATA/TESTDB/DATAFILE/undotbs2.326.1097005153",
 "+DATA/TESTDB/DATAFILE/users.265.1097005153";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to +DATA in control file

cataloged datafile copy
datafile copy file name=+DATA/TESTDB/DATAFILE/sysaux.340.1097005153 RECID=1 STAMP=1097005196
cataloged datafile copy
datafile copy file name=+DATA/TESTDB/DATAFILE/undotbs1.301.1097005153 RECID=2 STAMP=1097005196
cataloged datafile copy
datafile copy file name=+DATA/TESTDB/DATAFILE/undotbs2.326.1097005153 RECID=3 STAMP=1097005196
cataloged datafile copy
datafile copy file name=+DATA/TESTDB/DATAFILE/users.265.1097005153 RECID=4 STAMP=1097005196

datafile 3 switched to datafile copy
input datafile copy RECID=1 STAMP=1097005196 file name=+DATA/TESTDB/DATAFILE/sysaux.340.1097005153
datafile 4 switched to datafile copy
input datafile copy RECID=2 STAMP=1097005196 file name=+DATA/TESTDB/DATAFILE/undotbs1.301.1097005153
datafile 5 switched to datafile copy
input datafile copy RECID=3 STAMP=1097005196 file name=+DATA/TESTDB/DATAFILE/undotbs2.326.1097005153
datafile 7 switched to datafile copy
input datafile copy RECID=4 STAMP=1097005196 file name=+DATA/TESTDB/DATAFILE/users.265.1097005153

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Cannot remove created server parameter file
Finished Duplicate Db at 18-FEB-22

RMAN>

Recovery Manager complete.
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Feb 18 19:40:12 2022
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
--------- --------------------
TESTDB    READ WRITE

SQL>


4. Post Restore/Clone Steps:
============================
1. Get a pfiles from source and modify according to target environemtn
2. Start target instance using pfiles

sqlplus / as sysdba
shut immediate

cp initDEVDB.ora initDEVDB.ora_for_clone

vi /u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initDEVDB1.ora

. oraenv
>>> DEVDB1

sqlplus / as sysdba
startup mount pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initDEVDB1.ora';

create spfile='+DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora' from pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initDEVDB1.ora';
shut immediate;

cp initDEVDB1.ora initDEVDB1.ora_After_RAC_Parameter_Added

Create local pfile initDEVDB1.ora point to SPFILE '+DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora'

Node1>>>
cd $ORACLE_HOME/dbs
cat > initDEVDB1.ora 
spfile='+DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora'

Node2 >>>
cat > initDEVDB2.ora 
spfile='+DATA/RACSB/PARAMETERFILE/spfileRACSB.ora'

sqlplus / as sysdba
startup mount;
show parameter spfile
shut immediate

Convert DEVDB database to RAC

srvctl add database -d DEVDB -n DEVDB -o '/u01/app/oracle/product/19.0.0.0/dbhome_1' -p '+DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora' -t IMMEDIATE -a 'DATA,RECO'

Add the NODE instances
srvctl add instance -d DEVDB -i DEVDB1 -n oraclenode1
srvctl add instance -d DEVDB -i DEVDB2 -n oraclenode2

srvctl config database -d DEVDB
srvctl status database -d DEVDB
srvctl start database -d DEVDB
srvctl status database -d DEVDB
srvctl stop database -d DEVDB

cp initDEVDB1.ora initDEVDB1.ora_Pointing_To_spfile


Post steps logs:
================
DEVDB:
======
[oracle@oraclenode1 dbs]$ pwd
/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs
[oracle@oraclenode1 dbs]$ . oraenv
ORACLE_SID = [TESTDB] ? DEVDB
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19.0.0.0/dbhome_1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Feb 19 00:20:43 2022
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> show parameter control

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      +DATA/DEVDB/controlfile/contro
                                                 l01.ctl, +RECO/DEVDB/controlfi
                                                 le/control02.ctl
control_management_pack_access       string      DIAGNOSTIC+TUNING
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@oraclenode1 dbs]$
[oracle@oraclenode1 dbs]$ ll
total 21060
-rw-rw----. 1 oracle oinstall     1544 Feb 18 19:18 hc_DEVDB.dat
-rw-rw----. 1 oracle oinstall     1544 Feb 18 19:40 hc_TESTDB.dat
-rw-r--r--. 1 oracle oinstall      581 Feb 18 19:28 initDEVDB.ora
-rw-r--r--. 1 oracle oinstall      584 Feb 18 19:35 initTESTDB.ora
-rw-r-----. 1 oracle oinstall 10600448 Feb 18 19:18 snapcf_DEVDB.f
-rw-r-----. 1 oracle oinstall 10928128 Feb 18 19:40 snapcf_TESTDB.f
-rw-r-----. 1 oracle oinstall     5632 Feb 18 19:16 spfileDEVDB.ora
-rw-r-----. 1 oracle oinstall     8704 Feb 18 22:00 spfileTESTDB.ora
[oracle@oraclenode1 dbs]$ cp initTESTDB.ora initTESTDB.ora_for_clone
[oracle@oraclenode1 dbs]$ cp initDEVDB.ora initDEVDB.ora_for_clone
[oracle@oraclenode1 dbs]$ ls -ltrh
total 21M
-rw-r-----. 1 oracle oinstall 5.5K Feb 18 19:16 spfileDEVDB.ora
-rw-rw----. 1 oracle oinstall 1.6K Feb 18 19:18 hc_DEVDB.dat
-rw-r-----. 1 oracle oinstall  11M Feb 18 19:18 snapcf_DEVDB.f
-rw-r--r--. 1 oracle oinstall  581 Feb 18 19:28 initDEVDB.ora
-rw-r--r--. 1 oracle oinstall  584 Feb 18 19:35 initTESTDB.ora
-rw-rw----. 1 oracle oinstall 1.6K Feb 18 19:40 hc_TESTDB.dat
-rw-r-----. 1 oracle oinstall  11M Feb 18 19:40 snapcf_TESTDB.f
-rw-r-----. 1 oracle oinstall 8.5K Feb 18 22:00 spfileTESTDB.ora
-rw-r--r--. 1 oracle oinstall  584 Feb 19 00:25 initTESTDB.ora_for_clone
-rw-r--r--. 1 oracle oinstall  581 Feb 19 00:25 initDEVDB.ora_for_clone
[oracle@oraclenode1 dbs]$ vi initDEVDB1.ora
[oracle@oraclenode1 dbs]$ pwd
/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Feb 19 00:26:40 2022
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> shut immediate
Database closed.
Database dismounted.


ORACLE instance shut down.

SQL> SQL> SQL> SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@oraclenode1 dbs]$ . oraenv
ORACLE_SID = [DEVDB] ? DEVDB1
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19.0.0.0/dbhome_1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Feb 19 00:27:44 2022
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL> startup mount pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initDEVDB1.ora';
ORACLE instance started.

Total System Global Area 3707763120 bytes
Fixed Size                  8903088 bytes
Variable Size             788529152 bytes
Database Buffers         2902458368 bytes
Redo Buffers                7872512 bytes
Database mounted.
SQL> create spfile='+DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora' from pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initDEVDB1.ora';

File created.

SQL> shut immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@oraclenode1 dbs]$ ls -ltrh
total 21M
-rw-r-----. 1 oracle oinstall 5.5K Feb 18 19:16 spfileDEVDB.ora
-rw-r-----. 1 oracle oinstall  11M Feb 18 19:18 snapcf_DEVDB.f
-rw-r--r--. 1 oracle oinstall  581 Feb 18 19:28 initDEVDB.ora
-rw-r--r--. 1 oracle oinstall  584 Feb 18 19:35 initTESTDB.ora
-rw-r-----. 1 oracle oinstall  11M Feb 18 19:40 snapcf_TESTDB.f
-rw-r-----. 1 oracle oinstall 8.5K Feb 18 22:00 spfileTESTDB.ora
-rw-r--r--. 1 oracle oinstall  584 Feb 19 00:25 initTESTDB.ora_for_clone
-rw-r--r--. 1 oracle oinstall  581 Feb 19 00:25 initDEVDB.ora_for_clone
-rw-r--r--. 1 oracle oinstall 2.0K Feb 19 00:26 initDEVDB1.ora
-rw-rw----. 1 oracle oinstall 1.6K Feb 19 00:26 hc_DEVDB.dat
-rw-rw----. 1 oracle oinstall 1.6K Feb 19 00:28 hc_DEVDB1.dat
-rw-rw----. 1 oracle oinstall 1.6K Feb 19 00:29 hc_TESTDB.dat
-rw-r--r--. 1 oracle oinstall 2.0K Feb 19 00:30 initTESTDB1.ora
-rw-rw----. 1 oracle oinstall 1.6K Feb 19 00:31 hc_TESTDB1.dat
[oracle@oraclenode1 dbs]$ cp initDEVDB1.ora initDEVDB1.ora_After_RAC_Parameter_Added
[oracle@oraclenode1 dbs]$ cat > initDEVDB1.ora
spfile='+DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora'
^C
[oracle@oraclenode1 dbs]$ cat initDEVDB1.ora
spfile='+DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora'
[oracle@oraclenode1 dbs]$ scp initDEVDB1.ora oraclenode2:/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initDEVDB2.ora
initDEVDB1.ora                                                                                                                                                              100%   51    51.6KB/s   00:00
[oracle@oraclenode1 dbs]$ 

[oracle@oraclenode2 ~]$ cd /u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/
[oracle@oraclenode2 dbs]$ ls -ltrh
total 8.0K
-rw-r--r--. 1 oracle oinstall 3.1K Feb 18 02:09 init.ora
-rw-r--r--. 1 oracle oinstall   51 Feb 19 00:36 initDEVDB2.ora
[oracle@oraclenode2 dbs]$ cat initDEVDB2.ora
spfile='+DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora'
[oracle@oraclenode2 dbs]$

[oracle@oraclenode1 dbs]$env |grep ORA
ORACLE_SID=DEVDB1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Feb 19 00:37:22 2022
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 3707763120 bytes
Fixed Size                  8903088 bytes
Variable Size             788529152 bytes
Database Buffers         2902458368 bytes
Redo Buffers                7872512 bytes
Database mounted.
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/DEVDB/PARAMETERFILE/spfi
                                                 ledevdb.ora
SQL> shut immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@oraclenode1 dbs]$ srvctl add database -d DEVDB -n DEVDB -o '/u01/app/oracle/product/19.0.0.0/dbhome_1' -p '+DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora' -t IMMEDIATE -a 'DATA,RECO'
[oracle@oraclenode1 dbs]$ srvctl add instance -d DEVDB -i DEVDB1 -n oraclenode1
[oracle@oraclenode1 dbs]$ srvctl add instance -d DEVDB -i DEVDB2 -n oraclenode2
[oracle@oraclenode1 dbs]$ srvctl config database -d DEVDB
Database unique name: DEVDB
Database name: DEVDB
Oracle home: /u01/app/oracle/product/19.0.0.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/DEVDB/PARAMETERFILE/spfileDEVDB.ora
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,RECO
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: oinstall
OSOPER group: oinstall
Database instances: DEVDB1,DEVDB2
Configured nodes: oraclenode1,oraclenode2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[oracle@oraclenode1 dbs]$ srvctl status database -d DEVDB
Instance DEVDB1 is not running on node oraclenode1
Instance DEVDB2 is not running on node oraclenode2
[oracle@oraclenode1 dbs]$ srvctl start database -d DEVDB
[oracle@oraclenode1 dbs]$ srvctl status database -d DEVDB
Instance DEVDB1 is running on node oraclenode1
Instance DEVDB2 is running on node oraclenode2
[oracle@oraclenode1 dbs]$ cp initDEVDB1.ora initDEVDB1.ora_Pointing_To_spfile

[oracle@oraclenode2 dbs]$ cp initDEVDB2.ora initDEVDB2.ora_Pointing_To_spfile

TESTDB:
=======
[oracle@oraclenode1 dbs]$ . oraenv
ORACLE_SID = [oracle] ? TESTDB
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19.0.0.0/dbhome_1
The Oracle base has been set to /u01/app/oracle
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Feb 19 00:29:19 2022
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> shut immediate;
Database closed.
Database dismounted.

ORACLE instance shut down.
SQL> SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@oraclenode1 dbs]$
[oracle@oraclenode1 dbs]$ vi initTESTDB1.ora
[oracle@oraclenode1 dbs]$ . oraenv
ORACLE_SID = [TESTDB] ? TESTDB1
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/19.0.0.0/dbhome_1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Feb 19 00:30:56 2022
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL> startup mount pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initTESTDB1.ora';
ORACLE instance started.

Total System Global Area 3707763120 bytes
Fixed Size                  8903088 bytes
Variable Size             788529152 bytes
Database Buffers         2902458368 bytes
Redo Buffers                7872512 bytes
Database mounted.
SQL> create spfile='+DATA/TESTDB/PARAMETERFILE/spfileTESTDB.ora' from pfile='/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initTESTDB1.ora';

File created.

SQL> shut immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@oraclenode1 dbs]$ ls -ltrh
total 21M
-rw-r-----. 1 oracle oinstall 5.5K Feb 18 19:16 spfileDEVDB.ora
-rw-r-----. 1 oracle oinstall  11M Feb 18 19:18 snapcf_DEVDB.f
-rw-r--r--. 1 oracle oinstall  581 Feb 18 19:28 initDEVDB.ora
-rw-r--r--. 1 oracle oinstall  584 Feb 18 19:35 initTESTDB.ora
-rw-r-----. 1 oracle oinstall  11M Feb 18 19:40 snapcf_TESTDB.f
-rw-r-----. 1 oracle oinstall 8.5K Feb 18 22:00 spfileTESTDB.ora
-rw-r--r--. 1 oracle oinstall  584 Feb 19 00:25 initTESTDB.ora_for_clone
-rw-r--r--. 1 oracle oinstall  581 Feb 19 00:25 initDEVDB.ora_for_clone
-rw-rw----. 1 oracle oinstall 1.6K Feb 19 00:26 hc_DEVDB.dat
-rw-rw----. 1 oracle oinstall 1.6K Feb 19 00:29 hc_TESTDB.dat
-rw-r--r--. 1 oracle oinstall 2.0K Feb 19 00:30 initTESTDB1.ora
-rw-rw----. 1 oracle oinstall 1.6K Feb 19 00:31 hc_TESTDB1.dat
-rw-r--r--. 1 oracle oinstall 2.0K Feb 19 00:35 initDEVDB1.ora_After_RAC_Parameter_Added
-rw-r--r--. 1 oracle oinstall   51 Feb 19 00:36 initDEVDB1.ora
-rw-rw----. 1 oracle oinstall 1.6K Feb 19 00:40 hc_DEVDB1.dat
-rw-r--r--. 1 oracle oinstall   51 Feb 19 00:41 initDEVDB1.ora_Pointing_To_spfile
[oracle@oraclenode1 dbs]$ cp initTESTDB1.ora initTESTDB1.ora_After_RAC_Parameter_Added
[oracle@oraclenode1 dbs]$ cat > initTESTDB1.ora
spfile='+DATA/TESTDB/PARAMETERFILE/spfileTESTDB.ora'
^C
[oracle@oraclenode1 dbs]$ cat initTESTDB1.ora
spfile='+DATA/TESTDB/PARAMETERFILE/spfileTESTDB.ora'
[oracle@oraclenode1 dbs]$ scp initTESTDB1.ora oraclenode2:/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs/initTESTDB2.ora
initTESTDB1.ora                                                                                                                                                             100%   53    37.7KB/s   00:00
[oracle@oraclenode1 dbs]$ 

[oracle@oraclenode2 dbs]$ pwd
/u01/app/oracle/product/19.0.0.0/dbhome_1/dbs
[oracle@oraclenode2 dbs]$ ls -ltrh
total 16K
-rw-r--r--. 1 oracle oinstall 3.1K Feb 18 02:09 init.ora
-rw-r--r--. 1 oracle oinstall   51 Feb 19 00:36 initDEVDB2.ora
-rw-rw----. 1 oracle oinstall 1.6K Feb 19 00:40 hc_DEVDB2.dat
-rw-r--r--. 1 oracle oinstall   53 Feb 19 00:44 initTESTDB2.ora
[oracle@oraclenode2 dbs]$ 

[oracle@oraclenode1 dbs]$env |grep ORA
ORACLE_SID=TESTDB1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
[oracle@oraclenode1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Feb 19 00:45:14 2022
Version 19.3.0.0.0

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

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 3707763120 bytes
Fixed Size                  8903088 bytes
Variable Size             788529152 bytes
Database Buffers         2902458368 bytes
Redo Buffers                7872512 bytes
Database mounted.
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DATA/TESTDB/PARAMETERFILE/spf
                                                 iletestdb.ora
SQL> shut immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@oraclenode1 dbs]$
[oracle@oraclenode1 dbs]$ srvctl add database -d TESTDB -n TESTDB -o '/u01/app/oracle/product/19.0.0.0/dbhome_1' -p '+DATA/TESTDB/PARAMETERFILE/spfileTESTDB.ora' -t IMMEDIATE -a 'DATA,RECO'
[oracle@oraclenode1 dbs]$ srvctl add instance -d TESTDB -i TESTDB1 -n oraclenode1
[oracle@oraclenode1 dbs]$ srvctl add instance -d TESTDB -i TESTDB2 -n oraclenode2
[oracle@oraclenode1 dbs]$ srvctl config database -d TESTDB
Database unique name: TESTDB
Database name: TESTDB
Oracle home: /u01/app/oracle/product/19.0.0.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/TESTDB/PARAMETERFILE/spfileTESTDB.ora
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA,RECO
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: oinstall
OSOPER group: oinstall
Database instances: TESTDB1,TESTDB2
Configured nodes: oraclenode1,oraclenode2
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
[oracle@oraclenode1 dbs]$ srvctl status database -d TESTDB
Instance TESTDB1 is not running on node oraclenode1
Instance TESTDB2 is not running on node oraclenode2
[oracle@oraclenode1 dbs]$ srvctl start database -d TESTDB
[oracle@oraclenode1 dbs]$ srvctl status database -d TESTDB
Instance TESTDB1 is running on node oraclenode1
Instance TESTDB2 is running on node oraclenode2
[oracle@oraclenode1 dbs]$
[oracle@oraclenode1 dbs]$ cp initTESTDB1.ora initTESTDB1.ora_Pointing_To_spfile

[oracle@oraclenode2 dbs]$ cp initTESTDB2.ora initTESTDB2.ora_Pointing_To_spfile


Source DB pfile:
================
DEVDB1.__data_transfer_cache_size=0
DEVDB2.__data_transfer_cache_size=0
DEVDB1.__db_cache_size=2768240640
DEVDB2.__db_cache_size=2768240640
DEVDB1.__inmemory_ext_roarea=0
DEVDB2.__inmemory_ext_roarea=0
DEVDB1.__inmemory_ext_rwarea=0
DEVDB2.__inmemory_ext_rwarea=0
DEVDB1.__java_pool_size=0
DEVDB2.__java_pool_size=0
DEVDB1.__large_pool_size=16777216
DEVDB2.__large_pool_size=16777216
DEVDB1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DEVDB2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DEVDB1.__pga_aggregate_target=1241513984
DEVDB2.__pga_aggregate_target=1241513984
DEVDB1.__sga_target=3707764736
DEVDB2.__sga_target=3707764736
DEVDB1.__shared_io_pool_size=134217728
DEVDB2.__shared_io_pool_size=134217728
DEVDB1.__shared_pool_size=771751936
DEVDB2.__shared_pool_size=771751936
DEVDB1.__streams_pool_size=0
DEVDB2.__streams_pool_size=0
DEVDB1.__unified_pga_pool_size=0
DEVDB2.__unified_pga_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/DEVDB/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='19.0.0'
*.control_files='+DATA/DEVDB/CONTROLFILE/current.271.1095926461','+RECO/DEVDB/CONTROLFILE/current.256.1095926461'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='DEVDB'
*.db_recovery_file_dest='+RECO'
*.db_recovery_file_dest_size=8931m
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DEVDBXDB)'
family:dw_helper.instance_mode='read-only'
DEVDB1.instance_number=1
DEVDB2.instance_number=2
*.local_listener='-oraagent-dummy-'
DEVDB1.local_listener='(DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=oranode1-vip.localdomain.com)(PORT=1522))))'
DEVDB2.local_listener='(DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=oranode2-vip.localdomain.com)(PORT=1522))))'
*.open_cursors=300
*.pga_aggregate_target=1174m
*.processes=300
*.remote_login_passwordfile='exclusive'
*.service_names='DEVDB,MALLIK'
*.sga_target=3522m
DEVDB2.thread=2
DEVDB1.thread=1
DEVDB2.undo_tablespace='UNDOTBS2'
DEVDB1.undo_tablespace='UNDOTBS1'

Target DEVDB pfile after adding RAC Instance:
=============================================
DEVDB1.__data_transfer_cache_size=0
DEVDB2.__data_transfer_cache_size=0
DEVDB1.__db_cache_size=2768240640
DEVDB2.__db_cache_size=2768240640
DEVDB1.__inmemory_ext_roarea=0
DEVDB2.__inmemory_ext_roarea=0
DEVDB1.__inmemory_ext_rwarea=0
DEVDB2.__inmemory_ext_rwarea=0
DEVDB1.__java_pool_size=0
DEVDB2.__java_pool_size=0
DEVDB1.__large_pool_size=16777216
DEVDB2.__large_pool_size=16777216
DEVDB1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DEVDB2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DEVDB1.__pga_aggregate_target=1241513984
DEVDB2.__pga_aggregate_target=1241513984
DEVDB1.__sga_target=3707764736
DEVDB2.__sga_target=3707764736
DEVDB1.__shared_io_pool_size=134217728
DEVDB2.__shared_io_pool_size=134217728
DEVDB1.__shared_pool_size=771751936
DEVDB2.__shared_pool_size=771751936
DEVDB1.__streams_pool_size=0
DEVDB2.__streams_pool_size=0
DEVDB1.__unified_pga_pool_size=0
DEVDB2.__unified_pga_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/DEVDB/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='19.0.0'
*.control_files='+DATA/DEVDB/controlfile/control01.ctl','+RECO/DEVDB/controlfile/control02.ctl'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='DEVDB'
*.db_recovery_file_dest='+RECO'
*.db_recovery_file_dest_size=8931m
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DEVDBXDB)'
family:dw_helper.instance_mode='read-only'
DEVDB1.instance_number=1
DEVDB2.instance_number=2
DEVDB1.local_listener='(DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=oraclenode1-vip.localdomain.com)(PORT=1522))))'
DEVDB2.local_listener='(DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=oraclenode1-vip.localdomain.com)(PORT=1522))))'
*.open_cursors=300
*.pga_aggregate_target=1174m
*.processes=300
*.remote_login_passwordfile='exclusive'
*.service_names='DEVDB'
*.sga_target=3522m
DEVDB2.thread=2
DEVDB1.thread=1
DEVDB2.undo_tablespace='UNDOTBS2'
DEVDB1.undo_tablespace='UNDOTBS1'


Target TESTDB pfile after adding RAC Instance:
==============================================
TESTDB1.__data_transfer_cache_size=0
TESTDB2.__data_transfer_cache_size=0
TESTDB1.__db_cache_size=2768240640
TESTDB2.__db_cache_size=2768240640
TESTDB1.__inmemory_ext_roarea=0
TESTDB2.__inmemory_ext_roarea=0
TESTDB1.__inmemory_ext_rwarea=0
TESTDB2.__inmemory_ext_rwarea=0
TESTDB1.__java_pool_size=0
TESTDB2.__java_pool_size=0
TESTDB1.__large_pool_size=16777216
TESTDB2.__large_pool_size=16777216
TESTDB1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
TESTDB2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
TESTDB1.__pga_aggregate_target=1241513984
TESTDB2.__pga_aggregate_target=1241513984
TESTDB1.__sga_target=3707764736
TESTDB2.__sga_target=3707764736
TESTDB1.__shared_io_pool_size=134217728
TESTDB2.__shared_io_pool_size=134217728
TESTDB1.__shared_pool_size=771751936
TESTDB2.__shared_pool_size=771751936
TESTDB1.__streams_pool_size=0
TESTDB2.__streams_pool_size=0
TESTDB1.__unified_pga_pool_size=0
TESTDB2.__unified_pga_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/TESTDB/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='19.0.0'
*.control_files='+DATA/TESTDB/controlfile/control01.ctl','+RECO/TESTDB/controlfile/control02.ctl'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_name='TESTDB'
*.db_recovery_file_dest='+RECO'
*.db_recovery_file_dest_size=8931m
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DEVDBXDB)'
family:dw_helper.instance_mode='read-only'
TESTDB1.instance_number=1
TESTDB2.instance_number=2
TESTDB1.local_listener='(DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=oraclenode1-vip.localdomain.com)(PORT=1522))))'
TESTDB2.local_listener='(DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=oraclenode1-vip.localdomain.com)(PORT=1522))))'
*.open_cursors=300
*.pga_aggregate_target=1174m
*.processes=300
*.remote_login_passwordfile='exclusive'
*.service_names='TESTDB'
*.sga_target=3522m
TESTDB2.thread=2
TESTDB1.thread=1
TESTDB2.undo_tablespace='UNDOTBS2'
TESTDB1.undo_tablespace='UNDOTBS1'

Regards,
Mallik

Running SQL and O/S Commands Within RMAN

Running SQL and O/S Commands Within RMAN Sometimes you may want to run an SQL statement from within RMAN. Use RMAN’s sql command to do this....