Step#1
######
Create password files for both RAC instances
--------------------------------------------
orapwd file=orapwnitiprd password=oranitiprd force=y
Step#2
######
Add RAC specific parameters in pfile
------------------------------------
Ex:
*.cluster_database_instances=2
*.cluster_database=true
*.remote_listener='LISTENERS_PROD1’
prod1a.thread=1
prod1a.instance_number=1
prod1a.undo_tablespace='UNDOTBS1'
prod1b.thread=2
prod1b.instance_number=2
prod1b.undo_tablespace='UNDOTBS2'
init.ora FILE:
############################################################################################################################################
nitiprd1.__db_cache_size=1996488704
nitiprd2.__db_cache_size=1996488704
nitiprd1.__java_pool_size=16777216
nitiprd2.__java_pool_size=16777216
nitiprd1.__large_pool_size=16777216
nitiprd2.__large_pool_size=16777216
nitiprd1.__shared_pool_size=520093696
nitiprd2.__shared_pool_size=520093696
nitiprd1.__streams_pool_size=218103808
nitiprd2.__streams_pool_size=218103808
*.audit_file_dest='/oracle/admin/nitiprd/adump'
*.background_dump_dest='/oracle/admin/nitiprd/bdump'
*.cluster_database_instances=2
*.cluster_database=FALSE
*.compatible='10.2.0.3.0'
*.control_files='/oramxp/706/data/data00/control01.ctl','/oramxp/706/index/index00/control02.ctl','/oramxp/706/misc/miscdata/control03.ctl'
*.core_dump_dest='/oracle/admin/nitiprd/cdump'
*.db_16k_cache_size=109715200
*.db_block_size=8192
*.db_cache_size=409715200
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='nitiprd'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=nitiprdXDB)'
nitiprd2.instance_number=2
nitiprd1.instance_number=1
*.job_queue_processes=10
*.log_archive_dest_1='location=/oramxp/706/archive/'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=114572800
*.processes=300
*.remote_login_passwordfile='exclusive'
*.sessions=100
*.sga_max_size=2885760000
*.sga_target=2885760000
*.streams_pool_size=209715200
nitiprd2.thread=2
nitiprd1.thread=1
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
nitiprd2.undo_tablespace='UNDOTBS2'
nitiprd1.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/oracle/admin/nitiprd/udump'
#################################################################################################################################################
Step#3
######
Start up the instance if it is not already started and issue the following statement to create your spfile on your raw partition:
---------------------------------------------------------------------------------------------------------------------------------
create spfile='/oramxp/706/misc/miscdata/spfilenitiprd.ora' from pfile='/oracle/product/10g/dbs/initnitiprd.ora';
For easy manageability you can create an initSID.ora file in your local $ORACLE_HOME/dbs directory that points to your spfile:
------------------------------------------------------------------------------------------------------------------------------
initnitiprd1.ora
#################
spfile=/oramxp/706/misc/miscdata/spfilenitiprd.ora
initnitiprd2.ora
#################
spfile=/oramxp/706/misc/miscdata/spfilenitiprd.ora
Step#4
######
Create RAC Data Dictionary Views.
---------------------------------
Create the RAC data dictionary views on the first RAC instance.
SQL> !echo $ORACLE_SID
nitiprd1
SQL> spool /tmp/catclust.log
SQL> @$ORACLE_HOME/rdbms/admin/catclust
...
...
...
SQL> spool off
SQL> shutdown immediate;
Step#5
######
Register the RAC instances with CRS.
------------------------------------
srvctl add database -d nitiprd -o '/oracle/product/10g/'
srvctl add instance -d nitiprd -i nitiprd1 -n u060mxmd11
srvctl add instance -d nitiprd -i nitiprd2 -n u060mxmd12
srvctl start instance -d nitiprd -i nitiprd1
u060mxmd11:/home/oracle>srvctl start instance -d nitiprd -i nitiprd1
PRKP-1001 : Error starting instance nitiprd1 on node u060mxmd11
CRS-0215: Could not start resource 'ora.nitiprd.nitiprd1.inst'.
SQL> startup
ORACLE instance started.
Total System Global Area 2902458368 bytes
Fixed Size 2086904 bytes
Variable Size 771753992 bytes
Database Buffers 2113929216 bytes
Redo Buffers 14688256 bytes
Database mounted.
Database opened.
SQL> select * from v$instance;
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
HOST_NAME
----------------------------------------------------------------
VERSION STARTUP_T STATUS PAR THREAD# ARCHIVE LOG_SWITCH_WAIT
----------------- --------- ------------ --- ---------- ------- ---------------
LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST BLO
---------- --- ----------------- ------------------ --------- ---
1 nitiprd1
u060mxmd11
10.2.0.4.0 03-DEC-09 OPEN NO 1 STARTED
ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO
Step#6
######
Create redo logs for the second RAC instance.
---------------------------------------------
alter database add LOGFILE thread 2
GROUP 4 ('/oramxp/706/misc/redo/nitiprd/redo706_04a.log','/oramxp/706/misc/redo/nitiprd/redo706_04b.log') SIZE 500M,
GROUP 5 ('/oramxp/706/misc/redo/nitiprd/redo706_05a.log','/oramxp/706/misc/redo/nitiprd/redo706_05b.log') SIZE 500M,
GROUP 6 ('/oramxp/706/misc/redo/nitiprd/redo706_06a.log','/oramxp/706/misc/redo/nitiprd/redo706_06b.log') SIZE 500M;
Enable Thread No# 2
-------------------
SQL> alter database enable thread 2;
Database altered.
Rename Logfiles for Thread # 1
------------------------------
SQL> alter database rename file '/oramxp/706/data/redo01.log' to '/oramxp/706/misc/redo/nitiprd/redo706_01a.log';
Database altered.
SQL> alter database rename file '/oramxp/706/data/redo02.log' to '/oramxp/706/misc/redo/nitiprd/redo706_02a.log';
Database altered.
SQL> alter database rename file '/oramxp/706/data/redo03.log' to '/oramxp/706/misc/redo/nitiprd/redo706_03a.log';
Database altered.
Add Log Member to Log Groups
----------------------------
SQL> ALTER DATABASE ADD LOGFILE MEMBER '/oramxp/706/misc/redo/nitiprd/redo706_01b.log' TO GROUP 1;
Database altered.
SQL> ALTER DATABASE ADD LOGFILE MEMBER '/oramxp/706/misc/redo/nitiprd/redo706_02b.log' TO GROUP 2;
Database altered.
SQL> ALTER DATABASE ADD LOGFILE MEMBER '/oramxp/706/misc/redo/nitiprd/redo706_03b.log' TO GROUP 3;
Database altered.
SQL> select group#, member from v$logfile;
GROUP# MEMBER
---------- -----------------------------------------------------------------
1 /oramxp/706/misc/redo/nitiprd/redo706_01a.log
2 /oramxp/706/misc/redo/nitiprd/redo706_02a.log
3 /oramxp/706/misc/redo/nitiprd/redo706_03a.log
4 /oramxp/706/misc/redo/nitiprd/redo706_04a.log
4 /oramxp/706/misc/redo/nitiprd/redo706_04b.log
5 /oramxp/706/misc/redo/nitiprd/redo706_05a.log
5 /oramxp/706/misc/redo/nitiprd/redo706_05b.log
6 /oramxp/706/misc/redo/nitiprd/redo706_06a.log
6 /oramxp/706/misc/redo/nitiprd/redo706_06b.log
1 /oramxp/706/misc/redo/nitiprd/redo706_01b.log
2 /oramxp/706/misc/redo/nitiprd/redo706_02b.log
3 /oramxp/706/misc/redo/nitiprd/redo706_03b.log
12 rows selected.
Run following command:
----------------------
(otherwise it will give this error while starting the 2nd instance: ORA-01620: no public threads are available for mounting)
SQL> alter system set thread=2 scope=spfile sid='nitiprd2';
System altered.
Shutdown and startup the Node#1
-------------------------------
Step#7
######
Create undo tablespace for the second RAC instance
--------------------------------------------------
SQL> create undo tablespace UNDOTBS2 datafile '/oramxp/706/undo/undotbs02.dbf' size 20G;
Tablespace created.
SQL> select tablespace_name, file_name from dba_data_files where tablespace_name=’UNDOTBS2’;
TABLESPACE FILE_NAME
--------------------- --------------------------------------
UNDOTBS2 /oramxp/706/misc/undotbs02.dbf
SQL> alter system set cluster_database=TRUE scope=spfile sid='*';
System altered.
Step#8
######
Start the second instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 2902458368 bytes
Fixed Size 2086904 bytes
Variable Size 771753992 bytes
Database Buffers 2113929216 bytes
Redo Buffers 14688256 bytes
SQL> alter database mount;
Database altered.
SQL> alter system set instance_number=2 scope=spfile;
System altered.
SQL> alter database open;
Database altered.
SQL> select * from v$instance;
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
HOST_NAME
----------------------------------------------------------------
VERSION STARTUP_T STATUS PAR THREAD# ARCHIVE LOG_SWITCH_WAIT
----------------- --------- ------------ --- ---------- ------- ---------------
LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST BLO
---------- --- ----------------- ------------------ --------- ---
1 nitiprd2
u060mxmd12
10.2.0.4.0 03-DEC-09 OPEN NO 1 STARTED
ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO
No comments:
Post a Comment