SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
RAC introduction 
By 
Riyaj Shamsudeen
ATT June 2010 
Riyaj Shamsudeen 2 
Basic RAC 
 One database, multiple instances. Shared everything architecture. 
 All of the following must be in cluster file system or ASM 
storage. 
 Database files 
 Online redo log files 
 Undo tablespace 
 Temp tablespace 
 It is a good practice to keep archived log files and spfile in the 
CFS or ASM, but not technically necessary.
UNDO and REDO 
 Every instance masters its own undo tablespace. 
 Each instance has its own redo thread or set of online redo log 
files. 
 Undo segment blocks are accessed by other instances during 
normal operations. 
 Redo log files of other threads accessed only during instance 
recovery. 
ATT June 2010 
Riyaj Shamsudeen 3
ATT June 2010 
Riyaj Shamsudeen 4 
DB Startup 
 You should try to use srvctl commands to perform instance and 
nodeapps operations. 
 While this can be performed at CRS level, you probably should 
not use that as a first measure. 
 Startup 
srvctl start database –d PERF 
 Syntax is 
srvctl start database -d db_unique_name [-o start_options]  
[-c connect_str | -q]
ATT June 2010 
Riyaj Shamsudeen 5 
Instance Startup 
 Instances individually can be started too. 
 Instance Startup 
srvctl start instance –d PERF –i PERF1,PERF2 
 Syntax is 
srvctl start instance -d db_unique_name -i inst_name_list  
[-o start_options] [-c connect_str | -q]
ATT June 2010 
Riyaj Shamsudeen 6 
Config 
 You can see all instances in the cluster using config option. 
 Instances 
$ srvctl config database -d PERF 
wsqfinc1a PERF1 /opt/app/dtperf/perfdb/10.2 
wsqfinc2a PERF2 /opt/app/dtperf/perfdb/10.2 
wsqfinc3a PERF3 /opt/app/dtperf/perfdb/10.2 
wsqfinc3e PERF4 /opt/app/dtperf/perfdb/10.2 
 Syntax is 
srvctl config database [-d db_unique_name [-a] [-t]]
ATT June 2010 
Riyaj Shamsudeen 7 
Listeners 
 You can see configured listeners using config option 
 Listeners. Listener name and node that listener is currently 
located. PERF is the listener name. 
$ srvctl config listener -n wsqfinc1a 
wsqfinc1a PERF 
 Starting listener. All configured listeners will be started with this 
command. 
srvctl start listener –n wsqfinc1a 
 Individual listeners 
srvctl start listener –n wsqfinc1a –l PERF, PERF_99
ATT June 2010 
Riyaj Shamsudeen 8 
What is VIP? 
 VIP stands for Virtual IP address. 
 An IP address that can be floated to a different server, if needed. 
 Listeners need to listen on Virtual IP address. In the output below, 
IP address 10.85.24.38 is plumbed to the device ce11. 
 Ce11 also has another NOFAILOVER address which is physical 
(Not virtual). 
/sbin/ifconfig –a 
… 
ce11: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 
index 2 
inet 10.85.24.24 netmask fffffe00 broadcast 10.85.25.255 
groupname wsqvcs81_multinicB 
… 
ce11:2: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2 
inet 10.85.24.38 netmask fffffe00 broadcast 10.85.25.255
Why do we need VIP? 
 Let’s say that listener is listening on physical IP address. If the 
server goes down then the IP address will not respond. 
 So, new connections from the application, will send the packet to 
ethernet and must wait for tcp_time_out seconds before trying 
next instance. 
 This means that new connection requests will wait for 6 minutes 
and can timeout. 
 If we use virtual IP address for the listener, then CRS will relocate 
the virtual IP address to a surviving server. New connection to 
that IP address will immediately get a response and try next entry 
in the connect string. 
ATT June 2010 
Riyaj Shamsudeen 9
ATT June 2010 
Riyaj Shamsudeen 10 
Shutdown 
 Shutting down database (all instances) uses srvctl commands. 
srvctl stop database –d PERF –o immediate 
 Shutting down individual instances 
srvctl stop instance –d PERF –i PERF1 –o immediate 
 Stopping listeners 
