Owner:oracle (Oracle software owner)
Database: techdb
Instances: techdb1, techdb2
Servers/Node: basket-techdb01, basket-techdb02
To remove and later add the cluster Oracle database, follow these steps:
It is important to know the previous configuration for a possible backup:
srvctl config database -d <database_name| [oracle@basket-techdb01 bin]$ srvctl config database -d techdb Database unique name: techdb Database name: techdb Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1 Oracle user: oracle Spfile: +DATA/techdb/PARAMETERFILE/spfile.307.998131789 Password file: +DATA/techdb/PASSWORD/pwdtechdb.295.998131215 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: dba OSOPER group: oper Database instances: techdb1,techdb2 Configured nodes: basket-techdb01,basket-techdb02 Database is administrator managed
Stop the database:
srvctl stop database -d <database_name> [oracle@basket-techdb01 bin]$ srvctl stop database -d techdb
Remove the database from cluster configuration:
srvctl remove database -d <database_name> [oracle@basket-techdb01 bin]$ srvctl remove database -d techdb Remove the database techdb? (y/[n]) y [oracle@basket-techdb01 bin]$
Add the database in the cluster configuration: (For all nodes)
srvctl add instance -d <database_name> -i <instance_node1> -n <server_name_node1> srvctl add instance -d <database_name> -i <instance_node2> -n <server_name_node2> [oracle@basket-techdb01 bin]$ srvctl add instance -d techdb -i techdb1 -n basket-techdb01 [oracle@basket-techdb01 bin]$ srvctl add instance -d techdb -i techdb2 -n basket-techdb02
Start the database:
srvctl start database -d <database_name> [oracle@basket-techdb01 bin]$ srvctl start database -d techdb
Check the configuration again :
srvctl config database -d <database_name> [oracle@basket-techdb01 bin]$ srvctl config database -d techdb Database unique name: techdb Database name: Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1 Oracle user: oracle Spfile: 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: dba OSOPER group: oper Database instances: techdb1,techdb2 Configured nodes: basket-techdb01,basket-techdb02 Database is administrator managed
Check the status of the database :
srvctl status database -d <database_name> [oracle@basket-techdb01 bin]$ srvctl status database -d techdb Instance techdb1 is running on node basket-techdb01 Instance techdb2 is running on node basket-techdb01 [oracle@basket-techdb01 bin]$
Hi! I am Bruno, a Brazilian born and bred, and I am also a naturalized Swedish citizen. I am a former Oracle ACE and, to keep up with academic research, I am a Computer Scientist with an MSc in Data Science and another MSc in Software Engineering. I have over ten years of experience working with companies such as IBM, Epico Tech, and Playtech across three different countries (Brazil, Hungary, and Sweden), and I have joined projects remotely in many others. I am super excited to share my interests in Databases, Cybersecurity, Cloud, Data Science, Data Engineering, Big Data, AI, Programming, Software Engineering, and data in general.
(Continue reading)