Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

11gR2 RAC manually add node database instance

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

In the Oracle 11gR2 RAC environment composed of two servers, the private network card of the rac1 server needs to be replaced, so only the database instance (oracledb1) of this node is created when using dbca to create the database on the rac2 server. When the private Nic of the rac1 server is replaced successfully, execute dbca graphical "add Instance" on the rac1 server and execute the dbca-silent command to add the instance, you will receive the following error:

[oracle@rac1] $dbca-silent-addInstance-gdbName oracledb-nodelist rac1-instanceName oracledb2-sysDBAUserName sys-sysDBAPassword oracle_Schic1 Look at the log file "/ u01/app/oracle/cfgtoollogs/dbca/oracledb.log" for further details.

[oracle@rac1] $cat / u01/app/oracle/cfgtoollogs/dbca/oracledb.log "Adding instance" operation on the admin managed database oracledb requires instance configured on local node. There is no instance configured on the local node "rac1".

This operation should be done on the existing RAC node rac2. However, let's continue to discuss the steps to manually add an oracledb2 instance on rac1:

Since rac2 is running an oracledb1 instance, add the oracledb2 instance of rac1 first, and then make adjustments later.

1. Try to start the oracledb2 instance directly on rac1.

[root@rac1 bin] # su-oracle [oracle@rac1 ~] $export ORACLE_SID= Oracle DB2 [oracle @ rac1 ~] $sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Nov 9 02:29:36 2012

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

Connected to an idle instance.

SQL > startupORA-29760: instance_number parameter not specified

Content reference article for instance_number: http://space.itpub.net/23135684/viewspace-748572

two。 Ensure that the relevant disk groups are loaded on the ASM instance of rac1.

[root@rac2 bin] #. / crsctl stat res-t----NAME TARGET STATE SERVER STATE_DETAILS- -Local Resources -ora.ARCH.dg OFFLINE OFFLINE rac1 ONLINE ONLINE rac2 ora.DATA.dg OFFLINE OFFLINE rac1 ONLINE ONLINE rac2 .ora.asm ONLINE ONLINE rac1 Started ONLINE ONLINE rac2 Started .ora.oracledb.db 1 ONLINE ONLINE rac2 Open. [root@rac2 bin] #. / srvctl start diskgroup-g data-n rac1 [root@rac2 bin] #. / srvctl start diskgroup-g arch -n rac1 [root@rac2 bin] #. / crsctl stat res-t----NAME TARGET STATE SERVER STATE_DETAILS- -Local Resources -- ora.ARCH.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2 ora.DATA.dg ONLINE ONLINE rac1 ONLINE ONLINE rac2.

3. Adjust the RAC parameter file.

[root@rac2 bin] # su-oracle [oracle@rac2 ~] $export ORACLE_SID= Oracle db1 [oracle @ rac2 ~] $sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Fri Nov 9 02:34:18 2012

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

Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit ProductionWith the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,Data Mining and Real Application Testing options

SQL > create pfile='/tmp/opfile.txt' from spfile='+DATA/oracledb/spfileoracledb.ora'

File created.

SQL >! vi / tmp/opfile.txt

Oracledb1.__db_cache_size=60263759872oracledb1.__java_pool_size=134217728oracledb1.__large_pool_size=134217728oracledb1.__pga_aggregate_target=39728447488oracledb1.__sga_target=68719476736oracledb1.__shared_io_pool_size=0oracledb1.__shared_pool_size=7784628224oracledb1.__streams_pool_size=0*.audit_file_dest='/u01/app/oracle/admin/oracledb/adump'*.audit_trail='db'*.cluster_database=true*.compatible='11.2.0.0.0'*.control_files='+DATA / oracledb/controlfile/current.260.798857565'*.db_block_size=8192*.db_create_file_dest='+DATA'*.db_domain=''*.db_name='oracledb'*.diagnostic_dest='/u01/app/oracle'*.dispatchers=' (PROTOCOL=TCP) (SERVICE=oracledbXDB) 'oracledb1.instance_number=1oracledb2.instance_number=2*.log_archive_dest_1='LOCATION=+arch'*.log_archive_format='%t_%s_%r.dbf'*.open_cursors=300*.pga_aggregate _ target=39625687040*.processes=5000*.remote_listener='wstrac.scan.com:1521'*.remote_login_passwordfile='exclusive'*.sessions=5505*.sga_target=68719476736oracledb1.thread=1oracledb2.thread=2oracledb1.undo_tablespace='UNDOTBS1'oracledb2.undo_tablespace='UNDOTBS2'~ "/ tmp/opfile.txt" 34L 1103C written