srvctl stop listener –n wsqfinc1a 
srvctl stop listener –n wsqfinc1a –l PERF
ATT June 2010 
Riyaj Shamsudeen 11 
CRS/CSS 
 CRS and CSS daemons are clusterware daemons. They monitor 
the health of the cluster and resources. 
 How to check if clusterware is running? Following daemons need 
to be running. Following daemons need to be running. 
ps -ef |grep d.bin 
root 21955 1 0 May 22 ? 0:00 /opt/app/dtperf/oracrs/product/crs/bin/oclskd.bin 
oracrs 21409 21264 0 May 22 ? 418:50 /opt/app/dtperf/oracrs/product/crs/bin/ocssd.bin 
oracrs 21073 4384 0 May 22 ? 11:07 /opt/app/dtperf/oracrs/product/crs/bin/evmd.bin 
root 21556 4386 0 May 22 ? 587:56 /opt/app/dtperf/oracrs/product/crs/bin/crsd.bin reboot 
 To check health of CRS, from CRS owner userid 
crsctl check crs 
Cluster Synchronization Services appears healthy 
Cluster Ready Services appears healthy 
Event Manager appears healthy
ATT June 2010 
Riyaj Shamsudeen 12 
Resources 
 CRS manages the resources such as database, listeners and VIPs 
etc. 
 Crs_stat shows the resources. 
crs_stat -t -v 
Name Type R/RA F/FT Target State Host 
---------------------------------------------------------------------- 
ora....F1.inst application 0/5 0/0 ONLINE ONLINE wsqfinc1a 
ora....F2.inst application 0/5 0/0 ONLINE ONLINE wsqfinc2a 
ora....F3.inst application 0/5 0/0 ONLINE ONLINE wsqfinc3a 
ora....F4.inst application 0/5 0/0 ONLINE ONLINE wsqfinc3e 
ora.PERF.db application 0/0 0/1 ONLINE ONLINE wsqfinc1a 
ora....RF.lsnr application 1/5 0/0 ONLINE ONLINE wsqfinc1a 
ora....c1a.gsd application 4/5 0/0 ONLINE ONLINE wsqfinc1a 
...
ATT June 2010 
Riyaj Shamsudeen 13 
Resource details 
 You can look at the resources in detail too 
$crs_stat ora.wsqfinc2a.vip –v 
NAME=ora.wsqfinc2a.vip 
TYPE=application 
RESTART_ATTEMPTS=0 
RESTART_COUNT=0 
FAILURE_THRESHOLD=0 
FAILURE_COUNT=0 
TARGET=ONLINE 
STATE=ONLINE on wsqfinc2a 
 Target is specifying what the state should be. 
 State is indicating the current state and current server the resource 
is located.
crs_stop/crs_start 
 All resources can be started from CRS. But, you generally do not 
want to do this: 
$crs_start –all 
 Individual resources can be started 
crs_start ora.wsqfinc2a.PERF.lsnr 
 Individual or All resources can be stopped too. 
crs_stop ora.wsqfinc2a.PERF.lsnr 
Crs_stop -all 
ATT June 2010 
Riyaj Shamsudeen 14
ATT June 2010 
Riyaj Shamsudeen 15 
CRS stack 
 Whole CRS stack can be stopped. 
Crsctl stop crs 
 But, generally, this needs root permissions 
Sudo –u root crsctl stop crs 
 All resources can be stopped by crsctl too 
Crsctl stop resources 
 If you are not sure syntax, just type crsctl and enter. Complete 
syntax displayed.
ATT June 2010 
Riyaj Shamsudeen 16 
Voting disks 
 Voting disks are for disk heart beat between the nodes. You can 
see voting disks with crsctl command. 
$ crsctl query css votedisk 
0. 0 /opt/app/wsqvcs81/VOTE/votedisk.dbf 
Located 1 voting disk(s). 
 You should probably create multiple voting disks. 
 If the CRS detects that other nodes stopped updating voting 
disks, it can kill failed nodes and remove from the cluster.
ATT June 2010 
Riyaj Shamsudeen 17 
OCR 
 OCR is Oracle Cluster Registry, almost like Windows registry. 
 Various details about the cluster is stored in the OCR. 
 Unfortunately, OCR gets corrupted quite easily. So, have a good 
