Professional Documents
Culture Documents
Database Manager
Index
Introduction
References
Introduction
The document is intended as guidelines for
Oracle and System Administrators who are
responsible for implementing an Oracle Extended
(also known as stretched clustering) RAC for the
nodes that are located within 5KM away from each
other. I have implemented the same on IBM P590
series running AIX 5.3 with Oracle 10g Release
10.2.0.3, using Oracle Clusterware on SAN
storage, the two data centers connected over a
1GB Laser Link network with latency of less than
ide1:0.startConnected = "TRUE"
Ethernet0.addressType = "generated"
uuid.location = "56 4d c5 0d df c2 22 83-78 96
e8 44 92 2d 88 e3"
uuid.bios = "56 4d c5 0d df c2 22 83-78 96 e8 44
92 2d 88 e3"
ethernet0.generatedAddress = "00:0c:29:2d:88:e3"
ethernet0.generatedAddressOffset = "0"
tools.syncTime = "FALSE"
scsi0:1.present = "TRUE"
scsi0:1.fileName = "Windows Server 2003
Enterprise Edition (3).vmdk"
sound.virtualDev = "es1371"
scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsi1.sharedBus = "VIRTUAL"
scsi1:1.present = "FALSE"
scsi1:1.mode = "persistent"
scsi1:1.fileName =
"C:\RACVIRTUAL\ASMDISK\oradata1.vmdk"
scsi1:1.deviceType = "plainDisk"
scsi1:2.present = "TRUE"
scsi1:2.mode = "persistent"
scsi1:2.fileName =
"C:\RACVIRTUAL\ASMDISK\ocr1.vmdk"
scsi1:2.deviceType = "plainDisk"
scsi1:3.present = "TRUE"
scsi1:3.mode = "persistent"
scsi1:3.fileName =
"C:\RACVIRTUAL\ASMDISK\votingdisk1.vmdk"
scsi1:3.deviceType = "plainDisk"
scsi1:4.present = "TRUE"
scsi1:4.mode = "persistent"
scsi1:4.fileName = "Z:\ASMDISK\ocr2.vmdk"
scsi1:4.deviceType = "plainDisk"
scsi1:0.present = "TRUE"
scsi1:0.mode = "persistent"
scsi1:0.fileName = "Z:\ASMDISK\votingdisk2.vmdk"
scsi1:0.deviceType = "plainDisk"
Ethernet1.present = "TRUE"
Ethernet1.addressType = "generated"
ethernet1.generatedAddress = "00:0c:29:2d:88:ed"
ethernet1.generatedAddressOffset = "10"
floppy0.present = "FALSE"
redoLogDir = "."
Ethernet0.connectionType = "bridged"
scsi0:2.present = "FALSE"
scsi0:2.fileName =
"C:\RACVIRTUAL\ASMDISK\oradata1.vmdk"
scsi0:3.present = "FALSE"
scsi0:3.fileName =
"C:\RACVIRTUAL\ASMDISK\test9.vmdk"
scsi0:6.present = "FALSE"
scsi0:6.fileName =
"C:\RACVIRTUAL\ASMDISK\test.vmdk"
ide0:0.present = "TRUE"
ide0:0.fileName =
"C:\RACVIRTUAL\ASMDISK\oradata1.vmdk"
ide0:0.deviceType = "plainDisk"
ide0:1.present = "TRUE"
ide0:1.fileName = "Z:\ASMDISK\oradata2.vmdk"
ide0:1.deviceType = "plainDisk"
ide1:1.present = "FALSE"
ide1:1.fileName =
"C:\RACVIRTUAL\ASMDISK\oradata1.vmdk"
scsi0:2.deviceType = "plainDisk"
scsi0:5.present = "FALSE"
scsi0:5.fileName =
"C:\RACVIRTUAL\ASMDISK\oradata1.vmdk"
scsi0:5.deviceType = "plainDisk"
RAC3 Node vmx file: Note remote links to raw
devices on RAC1
Location: Z:\RAC3\winNetEnterprise.vmx
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
config.version = "7"
virtualHW.version = "3"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
memsize = "524"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "Windows Server 2003
Enterprise Edition.vmdk"
ide1:0.present = "TRUE"
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"
floppy0.fileName = "A:"
Ethernet0.present = "TRUE"
sound.present = "TRUE"
sound.fileName = "-1"
displayName = "RAC3"
guestOS = "winNetEnterprise"
priority.grabbed = "normal"
priority.ungrabbed = "normal"
powerType.powerOff = "default"
powerType.powerOn = "default"
powerType.suspend = "default"
powerType.reset = "default"
ide1:0.startConnected = "TRUE"
Ethernet0.addressType = "generated"
uuid.location = "56 4d a4 62 67 78 2e 4e-bd 76
ea 69 ed 2d f9 03"
uuid.bios = "56 4d a4 62 67 78 2e 4e-bd 76 ea 69
ed 2d f9 03"
ethernet0.generatedAddress = "00:0c:29:2d:f9:03"
ethernet0.generatedAddressOffset = "0"
tools.syncTime = "FALSE"
scsi0:1.present = "TRUE"
scsi0:1.fileName = "Windows Server 2003
Enterprise Edition (3).vmdk"
sound.virtualDev = "es1371"
scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsi1.sharedBus = "VIRTUAL"
scsi1:1.present = "FALSE"
scsi1:1.mode = "persistent"
scsi1:1.fileName = "Z:\ASMDISK\oradata1.vmdk"
scsi1:1.deviceType = "plainDisk"
scsi1:2.present = "TRUE"
scsi1:2.mode = "persistent"
scsi1:2.fileName = "z:\ASMDISK\ocr1.vmdk"
scsi1:2.deviceType = "plainDisk"
scsi1:3.present = "TRUE"
scsi1:3.mode = "persistent"
scsi1:3.fileName = "z:\ASMDISK\votingdisk1.vmdk"
scsi1:3.deviceType = "plainDisk"
scsi1:4.present = "TRUE"
scsi1:4.mode = "persistent"
scsi1:4.fileName =
"D:\RACVIRTUAL\ASMDISK\ocr2.vmdk"
scsi1:4.deviceType = "plainDisk"
scsi1:0.present = "TRUE"
scsi1:0.mode = "persistent"
scsi1:0.fileName =
"D:\RACVIRTUAL\ASMDISK\votingdisk2.vmdk"
scsi1:0.deviceType = "plainDisk"
Ethernet1.present = "TRUE"
Ethernet1.addressType = "generated"
ethernet1.generatedAddress = "00:0c:29:2d:f9:0d"
ethernet1.generatedAddressOffset = "10"
floppy0.present = "FALSE"
redoLogDir = "."
Ethernet0.connectionType = "bridged"
ide0:0.present = "TRUE"
ide0:0.fileName =
"D:\RACVIRTUAL\ASMDISK\oradata2.vmdk"
ide0:0.deviceType = "plainDisk"
ide0:1.present = "TRUE"
ide0:1.fileName = "Z:\ASMDISK\oradata1.vmdk"
ide0:1.deviceType = "plainDisk"
rac3
ora.rac3.ons application ONLINE ONLINE
rac3
ora.rac3.vip application ONLINE ONLINE
rac3
crs_stat alone will provide full names listing
crs_stat -f will provide detailed information
about each of the compoenents.
--Start/stop all oracle services
Crs_start -all
Crs_stop -all
Start/Stop Individual services
crs_start resounce_name -c cluster_member
crs_start resource_name
For example: crs_start ora.RACDB.RACDB1.inst
Please note that you can also use srvctl command
to achieve the same for starting or stopping
services, and is recommended to use it as it has
more control of each service group.
--CRSCTL : Controls RAC parameters
Checks health of cluster only
Crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
config.version = "7"
virtualHW.version = "3"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
memsize = "540"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "Windows Server 2003
Enterprise Edition.vmdk"
ide1:0.present = "FALSE"
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"
floppy0.fileName = "A:"
Ethernet0.present = "TRUE"
sound.present = "TRUE"
sound.fileName = "-1"
displayName = "rac5"
guestOS = "winNetEnterprise"
priority.grabbed = "normal"
priority.ungrabbed = "normal"
powerType.powerOff = "default"
powerType.powerOn = "default"
powerType.suspend = "default"
powerType.reset = "default"
ide1:0.startConnected = "TRUE"
Ethernet0.addressType = "generated"
uuid.location = "56 4d 49 04 57 26 bc 40-3f 27
76 e5 1c 6a 0b 18"
uuid.bios = "56 4d 49 04 57 26 bc 40-3f 27 76 e5
1c 6a 0b 18"
ethernet0.generatedAddress = "00:0c:29:6a:0b:18"
ethernet0.generatedAddressOffset = "0"
tools.syncTime = "TRUE"
scsi0:1.present = "TRUE"
scsi0:1.fileName = "Windows Server 2003
Enterprise Edition (3).vmdk"
sound.virtualDev = "es1371"
Ethernet1.present = "TRUE"
Ethernet1.addressType = "generated"
ethernet1.generatedAddress = "00:0c:29:6a:0b:22"
ethernet1.generatedAddressOffset = "10"
scsi0:2.present = "TRUE"
scsi0:2.fileName = "Y:\ASMDISK\ocr1.vmdk"
scsi0:3.present = "TRUE"
scsi0:3.fileName = "Y:\ASMDISK\votingdisk1.vmdk"
scsi1:0.present = "TRUE"
scsi1:0.fileName = "W:\ASMDISK\ocr2.vmdk"
scsi1:1.present = "TRUE"
scsi1:1.fileName = "W:\ASMDISK\votingdisk2.vmdk"
floppy0.present = "FALSE"
ide0:0.present = "TRUE"
ide0:0.fileName = "Y:\ASMDISK\oradata1.vmdk"
ide0:0.deviceType = "plainDisk"
ide0:1.present = "TRUE"
ide0:1.fileName = "W:\ASMDISK\oradata2.vmdk"
ide0:1.deviceType = "plainDisk"
· Now we are ready to add RAC Node2 as
RACDB3 to Server RAC5.
Run the following commands from Existing Node
RAC1:
· cluvfy comp peer -refnode rac1 -n rac5
(Compare)
· Install Clusterware stack software on
RAC5 from RAC1 as:
cd cd I:\oracle\product\10.2.0\crs\oui\BIN
addnode.bat
· Press Next to the welcome screen and
provide public and private IP address of the new
new node and complete the installation.
· The above proc will install
I:\oracle\product\10.2.0\crs on RAC5 and also
cluster services but will not start cluster
sevices (except first 2 obj serv and cluster
volume)
· cd
I:\oracle\product\10.2.0\crs\install\
·
I:\oracle\product\10.2.0\crs\install>crssetup.ad
d.bat
· You should recive the following
messages and make sure there are no errors even
for VIP services.
Step 1: checking status of CRS stack
Step 2: Configuring basic cluster services
Step 3: configuring OCR repository with new
nodes
clscfg: EXISTING configuration version 3
detected.
clscfg: version 3 is 10G Release 2.
Attempting to add 1 new nodes to the
configuration
Using ports: CSS=49895 CRS=49896 EVMC=49898 and
EVMR=49897.
node <nodenumber>: <nodename> <private
interconnect name> <hostname>
node 3: rac5 rac5-priv rac5
Creating OCR keys for user 'administrator',
privgrp ''..
Operation successful.
Step 4: configuring safe mode for CRS
components
Step 5: starting up the CRS stack on new nodes
Step 6: configuring OCR with new node VIP
information
Creating VIP application resource on (1) nodes..
Creating GSD application resource on (1) nodes..
Creating ONS application resource on (1) nodes..
Starting VIP application resource on (1) nodes..
Starting GSD application resource on (1) nodes..
Starting ONS application resource on (1) nodes..
· At this point all cluster services on
the new node RAC5 should be aytomatically
started and this marks the end of Cluster stack
installation for the new node.
· If you run crs_stat -t from Nod3
(RAC5) you should see gsd, ons and vip services
up and running.
· Now you are ready to install oracle
software on the new node.
Cd I:\oracle\product\10.2.0\db_1\oui\bin
addnode.bat
Complete install process.
· Go to RAC5 node and run network config
assistance and create the listener with default
settings. Make sure listener creation is only
for RAC5 node. Run crs_stat -t and you should
see listener component also apearing besides
ons, vip and gsd services.
Now you can go back to RAC1 node and run DBCA
GUI tool and follow the screens to add RACDB3
instance on RAC5 Node (third node). However I
always prefer manual approach which is explained
below:
Perform the following steps from RAC5 node.
· Creating ASM instance on RAC5 Node:
Create admin folder under
I:\oracle\product\10.2.0
Copy all the contents of admin folder from RAC1.
You now have two subfolders as +ASM and RACDB.
Modify init+asm3.ora to include
+ASM3.instance_number=3
copy +ASM3.instance_number=3 to init.ora of
other instances, this is not required but in
case later you would like to create spfile for
asm.
Go to command prompt of ORACLE_HOME/database
set ORACLE_SID=+ASM3
orapwd file=PWD+ASM3.ora password=password
oradim -new -ASMSID +ASM3 (create windows
service)
make sure asmtoolg shows the oradata asm group
disks
via sqlplus mount instance as startup.
You should now see asm instance running and you
can verify by running command select * from
v$asm_diskgroup
However you need to add the asm service to
cluster stack, so shutdown asm instance and go
to crshome/bin and run the following command:
srvctl add asm -n RAC5 -i +ASM3 -o
%ORACLE_HOME%
srvctl start asm -n rac5
Now execute srvctl start asm -n RAC5 and
the ASM will be
started.
· Creating Database instance on RAC5
Node:
set ORACLE_SID=RACDB3
orapwd file=PWDRACDB3.ORA password=password
create pfile from spfile and edit the contents
of the initRACDB3.ora as shown below and then
copy it back to spfile;
racdb1.__db_cache_size=201326592
racdb2.__db_cache_size=159383552
racdb3.__db_cache_size=159383552
racdb1.__java_pool_size=4194304
racdb2.__java_pool_size=4194304
racdb3.__java_pool_size=4194304
racdb1.__large_pool_size=4194304
racdb2.__large_pool_size=4194304
racdb3.__large_pool_size=4194304
racdb1.__shared_pool_size=121634816
racdb2.__shared_pool_size=96468992
racdb3.__shared_pool_size=96468992
racdb1.__streams_pool_size=0
racdb2.__streams_pool_size=0
racdb3.__streams_pool_size=0
*.cluster_database_instances=3
*.audit_file_dest='I:\oracle\product\10.2.0/admi
n/RACDB/adump'
*.background_dump_dest='I:\oracle\product\10.2.0
/admin/RACDB/bdump'
*.cluster_database=TRUE
*.compatible='10.2.0.1.0'
*.control_files='+DATA/racdb/controlfile/current
.260.626900241'
*.core_dump_dest='I:\oracle\product\10.2.0/admin
/RACDB/cdump'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='RACDB'
*.dispatchers='(PROTOCOL=TCP)
(SERVICE=RACDBXDB)'
RACDB3.instance_number=3
RACDB2.instance_number=2
RACDB1.instance_number=1
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_listener='LISTENERS_RACDB'
*.remote_login_passwordfile='exclusive'
*.sga_target=268435456
RACDB3.thread=3
RACDB2.thread=2
RACDB1.thread=1
*.undo_management='AUTO'
RACDB3.undo_tablespace='UNDOTBS3'
RACDB2.undo_tablespace='UNDOTBS2'
RACDB1.undo_tablespace='UNDOTBS1'
*.user_dump_dest='I:\oracle\product\10.2.0/admin
/RACDB/udump'
Now create oracle db sid oradim -NEW -SID RACDB3
ocr looging:
uncomment:I:\oracle\product\10.2.0\crs\srvm\admi
n\ocrlog.ini
Database Services Log
Location:
I:\oracle\product\10.2.0\db_1\RDBMS\log\
ipcdbg.racdb2.log
Here you can find information related to Cache
fusion communication channel over private
interface card. Look here when there is an issue
between nodes for private interface channel.
Location:
I:\oracle\product\10.2.0\db_1\log\rac3\racg\imon
.log
I:\oracle\product\10.2.0\db_1\log\rac3\racg\imon
_RACDB.log
Instance monitor/RACGIMON logs
Location:
I:\oracle\product\10.2.0\db_1\log\rac3\*
This location holds several logs and its
worthwhile to look here when there is an issue
with cluster database. For example you find here
a log about ocr not being able to initialized as
file name:
I:\oracle\product\10.2.0\db_1\log\rac3\\client\o
crconfig_1064.log
and ocrcheck_600.log. Which holds useful
information everytime you run ocrcheck utility.
Backup and Recovery - RAC Environment
Here I will discuss about backing up RAC
environment including all of its components;
Cluster and Database. As far as OS and Oracle
software layer is concerned, you should have a
cold backup for the OS System backup which
should include OS and Oracle software mount
points.
Backup and Recovery for clustered database
You can always use an export method to backup
the database or specific schema, however this
does not differ from single instance to RAC and
I would not consider export to replace the
standard backup procedures. Export is always
used when your requirements are more closer to
the application level for specific objects.
Therefore do not consider export as your backup
strategy for RAC, or even for a single instance
Non-RAC database.
RMAN should always be The Choice when
considering backup strategies for a RAC Database
environment.
There are many articles available on Metalink
that talk about RAC Backup and Recovery
Procedures/commands. My viewpoint is that a DBA
needs to be more aware about Backup and Recovery
concepts in a RAC environment rather than the
actual commands difference. I have always
maintained RAC Databases in such a away that I
did not have to issue different backup/recovery
commands for single instance vs. RAC. The key
here is that you should always define Archived
Log location in the shared storage (where rest
of the data files reside). Backup commands have
specific switches when your archived logs are
backed up locally on each node.
For example, take a look at the following test
case where archived logs are defined at a shared
Test Case:
Lets apply what we have learned onto the RAC
environment we have earlier creates.
Adding 3rd voting disk:
Our extended RAC environment already has one
voting disk for RAC1 & RAC3 nodes. I would like
to add a third voting disk on RAC5 (3rd) node.
From VMWare settings of RAC5 node, create a new
pre-allocated virtual disk (IDE) of 300MB in
size. Run ASMTOOLG before and after adding the
disks, so you would be able to identify the raw
partition name. Now you need to run
GUIOracleOBJManager.exe under CRS HOME/bin to
assign logical name/link the new candidate disk
as VOTEDSK3 as shown in the following figure.
Now share the D:\RACVIRTUAL\RAC5 folder on XPWS5
to XPWS1 and XPWS2 with full access. On XPWS1
create a logical Y: Drive to point to it,
likewise on XPWS2 as well. Then from VMWare add
existing virtual disk from both Wok stations
(XPWS1 and XPWS2) to point to Y:\votedisk3.vmdk.
You should reboot RAC1, RAC3 and RAC5 and then
use GUIOracleOBJManager.exe to see that the new
DISK of 300MB is visible.
Now from RAC1 node, make all cluster services
must be DOWN and then verify this with the
command crs_stat -t. There is a bug that is
fixed in 10.2.0.4 that crashes crs stack of
voting disks are added online, therefore you
need to use the force option:
From the node RAC5:
I:\oracle\product\10.2.0\crs\BIN>crsctl add css
votedisk \\.\votedsk3
Cluster is not in a ready state for online disk
addition
I:\oracle\product\10.2.0\crs\BIN>crsctl add css
votedisk \\.\votedsk3 -force
Now formatting voting disk: \\.\votedsk3
successful addition of votedisk \\.\votedsk3.
Verify this from all nodes by running crsctl
query css votedisk
Now start the cluster node rac1 with all
services and it should be up and running.
Taking a backup of voting disk:
Shutdown all cluster services across nodes. Use
the ocopy oracle supplied command to take a
backup as shown below:
From RAC5:
I:\oracle\product\10.2.0\crs\BIN>crsctl query
css votedisk
0. 0 \\.\votedsk1
1. 0 \\.\votedsk2
2. 0 \\.\votedsk3
located 3 votedisk(s).
I:\oracle\product\10.2.0\crs\BIN>ocopy
OCOPY v2.0 - Copyright 1989-1993 Oracle Corp.
All rights reserved.
Usage:
ocopy from_file [to_file [a | size_1
[size_n]]]
ocopy -b from_file to_drive
ocopy -r from_drive to_dir
I:\oracle\product\10.2.0\crs\BIN>ocopy
\\.\votedsk3 votedsk3.bak
VOTEDSK3.BAK
I:\oracle\product\10.2.0\crs\BIN>
Restoring a backup of voting disk:
Suppose you lost your voting disk/device, follow
the same procedures as described above to
re-create the new voting disk. However suppose
you lost all of your voting disk but you had a
backup, then follow the procedures to create a
new raw voting disk/device as described earlier
until the point where you assign the link name.
Then run the restore as shown below:
I:\oracle\product\10.2.0\crs\BIN>ocopy
votedsk3.bak \\.\votedsk3
\\.\VOTEDSK3
Changing Location of Voting disk:
Use the add method described above.
What to do when OCR/Voting disks are lost and
there is no backup:
Reference Metalink ID: 399482.1
Next
I though of publishing this document at the
moment and I will
create additional articles on Performance
Tuning and Failover
strategies. For further details please
visit Resource Section.
eferences
http://www.oracle.com/technology/products/databa
se/clustering/index.html
Copyright © 2007 www.OracleFusions.com All
rights reserved. For Educational Purpose Only
The information contained in this document
represents my personal view on the issues
discussed as of the date of publication, and I
can not guarantee the accuracy of any
information presented after the date of
publication.
This document is for informational purposes
only. I MAKE NO WARRANTIES, EXPRESS OR IMPLIED,
IN THIS DOCUMENT.
For further information, please contact at
Support@OracleFusions.com