The red part above is a new addition.

SQL > shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL > create spfile='+DATA/oracledb/spfileoracledb.ora' from pfile='/tmp/opfile.txt'

File created.SQL > startupORACLE instance started.

Total System Global Area 6.8413E+10 bytesFixed Size 2245480 bytesVariable Size 8053066904 bytesDatabase Buffers 6.0264E+10 bytesRedo Buffers 93609984 bytesDatabase mounted.Database opened.

The meaning of the added parameters can also be found in the article: http://space.itpub.net/23135684/viewspace-748572

4. Ensure that the UNDOTBS2 tablespace is created.

SQL > select file_id,file_name from dba_data_files

FILE_ID-FILE_NAME---- 4+DATA/oracledb/datafile/users.259.798857305

3+DATA/oracledb/datafile/undotbs1.258.798857305

2+DATA/oracledb/datafile/sysaux.257.798857305

FILE_ID-FILE_NAME---- 1+DATA/oracledb/datafile/system.256.798857305

5+DATA/oracledb/datafile/undotbs2.266.798863859

5. Try to start the oracledb2 instance on rac1 again.

SQL > startupORACLE instance started.

Total System Global Area 6.8413E+10 bytesFixed Size 2245480 bytesVariable Size 6979325080 bytesDatabase Buffers 6.1338E+10 bytesRedo Buffers 93609984 bytesORA-01618: redo thread 2 is not enabled-cannot mount requires redo thread 2 to be enabled.

6. Enable redo thread 2.

The following actions must be performed on the existing RAC node instance (cannot be performed on the added node), that is, the following command is executed on the oracledb1 instance of the rac2 node:

SQL > ALTER DATABASE 2 ADD LOGFILE THREAD 2 GROUP 4 3 ('+ DATA') SIZE 256m

Database altered.

SQL > ALTER DATABASE 2 ADD LOGFILE THREAD 2 GROUP 5 3 ('+ DATA') SIZE 256m

Database altered.

SQL > ALTER DATABASE 2 ADD LOGFILE THREAD 2 GROUP 6 3 ('+ DATA') SIZE 256m

Database altered.

SQL > alter database enable thread 2

Database altered.

To start thread 2, you must first create a log group for thread 2.

Reference article: http://space.itpub.net/7199859/viewspace-663572

7. Load the rac1 oracledb2 instance and open the database.

SQL > alter database mount

Database altered.

SQL > alter database open

Database altered.

After the above steps, the oracledb2 instance is successfully added to the rac1 node.

8. Add instance information to the OCR.

[root@rac1 bin] # su-oracle [oracle@rac1 ~] $srvctl add instance-d oracledb-I oracledb2-n rac1 [oracle@rac1 ~] $srvctl status database-d oracledbInstance oracledb2 is not running on node rac1Instance oracledb1 is running on node rac2 [oracle@rac1 ~] $srvctl start instance-d oracledb-I oracledb2 [oracle@rac1 ~] $srvctl status database-d oracledbInstance oracledb2 is running on node rac1Instance oracledb1 is running on node rac2

9. Adjust the instance running node in OCR.

After the above addition, rac1 runs the oracledb2 instance, rac2 runs the oracledb1 instance, perform the following steps to make rac1 run the oracledb1 instance and rac2 run the oracledb2 instance.

[oracle@rac1] $srvctl stop database-d oracledb [oracle@rac1 ~] $srvctl remove instance-d oracledb-I oracledb1Remove instance from the database oracledb? (y / [n]) y [oracle@rac1 ~] $srvctl remove instance-d oracledb-I oracledb2Remove instance from the database oracledb? (y / [n]) y [oracle@rac1 ~] $srvctl add instance-d oracledb-I oracledb1-n rac1 [oracle@rac1 ~] $srvctl add instance-d oracledb-I oracledb2-n rac2 [oracle@rac1 ~] $srvctl start database-d oracledb [oracle@rac1 ~] $srvctl status database-d oracledbInstance oracledb1 is running on node rac1Instance oracledb2 is running on node rac2 [oracle@rac1 ~] $srvctl enable database-d oracledbPRCC-1010: oracledb was already enabledPRCR-1002: Resource ora.oracledb.db is already enabled [oracle@rac1 ~] $srvctl enable instance-d oracledb-I oracledb1 [oracle@rac1 ~] $srvctl enable instance-d oracledb-I oracledb2

-- end--

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report