backup strategy for OCR. 
 CRS backup up OCR every 4 hours. 
ocrconfig -showbackup 
wsqfinc3e 2010/06/10 10:27:19 /opt/app/dtperf/oracrs/product/crs/cdata/wsqvcs81/ 
backup00.ocr 
wsqfinc3e 2010/06/10 06:27:18 /opt/app/dtperf/oracrs/product/crs/cdata/wsqvcs81/ 
backup01.ocr 
wsqfinc3e 2010/06/10 02:27:18 /opt/app/dtperf/oracrs/product/crs/cdata/wsqvcs81/ 
backup02.ocr
ATT June 2010 
Riyaj Shamsudeen 18 
CRS log files 
 In case of CRS issues, read CRS log files. 
 Log file locations are: 
$ORA_CRS_HOME/log/<nodename> 
/opt/app/dtperf/oracrs/product/crs/log/wsqfinc1a/ 
 Alert log is important. CRS equivalent of DB alert log. 
alertwsqfinc1a.log 
 Other logs are in the respective directory. For example, crs log file 
in PERF is in 
/opt/app/dtperf/oracrs/product/crs/log/wsqfinc1a/crsd/crsd.log
Resolving hung issues 
 One or more RAC instances can go in to an hang state. 
 Always, first identify whether it is one instance in trouble or all 
instances are in trouble. 
1* select inst_id, instance_name from gv$instance order by inst_id 
INST_ID INSTANCE_NAME 
------- ---------------- 
ATT June 2010 
Riyaj Shamsudeen 19 
1 PERF1 
2 PERF2 
.. 
 If the above statement is hung, then it is quite possible that we 
lost communication to one instance. 
 Avoid one instance myopia. Read alert log from all nodes.
Use AWR reports 
 To resolve issues, AWR reports are quite handy. Use my scripts to 
create AWR reports from all nodes. 
@awrrpt_all_gen.sql -- To create recent text AWR report for all nodes 
@awrrpt_all_range_gen.sql -- To create recent text AWR report for a range 
ATT June 2010 
Riyaj Shamsudeen 20 
you can specify. 
 If there was no issues 30 minutes ago (assuming 30 min awr 
duration), AWR might not show any issues.
ATT June 2010 
Riyaj Shamsudeen 21 
Use ASH too 
 Following query will tell you where the problem might be, if there 
is an instance wide hang. This is just an indicator of the problem, 
not necessarily a problem itself. 
select inst_id, event, count(*) from gv$active_session_history 
where sample_time > sysdate -( 5/60/24 ) 
group by inst_id, event 
order by 3 desc 
/ 
INST_ID EVENT COUNT(*) 
------- ------------------------------ ---------- 
3 4442 
1 3956 
3 db file sequential read 3646 
2 3091 
4 2934 
1 db file sequential read 1541 
3 gc buffer busy 1503 
2 db file sequential read 1365 
4 db file sequential read 1230
ATT June 2010 
Riyaj Shamsudeen 22 
Interconnects 
 RAC communicates with other instances through private 
interconnect. 
 Gv$cluster_interconnects parameter will show all interconnects. 
1* select * from gv$cluster_interconnects 
INST_ID NAME IP_ADDRESS IS_ SOURCE 
------- --------------- ---------------- --- 
------------------------------- 
1 ce2 172.29.1.11 NO cluster_interconnects 
parameter 
1 ce3 172.29.1.12 NO cluster_interconnects 
parameter 
1 ce13 172.29.1.13 NO cluster_interconnects 
parameter 
1 ce15 172.29.1.14 NO cluster_interconnects 
parameter 
4 ce2 172.29.1.41 NO cluster_interconnects 
parameter 
4 ce3 172.29.1.42 NO cluster_interconnects 
parameter 
... 
 To check if an interconnect is reachable or not, use ping. First one 
is source, in this case ce2, target is node 4 IP address. 
/usr/sbin/ping -s -U -i ce2 172.29.1.41 1 10

Weitere ähnliche Inhalte

