Beruflich Dokumente
Kultur Dokumente
RAC Concept
Before Start talking about Oracle RAC, what is the advantage of using Oracle RAC?
Scalability: multiple nodes allow cluster database to scale by single node database.
Availability: if any nodes failure other nodes in cluster, clients can continue working
without any effects.
Manageability: more than one database can be handled by oracle Cluster ware.
Acitve/passive
In this setup usually we have two nodes, one of the nodes are available (active) and the other one
is not (passive), Oracle software should be on Shared storage , and only run on one node ( active
) in case of failure the cluster convert the shared storage to passive node in that case active node
now is passive and the passive node is now active.
There is number of Third Party software Corporation support this kind of cluster such as
Microsoft, Linux. Usually its called OS cluster.
Active/Active
In this kind of setup Oracle instance run concurrently on both server and client access to both
server at the same time, the instance should communicate with other node to ensure (heartbeat)
both server are available but in case any of server goes down the other server can handle the
workload, the benefits of active/active workload can be shared between servers.
Some other concept I would like to mention here, Shared Disk and Non Shared disk in oracle
Real Application Cluster Installation, theres two option when you install Oracle RAC Nothing
to Share means database is configured as number of nodes but each node has it own private disk
only thing shared will be is Database, option number two is shared everything all nodes access to
same data in this case if any of node failure no missing or loss of data.
When I am talking about Real Application Cluster I already mean High Availability (HA) which
is the same purpose of Oracle RAC ensure system or components is continuously operational for
long time. RAC can be complex and not easy to manage, design, install, configure and tune and
finally not to forget the license which is cost lot. The reason behind deploy RAC is different
from company to another some users implement RAC to ensure HA, Other user implement RAC
to manage workload. You can use alternative solution of RAC if you dont have that much of
money such Data Guard or third party Software which I already mention it.
Another Component should be mention when talking about RAC Oracle Cluster Registry (OCR)
shared storage should be available for OCR the benefits of using OCR is Store cluster
configuration such as names, services and instance, Voting Disk also should be on shared storage
is required to determine the nodes that are currently available you can search for process
(CSSD).
Listener
Listener is process runs on each node and the purpose for this process is listening to incoming
connection from clients and redirected to RAC instance, since theres two type of connection
dedicated and shared listener is responsible for managing workload.
Started by the CRS cluster ware as part of the nodeapps. There is one ons daemon started per
clustered node. Receive a subset of published cluster ware events via the local evmd and
racgimon cluster ware daemons and forward those events to application subscribers and to the
local listeners.
Theres Two Type Of this kind of node app process Fast Application Notification ( FAN ) Which
is Used to notify application about any changes in configuration for example start/stop Services.
On other hand we Fast Connection Failover (FCF) The main purpose for this process is to
prevent any new connection for Failed nodes or instance.
Virtual IP ( VIP )
In Oracle 10gR1 Clients Can access to database Rac using VIP no More Public, VIP is Ip
address assign for each node belong to same Subnet mask For public, In case any Faiover VIP
Connect to Another Node.
This process allows clients including SRVCTL and DBCA to execute administrative Command.
# ps ef | grep evmd
Or Another way
Crs_stat t
OCR Failure
Vote Failure
Reboot Issue
Network Issue
Rac Resource Offline
To solve any Issue in Oracle RAC you need to Look at the logs first which is Located in
$CRS_HOME/log/nodename/
Troubleshooting when srvctl can't start RAC instance, but sqlplus can start it [ID 844272.1]
Another issue you can face with Oracle RAC which is Resource offline, as mentioned before you
can check it by crs_stat t and usually the error CRS-0215 could not start resource %
Is this not working you should go further more than this logs will tell what exactly you have.
OCR usually backup automatically in oracle rac and can restore so the issue would be in voting
disk in Linux you can use dd command to backup voting disk, and for windows use copy
command.
And notice that if you dont have backup you need to reinstall CRS and this will cost you time
and Loss of money in same cases.
$CRS_HOME/cdata/crs
#ocrconfig showbackup
Reboot issue in rac happened for different Cause maybe network,hardware,storage or even rac
process http://support.oracle.com note will help you to understand reboot
Because of this you usually need to check matrix certification tab on support.oracle.com check
your network before starting setup process and health check for storage .
$ORACLE_HOME/rdbms/admin/addmrpt.sql
Enterprise manager
o Manage RAC database
o Display Performance as Graphical Interface
o Display Result for AWR,ADDM and ASH
Third Party Tools
o OS Command Such as top
o Spot Software
Active Session history (ASH)
o Help to solve simple performance issue.
o All active session will be generate every Second.
As conclusion you need to use EM to monitor oracle rac database and diagnose performance
Issue this will lead to identify the root of cause issue and try to solve it using one of the above
tools provided by oracle.
First time ASM technology introduced in Oracle 9.0.1 By Oracle OMF (Oracle Managed Files)
Features which automated the creation for database files such as data files, Redo log, and control
file, you can manage table space without reference to filename, ASM Supported Single and RAC
databases.
ASM Cam manage many type of database files for example : data files , temp files , control files,
online redo logs, archive logs and RMAN backup sets, later in newer version it can supported
parameter files , flashback logs , and change tracking files.
Its designed to allow DBA (Database Administrator) to perform most disk management tasks; in
this case ASM has more advantage than LVM and RAID, Another Benefits for ASM For More
complexity Site which is managing large number of disk and you can do that by assign disk to
specific group, including to stripping and mirroring ASM Can Perform some other task such as
increasing reliability and performance By Default ASM Implements two-way mirroring to
ensure redundant copy of data therefore for critical data you can implement three way-mirroring,
another benefits for ASM which is provide mirroring at file level which give DBA more control.
Increasing Read and Write performance in ASM by strip mechanism by data across multiple
disk, and the stripes size control by database files, and as I mentioned earlier ASM Support
Single Instance and RAC database.
In Oracle Database 10gR1 ASM supported only Database 10gR1 check this example, if we have
database version 10.1.0.1 and ASM version 10.1.0.3 then ASM instance will revert to earlier
functionality , on the other hand if ASM version 10.1.0.2 and Database 10.1.0.3 then ASM will
continue using 10.1.0.2 functionality.
In Oracle 10gR2 this is totally different, ASM support different Database version, Oracle 10.2
ASM will support Oracle database 10.1 without losing any Functionality.
Another recommendation for Installing ASM Binary from Oracle which is when you Install
ASM for production environment use shared storage for the following reasons:
Check https://oss.oracle.com to install the required package for ASM depend on your Platforms :
Oracleasm
Oracleasmlib
Oracleasm-support
When you finished installing the above package new device created for ASM called
/dev/oracleasm
Or
Start
stop
Status
Configure
# /etc/init.d/oracleasm configure
This will configure the on-boot properties of the Oracle ASM library
loaded on boot and what permissions it will have. The current values
Createdisk
Note On RAC (Real Application Cluster) these disk should be on Shared Storage using raw
device or logical partition, when you are using raw device make sure its identical on each node,
and regarding to htts://support.oracle.com note number 578455.1 raw device is un-supported in
11gR2, so another option are available now such as ASM,OCFS and OCFS2, also notice that
you need to create ASM disks only on one node, on the second one you should only able to run
scandisks attribute.
Scandisks
After creating Disk you should run this command on the second node/nodes
# /etc/init.d/oracleasm scandisks
Listdisks
You need to verify the disk, this command show you the list of disks you have on ASM
# /etc/init.d/oracleasm listdisks
Disk1
Disk2
Disk3
Disk4
Querydisk
You can query the status disks using querydisk as the example :
Deletedisk
Asmcmd is new features in Oracle 10gr2 and above, ASMCMD utility allows you to inspect the
files within file system with very limited administration and modifications, and to use you should
export/set ORACLE_SID first to ASM instance as the below :
Export ORACLE_SID=+ASM1
By doing that new connection established, and the user should be member of SYSDBA group,
the below command supporting for ASMCMD
Cd
Du
Find
Help
Ls
Lsct
Lsdg
Mkalias
Mkdir
Pwd
Rm
Rmalias
Cd
This commands same as Linux, allow you change current directory but this time within
ASMCMD
Cd <dir>
For example
Cd +DISKGROUP1
Du
Du [dir]
For example
Du +DISKGROUP1
Used_MB Mirror_used_MB
500MB 700MB
Find
Allow you search inside file system,you can start with directoy which may include wildcards and
file name pattern
For example :
Find +DISKGROUP1/orcl/redo*
Osama Mustafa Page 12
Oracle RAC & ASM
+DISKGROUP1/orcl/redolog01.log
+DISKGROUP1/orcl/redolog02.log
+DISKGROUP1/orcl/redolog03.log
Help
Ls
List come or all files and their attributes, if you change the attribute output will be different each
time
Lsct
lsct data
Monitoring ASM
Theres two type of views to monitor ASM dynamic Performance view ( v$) and fixed view
(X$), notice both of these view are available for ASM and database instance.
V$ASM_File
All ASM files belong to disk group mounted by ASM listed in this view.
V$ASM_DISK
V$ASM_DISKGROUP
V$ASM_CLIENT
V$ASM_ALIAS
V$ASM_DISK_STAT
Same as V$ASM_DISK but if new disk added it will not discover it.
Fixed Views
Check ASM
Sqlplus / as sysdba