Was ist angesagt?

了解Oracle rac brain split resolution
了解Oracle rac brain split resolution了解Oracle rac brain split resolution
了解Oracle rac brain split resolution
maclean liu
 
你所不知道的Oracle后台进程Smon功能
你所不知道的Oracle后台进程Smon功能你所不知道的Oracle后台进程Smon功能
你所不知道的Oracle后台进程Smon功能
maclean liu
 
oracle cloud with 2 nodes processing
oracle cloud with 2 nodes processingoracle cloud with 2 nodes processing
oracle cloud with 2 nodes processing
mahdi ahmadi
 
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
maclean liu
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction Locks
Kyle Hailey
 

Was ist angesagt? (20)

Rac 12c optimization
Rac 12c optimizationRac 12c optimization
Rac 12c optimization
 
A kind and gentle introducton to rac
A kind and gentle introducton to racA kind and gentle introducton to rac
A kind and gentle introducton to rac
 
Deep review of LMS process
Deep review of LMS processDeep review of LMS process
Deep review of LMS process
 
Advanced rac troubleshooting
Advanced rac troubleshootingAdvanced rac troubleshooting
Advanced rac troubleshooting
 
Demystifying cost based optimization
Demystifying cost based optimizationDemystifying cost based optimization
Demystifying cost based optimization
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineers
 
Redo internals ppt
Redo internals pptRedo internals ppt
Redo internals ppt
 
Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010Riyaj: why optimizer_hates_my_sql_2010
Riyaj: why optimizer_hates_my_sql_2010
 
Introduction to Parallel Execution
Introduction to Parallel ExecutionIntroduction to Parallel Execution
Introduction to Parallel Execution
 
了解Oracle rac brain split resolution
了解Oracle rac brain split resolution了解Oracle rac brain split resolution
了解Oracle rac brain split resolution
 
Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)Tracing Parallel Execution (UKOUG 2006)
Tracing Parallel Execution (UKOUG 2006)
 
你所不知道的Oracle后台进程Smon功能
你所不知道的Oracle后台进程Smon功能你所不知道的Oracle后台进程Smon功能
你所不知道的Oracle后台进程Smon功能
 
oracle cloud with 2 nodes processing
oracle cloud with 2 nodes processingoracle cloud with 2 nodes processing
oracle cloud with 2 nodes processing
 
How Many Slaves (Ukoug)
How Many Slaves (Ukoug)How Many Slaves (Ukoug)
How Many Slaves (Ukoug)
 
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
【Maclean liu技术分享】拨开oracle cbo优化器迷雾,探究histogram直方图之秘 0321
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developers
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction Locks
 

Ähnlich wie Rac introduction

Perf stat windows
Perf stat windowsPerf stat windows
Perf stat windows
Accenture
 
Tim eberhard bajug3_talk
Tim eberhard bajug3_talkTim eberhard bajug3_talk
Tim eberhard bajug3_talk
Tim Eberhard
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
webhostingguy
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
webhostingguy
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
archwisp
 

Ähnlich wie Rac introduction (20)

Perf stat windows
Perf stat windowsPerf stat windows
Perf stat windows
 
Sge
SgeSge
Sge
 
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
 
Troubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issuesTroubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issues
 
RAC.docx
RAC.docxRAC.docx
RAC.docx
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]
 
Open Source Systems Performance
Open Source Systems PerformanceOpen Source Systems Performance
Open Source Systems Performance
 
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And TricksCloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
 
How to Shutdown Netapp Cluster Mode Storage System with Multi-Node Cluster (6...
How to Shutdown Netapp Cluster Mode Storage System with Multi-Node Cluster (6...How to Shutdown Netapp Cluster Mode Storage System with Multi-Node Cluster (6...
How to Shutdown Netapp Cluster Mode Storage System with Multi-Node Cluster (6...
 
Tim eberhard bajug3_talk
Tim eberhard bajug3_talkTim eberhard bajug3_talk
Tim eberhard bajug3_talk
 
Backtrack Manual Part6
Backtrack Manual Part6Backtrack Manual Part6
Backtrack Manual Part6
 
Positive Hack Days. Pavlov. Network Infrastructure Security Assessment
Positive Hack Days. Pavlov. Network Infrastructure Security AssessmentPositive Hack Days. Pavlov. Network Infrastructure Security Assessment
Positive Hack Days. Pavlov. Network Infrastructure Security Assessment
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
 
An introduction to_rac_system_test_planning_methods
An introduction to_rac_system_test_planning_methodsAn introduction to_rac_system_test_planning_methods
An introduction to_rac_system_test_planning_methods
 
les09.pdf
les09.pdfles09.pdf
les09.pdf
 
Multiple instances on linux
Multiple instances on linuxMultiple instances on linux
Multiple instances on linux
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0
 
Pdn multipath io-pvm-ver1.0.0
Pdn multipath io-pvm-ver1.0.0Pdn multipath io-pvm-ver1.0.0
Pdn multipath io-pvm-ver1.0.0
 

Kürzlich hochgeladen

CYTOTEC DUBAI ☎️ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
CYTOTEC DUBAI ☎️ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...CYTOTEC DUBAI ☎️ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
CYTOTEC DUBAI ☎️ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
Abortion pills in Riyadh +966572737505 get cytotec
 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
Casey Keith
 
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
Apsara Of India
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
 

Kürzlich hochgeladen (20)

Bhubaneswar Call Girls 8250077686 Service Offer VIP Hot Model
Bhubaneswar Call Girls 8250077686 Service Offer VIP Hot ModelBhubaneswar Call Girls 8250077686 Service Offer VIP Hot Model
Bhubaneswar Call Girls 8250077686 Service Offer VIP Hot Model
 
Genuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Visakhapatnam Escorts call Girls
 
Are Vatican Museum Tickets and Private Tours Worth It
Are Vatican Museum Tickets and Private Tours Worth ItAre Vatican Museum Tickets and Private Tours Worth It
Are Vatican Museum Tickets and Private Tours Worth It
 
CYTOTEC DUBAI ☎️ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
CYTOTEC DUBAI ☎️ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...CYTOTEC DUBAI ☎️ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
CYTOTEC DUBAI ☎️ +966572737505 } Abortion pills in Abu dhabi,get misoprostal ...
 
Tamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRL
Tamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRLTamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRL
Tamluk ❤CALL GIRL 8617697112 ❤CALL GIRLS IN Tamluk ESCORT SERVICE❤CALL GIRL
 
Top travel agency in panchkula - Best travel agents in panchkula
Top  travel agency in panchkula - Best travel agents in panchkulaTop  travel agency in panchkula - Best travel agents in panchkula
Top travel agency in panchkula - Best travel agents in panchkula
 
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Diu Escorts call Girls
 
Mathura Call Girls 8250077686 Service Offer VIP Hot Model
Mathura Call Girls 8250077686 Service Offer VIP Hot ModelMathura Call Girls 8250077686 Service Offer VIP Hot Model
Mathura Call Girls 8250077686 Service Offer VIP Hot Model
 
Hire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
Hire 💕 8617697112 Chamba Call Girls Service Call Girls AgencyHire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
Hire 💕 8617697112 Chamba Call Girls Service Call Girls Agency
 
VIP Vapi Call Girls 📞 8617697112 Vapi Call Girls
VIP Vapi Call Girls 📞 8617697112 Vapi Call GirlsVIP Vapi Call Girls 📞 8617697112 Vapi Call Girls
VIP Vapi Call Girls 📞 8617697112 Vapi Call Girls
 
WhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room package
WhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room packageWhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room package
WhatsApp Chat: 📞 8617697112 Suri Call Girls available for hotel room package
 
Darjeeling Call Girls 8250077686 Service Offer VIP Hot Model
Darjeeling Call Girls 8250077686 Service Offer VIP Hot ModelDarjeeling Call Girls 8250077686 Service Offer VIP Hot Model
Darjeeling Call Girls 8250077686 Service Offer VIP Hot Model
 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
 
Ooty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment BookingOoty call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ooty call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
🔥HOT🔥📲9602870969🔥Prostitute Service in Udaipur Call Girls in City Palace Lake...
 
Night 7k to 12k Lahaul and Spiti Call Girls 👉👉 8617697112⭐⭐ 100% Genuine Esco...
Night 7k to 12k Lahaul and Spiti Call Girls 👉👉 8617697112⭐⭐ 100% Genuine Esco...Night 7k to 12k Lahaul and Spiti Call Girls 👉👉 8617697112⭐⭐ 100% Genuine Esco...
Night 7k to 12k Lahaul and Spiti Call Girls 👉👉 8617697112⭐⭐ 100% Genuine Esco...
 
Jhargram call girls 📞 8617697112 At Low Cost Cash Payment Booking
Jhargram call girls 📞 8617697112 At Low Cost Cash Payment BookingJhargram call girls 📞 8617697112 At Low Cost Cash Payment Booking
Jhargram call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
Top places to visit, top tourist destinations
Top places to visit, top tourist destinationsTop places to visit, top tourist destinations
Top places to visit, top tourist destinations
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Genuine 8250077686 Hot and Beautiful 💕 Hosur Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Hosur Escorts call GirlsGenuine 8250077686 Hot and Beautiful 💕 Hosur Escorts call Girls
Genuine 8250077686 Hot and Beautiful 💕 Hosur Escorts call Girls
 

Rac introduction

  • 1. RAC introduction By Riyaj Shamsudeen
  • 2. ATT June 2010 Riyaj Shamsudeen 2 Basic RAC  One database, multiple instances. Shared everything architecture.  All of the following must be in cluster file system or ASM storage.  Database files  Online redo log files  Undo tablespace  Temp tablespace  It is a good practice to keep archived log files and spfile in the CFS or ASM, but not technically necessary.
  • 3. UNDO and REDO  Every instance masters its own undo tablespace.  Each instance has its own redo thread or set of online redo log files.  Undo segment blocks are accessed by other instances during normal operations.  Redo log files of other threads accessed only during instance recovery. ATT June 2010 Riyaj Shamsudeen 3
  • 4. ATT June 2010 Riyaj Shamsudeen 4 DB Startup  You should try to use srvctl commands to perform instance and nodeapps operations.  While this can be performed at CRS level, you probably should not use that as a first measure.  Startup srvctl start database –d PERF  Syntax is srvctl start database -d db_unique_name [-o start_options] [-c connect_str | -q]
  • 5. ATT June 2010 Riyaj Shamsudeen 5 Instance Startup  Instances individually can be started too.  Instance Startup srvctl start instance –d PERF –i PERF1,PERF2  Syntax is srvctl start instance -d db_unique_name -i inst_name_list [-o start_options] [-c connect_str | -q]
  • 6. ATT June 2010 Riyaj Shamsudeen 6 Config  You can see all instances in the cluster using config option.  Instances $ srvctl config database -d PERF wsqfinc1a PERF1 /opt/app/dtperf/perfdb/10.2 wsqfinc2a PERF2 /opt/app/dtperf/perfdb/10.2 wsqfinc3a PERF3 /opt/app/dtperf/perfdb/10.2 wsqfinc3e PERF4 /opt/app/dtperf/perfdb/10.2  Syntax is srvctl config database [-d db_unique_name [-a] [-t]]
  • 7. ATT June 2010 Riyaj Shamsudeen 7 Listeners  You can see configured listeners using config option  Listeners. Listener name and node that listener is currently located. PERF is the listener name. $ srvctl config listener -n wsqfinc1a wsqfinc1a PERF  Starting listener. All configured listeners will be started with this command. srvctl start listener –n wsqfinc1a  Individual listeners srvctl start listener –n wsqfinc1a –l PERF, PERF_99
  • 8. ATT June 2010 Riyaj Shamsudeen 8 What is VIP?  VIP stands for Virtual IP address.  An IP address that can be floated to a different server, if needed.  Listeners need to listen on Virtual IP address. In the output below, IP address 10.85.24.38 is plumbed to the device ce11.  Ce11 also has another NOFAILOVER address which is physical (Not virtual). /sbin/ifconfig –a … ce11: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 2 inet 10.85.24.24 netmask fffffe00 broadcast 10.85.25.255 groupname wsqvcs81_multinicB … ce11:2: flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2 inet 10.85.24.38 netmask fffffe00 broadcast 10.85.25.255
  • 9. Why do we need VIP?  Let’s say that listener is listening on physical IP address. If the server goes down then the IP address will not respond.  So, new connections from the application, will send the packet to ethernet and must wait for tcp_time_out seconds before trying next instance.  This means that new connection requests will wait for 6 minutes and can timeout.  If we use virtual IP address for the listener, then CRS will relocate the virtual IP address to a surviving server. New connection to that IP address will immediately get a response and try next entry in the connect string. ATT June 2010 Riyaj Shamsudeen 9
  • 10. ATT June 2010 Riyaj Shamsudeen 10 Shutdown  Shutting down database (all instances) uses srvctl commands. srvctl stop database –d PERF –o immediate  Shutting down individual instances srvctl stop instance –d PERF –i PERF1 –o immediate  Stopping listeners srvctl stop listener –n wsqfinc1a srvctl stop listener –n wsqfinc1a –l PERF
  • 11. ATT June 2010 Riyaj Shamsudeen 11 CRS/CSS  CRS and CSS daemons are clusterware daemons. They monitor the health of the cluster and resources.  How to check if clusterware is running? Following daemons need to be running. Following daemons need to be running. ps -ef |grep d.bin root 21955 1 0 May 22 ? 0:00 /opt/app/dtperf/oracrs/product/crs/bin/oclskd.bin oracrs 21409 21264 0 May 22 ? 418:50 /opt/app/dtperf/oracrs/product/crs/bin/ocssd.bin oracrs 21073 4384 0 May 22 ? 11:07 /opt/app/dtperf/oracrs/product/crs/bin/evmd.bin root 21556 4386 0 May 22 ? 587:56 /opt/app/dtperf/oracrs/product/crs/bin/crsd.bin reboot  To check health of CRS, from CRS owner userid crsctl check crs Cluster Synchronization Services appears healthy Cluster Ready Services appears healthy Event Manager appears healthy
  • 12. ATT June 2010 Riyaj Shamsudeen 12 Resources  CRS manages the resources such as database, listeners and VIPs etc.  Crs_stat shows the resources. crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora....F1.inst application 0/5 0/0 ONLINE ONLINE wsqfinc1a ora....F2.inst application 0/5 0/0 ONLINE ONLINE wsqfinc2a ora....F3.inst application 0/5 0/0 ONLINE ONLINE wsqfinc3a ora....F4.inst application 0/5 0/0 ONLINE ONLINE wsqfinc3e ora.PERF.db application 0/0 0/1 ONLINE ONLINE wsqfinc1a ora....RF.lsnr application 1/5 0/0 ONLINE ONLINE wsqfinc1a ora....c1a.gsd application 4/5 0/0 ONLINE ONLINE wsqfinc1a ...
  • 13. ATT June 2010 Riyaj Shamsudeen 13 Resource details  You can look at the resources in detail too $crs_stat ora.wsqfinc2a.vip –v NAME=ora.wsqfinc2a.vip TYPE=application RESTART_ATTEMPTS=0 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on wsqfinc2a  Target is specifying what the state should be.  State is indicating the current state and current server the resource is located.
  • 14. crs_stop/crs_start  All resources can be started from CRS. But, you generally do not want to do this: $crs_start –all  Individual resources can be started crs_start ora.wsqfinc2a.PERF.lsnr  Individual or All resources can be stopped too. crs_stop ora.wsqfinc2a.PERF.lsnr Crs_stop -all ATT June 2010 Riyaj Shamsudeen 14
  • 15. ATT June 2010 Riyaj Shamsudeen 15 CRS stack  Whole CRS stack can be stopped. Crsctl stop crs  But, generally, this needs root permissions Sudo –u root crsctl stop crs  All resources can be stopped by crsctl too Crsctl stop resources  If you are not sure syntax, just type crsctl and enter. Complete syntax displayed.
  • 16. ATT June 2010 Riyaj Shamsudeen 16 Voting disks  Voting disks are for disk heart beat between the nodes. You can see voting disks with crsctl command. $ crsctl query css votedisk 0. 0 /opt/app/wsqvcs81/VOTE/votedisk.dbf Located 1 voting disk(s).  You should probably create multiple voting disks.  If the CRS detects that other nodes stopped updating voting disks, it can kill failed nodes and remove from the cluster.
  • 17. ATT June 2010 Riyaj Shamsudeen 17 OCR  OCR is Oracle Cluster Registry, almost like Windows registry.  Various details about the cluster is stored in the OCR.  Unfortunately, OCR gets corrupted quite easily. So, have a good backup strategy for OCR.  CRS backup up OCR every 4 hours. ocrconfig -showbackup wsqfinc3e 2010/06/10 10:27:19 /opt/app/dtperf/oracrs/product/crs/cdata/wsqvcs81/ backup00.ocr wsqfinc3e 2010/06/10 06:27:18 /opt/app/dtperf/oracrs/product/crs/cdata/wsqvcs81/ backup01.ocr wsqfinc3e 2010/06/10 02:27:18 /opt/app/dtperf/oracrs/product/crs/cdata/wsqvcs81/ backup02.ocr
  • 18. ATT June 2010 Riyaj Shamsudeen 18 CRS log files  In case of CRS issues, read CRS log files.  Log file locations are: $ORA_CRS_HOME/log/<nodename> /opt/app/dtperf/oracrs/product/crs/log/wsqfinc1a/  Alert log is important. CRS equivalent of DB alert log. alertwsqfinc1a.log  Other logs are in the respective directory. For example, crs log file in PERF is in /opt/app/dtperf/oracrs/product/crs/log/wsqfinc1a/crsd/crsd.log
  • 19. Resolving hung issues  One or more RAC instances can go in to an hang state.  Always, first identify whether it is one instance in trouble or all instances are in trouble. 1* select inst_id, instance_name from gv$instance order by inst_id INST_ID INSTANCE_NAME ------- ---------------- ATT June 2010 Riyaj Shamsudeen 19 1 PERF1 2 PERF2 ..  If the above statement is hung, then it is quite possible that we lost communication to one instance.  Avoid one instance myopia. Read alert log from all nodes.
  • 20. Use AWR reports  To resolve issues, AWR reports are quite handy. Use my scripts to create AWR reports from all nodes. @awrrpt_all_gen.sql -- To create recent text AWR report for all nodes @awrrpt_all_range_gen.sql -- To create recent text AWR report for a range ATT June 2010 Riyaj Shamsudeen 20 you can specify.  If there was no issues 30 minutes ago (assuming 30 min awr duration), AWR might not show any issues.
  • 21. ATT June 2010 Riyaj Shamsudeen 21 Use ASH too  Following query will tell you where the problem might be, if there is an instance wide hang. This is just an indicator of the problem, not necessarily a problem itself. select inst_id, event, count(*) from gv$active_session_history where sample_time > sysdate -( 5/60/24 ) group by inst_id, event order by 3 desc / INST_ID EVENT COUNT(*) ------- ------------------------------ ---------- 3 4442 1 3956 3 db file sequential read 3646 2 3091 4 2934 1 db file sequential read 1541 3 gc buffer busy 1503 2 db file sequential read 1365 4 db file sequential read 1230
  • 22. ATT June 2010 Riyaj Shamsudeen 22 Interconnects  RAC communicates with other instances through private interconnect.  Gv$cluster_interconnects parameter will show all interconnects. 1* select * from gv$cluster_interconnects INST_ID NAME IP_ADDRESS IS_ SOURCE ------- --------------- ---------------- --- ------------------------------- 1 ce2 172.29.1.11 NO cluster_interconnects parameter 1 ce3 172.29.1.12 NO cluster_interconnects parameter 1 ce13 172.29.1.13 NO cluster_interconnects parameter 1 ce15 172.29.1.14 NO cluster_interconnects parameter 4 ce2 172.29.1.41 NO cluster_interconnects parameter 4 ce3 172.29.1.42 NO cluster_interconnects parameter ...  To check if an interconnect is reachable or not, use ping. First one is source, in this case ce2, target is node 4 IP address. /usr/sbin/ping -s -U -i ce2 172.29.1.41 1 10