SlideShare uma empresa Scribd logo
1 de 61
Baixar para ler offline
Right Availability in RAC environment
          Playing with Oracle clusterware infrastructure components




SPREKER     : Jos van den Oord
E-MAIL      : Jos.van.den.Oord@transfer-solutions.com
DATUM       : 29 juni 2011
                                             WWW.TRANSFER-SOLUTIONS.COM
Who am I

           Jos van den Oord
                 Working with Oracle products since 1998
                 Working at Transfer-Solutions since 2010
           Interests
                 Databases
                       Right Availability
                       Security, Performance
           Blog : joordsblog.vandenoord.eu
           Email : jos.van.den.oord@transfer-solutions.com


© COPYRIGHT TRANSFER SOLUTIONS B.V.                          3
Agenda

           The RAC environment
           Right Availability for an application concept
           Configuration HP Data Protector on cluster
           Create Right Availability application on cluster
           Scheduling methods on RAC
           SCAN listener configurations
           Votingdisk problem on ASM
           ASM spfile - ASM mirroring


© COPYRIGHT TRANSFER SOLUTIONS B.V.                           4
The RAC environment

                      Public LAN                                    Backend LAN

                            joords-01    joords-02      joords-03   joords-04

                                          Oracle RDBMS 11gR2
       oracle                             Oracle RDBMS 10gR2
                                        Oracle RDBMS 10gR2 EBS

        grid                            Oracle Clusterware 11gR2
                                      DC 1                     DC 2
                                             ASM with ACFS
                                              ASM Mirroring



© COPYRIGHT TRANSFER SOLUTIONS B.V.                                               5
High Availability for an application
      concept
           Point of interest
                 Objectives
                 Framework clusterware architecture
                 What is needed
                 Clusterware options
                 Clusterware resources
                 Action Script
                 Clusterware framework
                 Summary



© COPYRIGHT TRANSFER SOLUTIONS B.V.                   6
High Availability for an application
      concept
           Objectives
                 Restart on application failure
                 Relocate on node failure
                 Uses Oracle Clusterware
                 Brings the same level of protection for Application
                 components as Oracle‟s database components
                 benefits from.




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                    7
High Availability for an application
      concept
           Framework clusterware architecture
           RESOURCES




                                                              ACTION
                                                              SCRIPT
                       RESOURCES              ACTION SCRIPT


                                      AGENT
          RESOURCE




                                                              REGISTRA-
                       RESOURCE
            TYPE




                                                                TION
                                              REGISTRATION
                         TYPE




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                       8
High Availability for an application
      concept
           What is needed
                 Network Location
                       Clients need a node independent way of connecting to an
                       Application
                 Configuration Files
                       Applications typically need configuration files stored on
                       shared file system
                 Dependencies
                       Applications depend on these configuration files.
                       They also depend on the location independent network.
                       Or they can depend form other application resources.



© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                9
High Availability for an application
      concept
           Clusterware options
                   Application HA Framework
                       Extends Oracle Clusterware Right Availability protection to
                       your application
                 Oracle HA API
                       Interface to allow you to change, at run time, how Oracle
                       Clusterware manages your application
                 VIP resource
                       Provides Application VIP‟s
                 ACFS or OCFS
                       Provides a common location for files visible across all nodes


© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                    10
High Availability for an application
      concept
           Clusterware resources
                 A resource is an Oracle Clusterware managed
                 application
                 Profile Attributes for the resource are stored in the
                 Oracle Cluster Registry
                 Oracle RAC Database is made up from a series of
                 resources
                 Other applications can be treated as resources
                 The API (C code – A control language)
                       Register, unregister, query, start, stop resources
                       Control their behavior from a program

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                         11
High Availability for an application
      concept
           Action Script
                 Must be able to accept 5 parameter values called
                 Entry Points: start, stop, check, clean and abort
             case $1 in
             'start')
                  # start the application and check status
             'stop')
                  # stop the application
             „clean')
                  # kill application and cleanup
             „check')
                  # validate the status of the application
             esac

                 An Control Agent resource

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                  12
High Availability for an application
      concept
           Clusterware framework
                 Contains the application modelling logic
                 Invokes the application aware agents, performs
                 resource recovery
                       When a node goes down, the framework recovers the
                       application by relocating it to a live node
                 Hosts in the OCR cache




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                        13
High Availability for an application
      concept
           Possible Resource States
                        State                        Description                            Action

                 ONLINE               The resource is running                       -

                 OFFLINE              The resource is NOT running                   -

                 UNKNOWN              An attempt to stop the resource has           crsctl stop resource
                                      failed. Oracle Clusterware does not           command
                                      actively monitor resources that are in this
                                      state.                                        crsctl start resource
                                                                                    command


                 INTERMEDIATE         1: Oracle Clusterware cannot determine        crsctl stop resource
                                      the state                                     command

                                      2: Resource is not functional                 crsctl start resource
                                      (Database [no]mount status)                   command




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                                         14
High Availability for an application
      concept
           Summary
                 Oracle Clusterware
                       Brings Protection to 3rd Party Applications
                       Restart / Relocate
                 Virtual IP‟s
                       Used by clients to locate application irrespective of location
                       Relocate with the Application as a „package‟
                 Protection
                       Brings the same level of protection Oracle provides to it‟s
                       own processes to 3rd Party Applications




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                     15
Configuration HP Data Protector

           Point of interest
                 Application virtual IP for the Oracle cluster
                 Using the backend network configuration
                 Using DB Services
                 Central Oracle password file for DB‟s




© COPYRIGHT TRANSFER SOLUTIONS B.V.                              16
Configuration HP Data Protector
                                           HP Data Protector



                                               Hostname



        Node 1                        Node 2         Node 3    Node 4




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                     17
Configuration HP Data Protector
                                           HP Data Protector



                                                Hostname



        Node 1                        Node 2         Node 3    Node 4
                    Application VIP cluster
                                               VIP




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                     18
Configuration HP Data Protector
                                           HP Data Protector



                                               Hostname



        Node 1                        Node 2         Node 3    Node 4
                    Application VIP cluster
                                                                        VIP




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                           19
Configuration HP Data Protector

           VIP resources existed since Oracle Database
           10gR1
                 Only used to failover the VIP to another node so that
                 a client got an „instant‟ NAK returned when it tried to
                 connect to the Virtual IP. They still exist and operate
                 in the same way in higher Releases.




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                        20
Configuration HP Data Protector

           Application VIPs
                 New resource in Oracle Database since 10gR2
                 Created as functional VIPs which can be used to
                 connect to an application regardless of the node it is
                 running on
                 VIP is a dependent resource of the user registered
                 application
                 There can be many VIPs, only one VIP is allowed per
                 User Application




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                       21
Configuration HP Data Protector

           Validation Cluster Network
                 crsctl stat res -p |grep -ie .network -ie subnet |grep -ie name -ie
                 subnet
           Add application VIP on Backend Network
                 srvctl add vip -n joords_01 -k 2 -A
                 172.30.4.80/255.255.252.0/bond0
           Create joords_vip_bk in OCR
                 appvipcfg create -network=2 -ip=172.30.4.80 -
                 vipname=joords_vip_bk -user=root
           Validation Cluster Registration
                 crsctl stat res joords_vip_bk –p

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                    22
Configuration HP Data Protector

           Validation Cluster Network
         [root@joords1 ~]# crsctl stat res joords_vip_bk –p
            Sample output is: res -p |grep -ie .network -ie subnet |grep -ie name
              crsctl stat
         NAME=joords_vip_bk
                                                                                    -ie
            NAME=ora.net1.network
              subnet
         TYPE=app.appvip.type
            USR_ORA_SUBNET=133.22.67.0
         ACL=owner:root:rwx,pgrp:root:r-x,other::r--,user:root:r-x
           Add application VIP on Backend Network
         ACTIVE_PLACEMENT=0
         AGENT_FILENAME=%CRS_HOME%/bin/orarootagent%CRS_EXE_SUFFIX%
         AUTO_START=restore -n joords_01 -k 2 -A
            Sample output is: vip
              srvctl add
            NAME=ora.net2.network
         CARDINALITY=1
              172.30.4.80/255.255.252.0/bond0
            USR_ORA_SUBNET=172.30.4.0
         CHECK_INTERVAL=1
         DEGREE=1
           Create joords_vip_bk in OCR
         DESCRIPTION=hp_dataprotect HA Application VIP
         RESTART_ATTEMPTS=0
                 appvipcfg create -network=2 -ip=172.30.4.80 -
         SCRIPT_TIMEOUT=60
         SERVER_POOLS=*
                 vipname=joords_vip_bk -user=root
         START_DEPENDENCIES=hard(ora.net2.network) pullup(ora.net2.network)
         STOP_DEPENDENCIES=hard(ora.net2.network)
           Validation Cluster Registration
         USR_ORA_VIP=172.30.4.80
         VERSION=11.2.0.1.0
                 crsctl stat res joords_vip_bk –p

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                       23
Configuration HP Data Protector

           Grant to grid os user
                 crsctl setperm resource joords_vip_bk -u user:grid:r-x
           Validate as GRID user
                 crsctl status resource joords_vip_bk -t
                 ping –c4 joords_vip_bk
                 crsctl relocate resource joords_vip_bk [–n node 1,2,3,4]
                 ping –c4 joords_vip_bk
                 ssh connection test joords_vip_bk
                 ifconfig -a




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                         24
Configuration HP Data Protector

           Working with Services
                 Register DB services with srvctl
           Create RMAN user with sysdba
                 Connection error with RMAN as sysdba using Oracle
                 service
                 Using symbolic links to a central password file,
                 Problem solved.
                 Grant sysdba to RMAN, execute only once




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                  25
Create HA application on Clusterware

           Example “Apache Tomcat”
                 The action script
                 The action script has dependencies with the VIP
                 The Cluster registration statement
                 Managing Apache Tomcat Application




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                26
Create HA application on Clusterware

           Example “Apache Tomcat”
                 The action script
               case $1 in
               'start')
                 The action script has dependencies with the VIP
                    $APACHE_TOMCAT_HOME/bin/startup.sh ; RET=$?
                 ;;
                 The Cluster registration statement
               'stop')
                    $APACHE_TOMCAT_HOME/bin/shutdown.sh ; RET=$?
                 Managing Apache Tomcat Application
                 ;;
               'clean')
                    $APACHE_TOMCAT_HOME/bin/shutdown.sh ; RET=$?
                 ;;
               'check')
                    # download a simple, small image from the http server
                    $APACHE_TOMCAT/usr/bin/wget -q --delete-after $CHECKURL
               ; RET=$?
               …




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                           27
Create HA application on Clusterware

           Dependencies and cluster registration
                 Depending on the resource of an Application VIP
                 Other resource dependencies.
                 Registration by configuration file or command line




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                   28
Create HA application on Clusterware

           Dependencies and cluster registration
                 Using a configuration file
             [root@joords-01 ]# $GRID_HOME/bin/crsctl add resource tomcat
             / -type cluster_resource /
             -file /mnt/acfs/oracle/grid/tomcat.config

             File : tomcat.config
             ACTION_SCRIPT=/mnt/acfs/oracle/grid/tomcat.scr
             PLACEMENT=restricted
             RESTRART_ATTEMP=2
             HOSTING_MEMBERS=joords-01 joords-02 joords-03 joords-04
             CHECK_INTERVAL=30
             START_DEPENDENCIES='hard(httpd-vip), pullup(httpd-vip)‟
             STOP_DEPENDENCIES='hard(httpd-vip)'“
             DESCRIPTION=“Apache Tomcat HA Application”



© COPYRIGHT TRANSFER SOLUTIONS B.V.                                         29
Create HA application on Clusterware

           Dependencies and cluster registration
                 The command line
             [root@joords-01 ] # $GRID_HOME/bin/crsctl add resource
             tomcat /
             / -type cluster_resource /
             -attr "ACTION_SCRIPT= =/mnt/acfs/oracle/grid/tomcat.scr,
             CHECK_INTERVAL=30, START_DEPENDENCIES='hard(httpd-vip)
             pullup(httpd-vip)', STOP_DEPENDENCIES='hard(http-vip) ',
             HOSTING_MEMBERS= joords-01 joords-02 joords-03 joords-04"




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                      30
Create HA application on Clusterware

           Dependencies and cluster registration
                 crsctl status resource tomcat -p
             NAME=tomcat
             TYPE=cluster_resource
             …
             ACTION_SCRIPT= /mnt/acfs/oracle/grid/tomcat.scr
             AGENT_FILENAME=%CRS_HOME%/bin/scriptagent
             AUTO_START=restore
             CARDINALITY=1
             …
             HOSTING_MEMBERS=joords=01 joords=02 joords-03 joords-04
             ..
             START_DEPENDENCIES=hard(httpd-vip) pullup(httpd-vip)
             STOP_DEPENDENCIES=hard(httpd-vip)
             …



© COPYRIGHT TRANSFER SOLUTIONS B.V.                                    31
Create HA application on Clusterware

           Managing the Application
             [oracle@joord-01 ]# start resource tomcat

             [oracle@joord-01 ]# crsctl status resource tomcat
                    NAME=tomcat
                    TYPE=cluster_resource
                    TARGET=ONLINE
                    STATE=ONLINE on joords-01


             [oracle@joord-01 ]# $ crsctl relocate resource tomcat
                    CRS-2673: Attempting to stop „tomcat' on „joords-01'
                    CRS-2677: Stop of ' tomcat ' on „joord-01' succeeded
                    CRS-2673: Attempting to stop ' tomcat ' on „joords-01'
                    CRS-2677: Stop of „tomcat ' on „joord-01' succeeded
                    CRS-2672: Attempting to start ' tomcat ' on „joords-02'
                    CRS-2676: Start of „tomcat' on „joord-02' succeeded
                    CRS-2672: Attempting to start „tomcat' on „joords-02'
                    CRS-2676: Start of „tomcat on „joords-02' succeeded


             [oracle@joord-01 ]# $ crsctl stop resource tomcat


© COPYRIGHT TRANSFER SOLUTIONS B.V.                                           32
Scheduling methods on RAC

           Point of interest
                 Crontabs, or windows tasks
                 DBMS_JOB
                 DBMS_SCHEDULER




© COPYRIGHT TRANSFER SOLUTIONS B.V.           33
Scheduling methods on RAC

           Crontab, or window tasks
                 All crontabs are the same on every node
                 Create an actieve/passive node activity
                 Using an action script with cluster resource
                 Add validation “active node” to the scripting
                       Active node then “DO YOUR THING” else “EXIT”
           Result:
                 HA scheduling, default shell scripts




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                   34
Scheduling methods on RAC

           Crontab, or window tasks example
                 Action script : crontab_check.sh
               #!/bin/bash
               export M_NAME=/oravar/grid/joords_cron/crontab_check.sh
               export GRID_OWNER=grid
               export CRS_HOME=/software/oracle/11.2.0.2/bin
               case $1 in
               'start')
                        hostname -a > ${M_NAME};       RET=0
                        ;;
               'stop')
                        echo "STOP" > ${M_NAME};      RET=0
                        ;;
               'check')
                       M_VALUE=`cat ${M_NAME}`;     NDEF=`grep -c ${M_VALUE}
               ${CRS_HOME}/olsnodes`
                          if [ $NDEF -eq 1 ] ; then ; RET=0 ; else ; RET=1 ;fi
                       ;;
               esac
               if [ $RET -eq 0 ]; then ; exit 0 ; else ; exit 1 ;fi




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                              35
Scheduling methods on RAC

           Crontab, or window tasks example
                 Action configuration file : crontab_check.config
               PLACEMENT=restricted
               HOSTING_MEMBERS=joords-01 joords-02 joords-03 joords-04
               CHECK_INTERVAL=30
               CARDINALITY=1
               ACTIVE_PLACEMENT=0
               AUTO_START=always
               DEGREE=1
               DESCRIPTION="Cron active node resource"
               RESTART_ATTEMPTS=1
               ACTION_SCRIPT=/oravar/grid/joords_cron/crontab_check.sh




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                      36
Scheduling methods on RAC

           Crontab, or window tasks example
                 Registration
               [root@joords-01 ]# crsctl add resource CRONTAB_CHECK /
               –type cluster_resource




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                     37
Scheduling methods on RAC

           DBMS_JOB
                 Supports multi-instance execution of jobs
                 NOT instance aware, Node affinity
                       EXECUTE DBMS_JOB.INSTANCE(job=>123, instance=>1);
                       No instance parameter, default instance where job is created
                       Node affinity also with Advanced Queuing

           Result:
                 A scheduling method, actions by node failure




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                   38
Scheduling methods on RAC

           DBMS_SCHEDULER
                 Fully instance aware
                 Distribute your workload on services, instances
                 Need Job classes
                       Control the usage of resources through the resource
                       consumer groups
                       Managing on services
                              Transparant Application Failover

           Result:
                 HA scheduling method with load-balancing and node
                 failover functionality

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                          39
Scheduling methods on RAC

           DBMS_SCHEDULER
                 Overview
                                         Resource         Resource              Window
                                         Consumer Group   plan                  group




                                           Job class                 Window




                              Program          Job                   Schedule



                             Arguments        Arguments




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                      40
Scheduling methods on RAC

           DBMS_SCHEDULER
                 Overview


                      Resource
                                                     Logging   Log
                      Consumer
                      Group
                                      Service        Level     History




                                         Job Class




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                      41
Scheduling methods on RAC

           DBMS_SCHEDULER
                 Create the services
               The Services : OLTP_SERVICE,    BATCH_SERVICE,   REPORT_SERVICE

               [oracle@joords-01 ]# srvctl add service -d ORCL-s OLTP_SERVICE    -r ORCL1,
               ORCL2 -a ORCL3
               [oracle@joords-01 ]# srvctl add service -d ORCL-s BATCH_SERVICE   -r ORCL3
               -a ORCL1,ORCL2
               [oracle@joords-01 ]# srvctl add service -d ORCL -s REPORT_SERVICE -r ORCL3
               -a ORCL1,ORCL2

               [oracle@joords-01 ]# srvctl status service -d ORCL
               Service OLTP_SERVICE   is running on instance(s) ORCL1 ORCL2
               Service BATCH_SERVICE is running on instance(s) ORCL3
               Service REPORT_SERVICE is running on instance(s) ORCL3

               [oracle@joords-01 ]#   srvctl config service -d ORCL
               OLTP_SERVICE PREF :    ORCL1 ORCL2 AVAIL: ORCL3
               BATCH_SERVICE PREF :   ORCL3 AVAIL: ORCL1 ORCL2
               REPORT_SERVICE PREF:   ORCL3 AVAIL: ORCL1 ORCL2




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                          42
Scheduling methods on RAC

           DBMS_SCHEDULER
                 Create the job classes and assign a service to them
               BEGIN
                 DBMS_SCHEDULER.create_job_class(
                        job_class_name => 'OLTP_JOB_CLASS',
                        service        => 'OLTP_SERVICE');
                DBMS_SCHEDULER.create_job_class(
                        job_class_name => 'BATCH_JOB_CLASS',
                        service        => 'BATCH_SERVICE');
                DBMS_SCHEDULER.create_job_class(
                        job_class_name => 'REPORT_JOB_CLASS',
                        service        => 'REPORT_SERVICE');
               END;
               /

                 dba_scheduler_job_classes



© COPYRIGHT TRANSFER SOLUTIONS B.V.                                    43
Scheduling methods on RAC

           DBMS_SCHEDULER
                 Create a job and assign a job class to it.
                 Distribute your workload on services, instances
               BEGIN
                  sys.dbms_scheduler.create_job(
                           job_name => "OLTP_JOB",
                           program_name => 'my_oltp_procedure',
                           start_date => systimestamp',
                           job_class => 'OLTP_JOB_CLASS',
                           comments => 'This job will run on ORCL1 and ORCL2
                                        instances',
                           auto_drop => FALSE,
                           enabled => TRUE);
                END;
               /

                 dba_scheduler_jobs , dba_scheduler_running_jobs.

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                            44
SCAN Listener configurations

           Point of interest
                 SCAN configuration on Cluster
                 SCAN Compatibility Matrix




© COPYRIGHT TRANSFER SOLUTIONS B.V.              45
SCAN Listener configurations

           SCAN configuration on Cluster




© COPYRIGHT TRANSFER SOLUTIONS B.V.        46
SCAN Listener configurations

           Overview SCAN relocation
                                      Node 2         Node 3
                                            Scan 1
                                         Scan 2         Scan 3
                                       Scan 3
                                        Listener 2     Listener 3
   Node 1                                                           Node 4
          Scan 3
               1                                                       Scan 1 2
                                                                        Scan

       Listener 1                                                      Listener 4




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                 47
SCAN Listener configurations

           SCAN configuration on Cluster
                 Define the SCAN in your corporate DNS (Domain
                 Name Service)
                       joords-scan.joords.nl
                           IN A 133.22.67.194
                           IN A 133.22.67.193
                           IN A 133.22.67.192
                   Use the Grid Naming Service (GNS) [optional]
                       We don‟t use this
                 Created during cluster configuration
                       Default installation on port 1521 and default listener names.


© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                    48
SCAN Listener configurations

           SCAN configuration on Cluster
             [grid@joords-01 ~]# srvctl config scan_listener
             SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
             SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
             SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521

             [grid@joords-01 ~]# srvctl config scan
             SCAN name: joords-scan, Network:
             1/133.22.67.0/255.255.255.0/
             SCAN VIP name: scan1, IP: /joords-
             scan.joords.nl/133.22.67.192
             SCAN VIP name: scan2, IP: /joords-
             scan.joords.nl/133.22.67.193
             SCAN VIP name: scan3, IP: /joords-
             scan.joords.nl/133.22.67.194


© COPYRIGHT TRANSFER SOLUTIONS B.V.                                49
(SCAN) Listener configurations

           SCAN configuration on Cluster
                 Database configuration using SCAN
             local_listener  (DESCRIPTION=(ADDRESS_LIST=
                                (ADRESS=(PROTOCOL=TCP)
                                (HOST=133.22.67.111)(PORT=1521))))
             remote_listener  joords1-scan.joords.nl:1521




                 TNSNAMES.ORA
             Serv_DB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)
                         (HOST = joords1-scan.joords.nl) (PORT = 1521))
                         (CONNECT_DATA =(SERVER = DEDICATED)
                         (SERVICE_NAME = MyDBservice)))




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                       50
SCAN Listener configurations

           Compatibility Matrix
           Local listener works for local DB‟s
           SCAN listener for Load balancing




© COPYRIGHT TRANSFER SOLUTIONS B.V.              51
SCAN Listener configurations

           Compatibility Matrix < 11gR2 versions
                 TNSNAMES.ORA for Oracle Client
                    serv_DB =(DESCRIPTION=
                      (ADDRESS_LIST= (LOAD_BALANCE=on)(FAILOVER=ON)
                             (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.192)(PORT=1521))
                             (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.193)(PORT=1521))
                             (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.194)(PORT=1521)))
                             (CONNECT_DATA=(SERVICE_NAME= MyDBservice)))

                 TNSNAMES.ORA for remote_listener DB
                    clst_listener =(DESCRIPTION=
                      (ADDRESS_LIST=
                             (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.192)(PORT=1521))
                             (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.193)(PORT=1521))
                             (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.194)(PORT=1521)))




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                     52
SCAN Listener configurations

           Compatibility Matrix
           Local listener works for local DB‟s
           SCAN listener for Load balancing




© COPYRIGHT TRANSFER SOLUTIONS B.V.              53
Votingdisk issue on ASM

           Mirroring in ASM
                 External, Normal, High
                 Normal redundancy by voting file, 3 voting files are
                 places, each on one ASM disk.
                 ASM diskgroup (normal) consist of two ASM disks
                       New quorum failgroup for voting disk




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                     54
Votingdisk issue on ASM

           The Problem
             [grid@joords-01 ]# crsctl query css votedisk
             1. ONLINE 5d7ab463aede4f91bfe985df041dc86b (ORCL:OCRVOTE1) [OCRVOTE]
             2. ONLINE 78ab65495fe84f19bfcc05e1e8bcec83 (ORCL:OCRVOTE2) [OCRVOTE]
             Located 2 voting disk(s).

             SQLPLUS@ASM1>select name, path, label, header_status from v$asm_disk

             NAME           PATH            LABEL      HEADER_STATU
             ---------      -------------   --------   ------------
             OCRVOTE1       ORCL:OCRVOTE1   OCRVOTE1   MEMBER
             OCRVOTE2       ORCL:OCRVOTE2   OCRVOTE2   MEMBER
                            ORCL:OCRVOTE3




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                 56
Votingdisk issue on ASM

           Problem
                 OCRVOTING has the correct labeling
              [root@joords-01 ]# kfed read /dev/oracleasm/disks/OCRVOTE1A | egrep
              'dsknum|dskname|grpname|fgname|hdrsts|mntstmp.hi|mntstmp.lo'
              [root@joords-01 ]# kfed read /dev/oracleasm/disks/OCRVOTE1A | egrep
              'dsknum|dskname|grpname|fgname|hdrsts|mntstmp.hi|mntstmp.lo'
              [root@joords-01 ]# kfed read /dev/oracleasm/disks/OCRVOTE1A | egrep
              'dsknum|dskname|grpname|fgname|hdrsts|mntstmp.hi|mntstmp.lo'


             Column hdrsts tells you:
             MEMBER and is now in use
             FORMER used to be member and is available, safe to delete now




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                 57
Votingdisk issue on ASM

           The Solution
                 Clean the disk header of ocrvoting1c disk
                 Add disk ocrvoting1c to the ocrvote diskgroup as
                 “quorum failgroup”
            [root@joords-01 ]# dd if=/dev/zero
            of=/dev/oracleasm/disks/OCRVOTING1C bs=1024 count=100

            SQLPLUS@ASM> ALTER DISKGROUP OCRVOTE
            ADD QUORUM FAILGROUP OCRVOTE3_EVA3 DISK 'ORCL:OCRVOTE3' NAME
            OCRVOTE3;




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                        58
ASM spfile - ASM mirroring

           ASM spfile
                 Pointer of the spfile in the OLR.ORA
             strings from file ‘/etc/oracle/olr.loc/’
                      “ $ORACLE_HOME/cdata/<hostname>.olr
             .....
             spfile="+OCRVOTE/joords-
             clst/asmparameterfile/registry.253.743691783"
             ....
                 asmcmd copy the spfile ASM
            [grid@joords-01 ]# asmcmd
            asmcmd> spget
            +OCRVOTE/joords-clst/asmparameterfile/registry.253.743691783
            asmcmd> spcopy -u +OCRVOTE/joords-
            clst/asmparameterfile/registry.253.743691783 +DATA11G/joords-
            clst/asmparameterfile/spfileASM.ora
            asmcmd> spget
            +DATA11G/joords-clst/asmparameterfile/spfileASM.ora



© COPYRIGHT TRANSFER SOLUTIONS B.V.                                         59
ASM spfile - ASM mirroring

           ASM spfile
                 Check the spfile location
             Strings from file ‘/etc/oracle/olr.loc/’
             .....
             SPFile="+DATA11G/joords-clst/asmparameterfile/spfileASM.ora "
             ....



                 Move to the new ASM spfile
            Every node in the cluster execute :
            [root@joords-01 ~]# /software/oracle/11.2.0.2/bin/crsctl stop has
            [root@joords-01 ~]# /software/oracle/11.2.0.2/bin/crsctl start has
            sqlplus / as sysasm
            SQL@ASM> show parameter sp
            spfile +DATA11G/joords-clst/asmparameterfile/spfileasm.ora
            SQL@ASM>




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                              60
ASM spfile - ASM mirroring

           ASM spfile
                 Find all spfiles in asmcmd
             ASMCMD> find / *spfile*
             +DATA10G/ORA10G/spfileORA10G.ora
             +DATA11G/ORA11G/spfileORA11G.ora
             +DATA11G/joords-clst/asmparameterfile/spfileASM.ora




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                61
ASM spfile - ASM mirroring

           ASM mirroring
                 Diskgroups when ASM mirrors the AU‟s
             The crucial aspect of administering the diskgroups when ASM mirrors the AUs, is having
             enough free space to re-copy the AUs when a loss occurs. This is not a concern when external
             redundancy is used, but it is for normal and high redundancy, and requires that the ASM
             administrator be aware of the free space needs

                 Tracking free space within a diskgroup
                 View V$ASM_DISKGROUP
                 Examine the redundancy, offline state and free space
             TOTAL_MB => indicates the total space in the diskgroup
             FREE_MB => indicates the total free space in the diskgroup
                 requirements for mirror recovery; view
             REQUIRED_MIRROR_FREE_MB => indicates free space required in the diskgroup to restore
             redundancy by copying allocation units.
                 V$ASM_DISKGROUP
             USABLE_FILE_MB => indicates how much of the FREE_MB may be safely used whilst leaving
             enough free space for mirror copy recovery in the case of disk failure
             TYPE => indicates the redundancy attribute of the diskgroup.
             OFFLINE_DISKS => indicates how many disks are offline in the diskgroup


© COPYRIGHT TRANSFER SOLUTIONS B.V.                                                                         62
Vragen
                                      Antwoorden



                             CONSULTING | MANAGED SERVICES | EDUCATION


                           WWW.TRANSFER-SOLUTIONS.COM

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                      63

Mais conteúdo relacionado

Mais procurados

IT FUTURE 2011 - Fujitsu ror orchestration
IT FUTURE 2011 - Fujitsu ror orchestrationIT FUTURE 2011 - Fujitsu ror orchestration
IT FUTURE 2011 - Fujitsu ror orchestrationFujitsu France
 
Play with cloud foundry
Play with cloud foundryPlay with cloud foundry
Play with cloud foundryPeng Wan
 
CA Nimsoft xen desktop monitoring
CA Nimsoft xen desktop monitoring CA Nimsoft xen desktop monitoring
CA Nimsoft xen desktop monitoring CA Nimsoft
 
Architecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud ExpoArchitecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud Exposmw355
 
Track 1, session 4, hcl by adarsh singh, practice head, cloud computing
Track 1, session 4, hcl by adarsh singh, practice head, cloud computingTrack 1, session 4, hcl by adarsh singh, practice head, cloud computing
Track 1, session 4, hcl by adarsh singh, practice head, cloud computingEMC Forum India
 
Towards a Federated Cloud Ecosystem
Towards a Federated Cloud EcosystemTowards a Federated Cloud Ecosystem
Towards a Federated Cloud EcosystemClovis Chapman
 

Mais procurados (8)

IT FUTURE 2011 - Fujitsu ror orchestration
IT FUTURE 2011 - Fujitsu ror orchestrationIT FUTURE 2011 - Fujitsu ror orchestration
IT FUTURE 2011 - Fujitsu ror orchestration
 
Play with cloud foundry
Play with cloud foundryPlay with cloud foundry
Play with cloud foundry
 
CA Nimsoft xen desktop monitoring
CA Nimsoft xen desktop monitoring CA Nimsoft xen desktop monitoring
CA Nimsoft xen desktop monitoring
 
Architecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud ExpoArchitecting a Private Cloud - Cloud Expo
Architecting a Private Cloud - Cloud Expo
 
BlazeDS
BlazeDSBlazeDS
BlazeDS
 
Track 1, session 4, hcl by adarsh singh, practice head, cloud computing
Track 1, session 4, hcl by adarsh singh, practice head, cloud computingTrack 1, session 4, hcl by adarsh singh, practice head, cloud computing
Track 1, session 4, hcl by adarsh singh, practice head, cloud computing
 
Hadoop Now, Next & Beyond
Hadoop Now, Next & BeyondHadoop Now, Next & Beyond
Hadoop Now, Next & Beyond
 
Towards a Federated Cloud Ecosystem
Towards a Federated Cloud EcosystemTowards a Federated Cloud Ecosystem
Towards a Federated Cloud Ecosystem
 

Destaque

"De klant wikt, het concept beschikt"
"De klant wikt, het concept beschikt""De klant wikt, het concept beschikt"
"De klant wikt, het concept beschikt"Transfer Solutions
 
"Extreem hoog beschikbaar. Het Oracle arsenaal"
"Extreem hoog beschikbaar. Het Oracle arsenaal""Extreem hoog beschikbaar. Het Oracle arsenaal"
"Extreem hoog beschikbaar. Het Oracle arsenaal"Transfer Solutions
 
"High Availability in de praktijk. Database en Server Consolidatie"
"High Availability in de praktijk. Database en Server Consolidatie" "High Availability in de praktijk. Database en Server Consolidatie"
"High Availability in de praktijk. Database en Server Consolidatie" Transfer Solutions
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Destaque (6)

OBI-EE 11g
OBI-EE 11gOBI-EE 11g
OBI-EE 11g
 
"De klant wikt, het concept beschikt"
"De klant wikt, het concept beschikt""De klant wikt, het concept beschikt"
"De klant wikt, het concept beschikt"
 
"Extreem hoog beschikbaar. Het Oracle arsenaal"
"Extreem hoog beschikbaar. Het Oracle arsenaal""Extreem hoog beschikbaar. Het Oracle arsenaal"
"Extreem hoog beschikbaar. Het Oracle arsenaal"
 
"High Availability in de praktijk. Database en Server Consolidatie"
"High Availability in de praktijk. Database en Server Consolidatie" "High Availability in de praktijk. Database en Server Consolidatie"
"High Availability in de praktijk. Database en Server Consolidatie"
 
Oracle goldengate OGG
Oracle goldengate OGGOracle goldengate OGG
Oracle goldengate OGG
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Semelhante a Playing with Oracle clusterware infrastructure components

Virtualizing Business Critical Apps
Virtualizing Business Critical AppsVirtualizing Business Critical Apps
Virtualizing Business Critical Appsheraldschelke
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT SimpleBob Rhubart
 
Cloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleCloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleBob Rhubart
 
OSCON 2012 OpenStack Automation and DevOps Best Practices
OSCON 2012 OpenStack Automation and DevOps Best PracticesOSCON 2012 OpenStack Automation and DevOps Best Practices
OSCON 2012 OpenStack Automation and DevOps Best PracticesMatt Ray
 
Vincent Desveronnieres, Oracle
Vincent Desveronnieres,  OracleVincent Desveronnieres,  Oracle
Vincent Desveronnieres, OracleEwa Stepien
 
Robin Cloud Platform for Big Data and Databases
Robin Cloud Platform for Big Data and DatabasesRobin Cloud Platform for Big Data and Databases
Robin Cloud Platform for Big Data and DatabasesRobin Systems
 
Rightscale Webinar: Building Blocks for Private and Hybrid Clouds
Rightscale Webinar: Building Blocks for Private and Hybrid CloudsRightscale Webinar: Building Blocks for Private and Hybrid Clouds
Rightscale Webinar: Building Blocks for Private and Hybrid CloudsRightScale
 
Cloud Immortality - Architecting for High Availability & Disaster Recovery
Cloud Immortality - Architecting for High Availability & Disaster RecoveryCloud Immortality - Architecting for High Availability & Disaster Recovery
Cloud Immortality - Architecting for High Availability & Disaster RecoveryRightScale
 
Enterprise-Ready Private and Hybrid Cloud Computing Today
Enterprise-Ready Private and Hybrid Cloud Computing TodayEnterprise-Ready Private and Hybrid Cloud Computing Today
Enterprise-Ready Private and Hybrid Cloud Computing TodayRightScale
 
Development on Cloud,PaaS and SDDC
Development on Cloud,PaaS and SDDCDevelopment on Cloud,PaaS and SDDC
Development on Cloud,PaaS and SDDCseungdon Choi
 
Ceph Overview for Distributed Computing Denver Meetup
Ceph Overview for Distributed Computing Denver MeetupCeph Overview for Distributed Computing Denver Meetup
Ceph Overview for Distributed Computing Denver Meetupktdreyer
 
YARN - Next Generation Compute Platform fo Hadoop
YARN - Next Generation Compute Platform fo HadoopYARN - Next Generation Compute Platform fo Hadoop
YARN - Next Generation Compute Platform fo HadoopHortonworks
 
Solaris 11.2 What's New
Solaris 11.2 What's NewSolaris 11.2 What's New
Solaris 11.2 What's NewOrgad Kimchi
 
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?DATAVERSITY
 
Modern Application Development for the Enterprise
Modern Application Development for the EnterpriseModern Application Development for the Enterprise
Modern Application Development for the EnterpriseJuarez Junior
 
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...Michael Elder
 
Dr관련 세미나 자료 v2
Dr관련 세미나 자료 v2Dr관련 세미나 자료 v2
Dr관련 세미나 자료 v2종필 김
 
Dr관련 세미나 자료 v2333
Dr관련 세미나 자료 v2333Dr관련 세미나 자료 v2333
Dr관련 세미나 자료 v2333종필 김
 
Sesion Marzo Zaragoza
Sesion Marzo ZaragozaSesion Marzo Zaragoza
Sesion Marzo ZaragozaFran Navarro
 

Semelhante a Playing with Oracle clusterware infrastructure components (20)

Virtualizing Business Critical Apps
Virtualizing Business Critical AppsVirtualizing Business Critical Apps
Virtualizing Business Critical Apps
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT Simple
 
Cloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleCloud Computing: Making IT Simple
Cloud Computing: Making IT Simple
 
OSCON 2012 OpenStack Automation and DevOps Best Practices
OSCON 2012 OpenStack Automation and DevOps Best PracticesOSCON 2012 OpenStack Automation and DevOps Best Practices
OSCON 2012 OpenStack Automation and DevOps Best Practices
 
Vincent Desveronnieres, Oracle
Vincent Desveronnieres,  OracleVincent Desveronnieres,  Oracle
Vincent Desveronnieres, Oracle
 
Robin Cloud Platform for Big Data and Databases
Robin Cloud Platform for Big Data and DatabasesRobin Cloud Platform for Big Data and Databases
Robin Cloud Platform for Big Data and Databases
 
Rightscale Webinar: Building Blocks for Private and Hybrid Clouds
Rightscale Webinar: Building Blocks for Private and Hybrid CloudsRightscale Webinar: Building Blocks for Private and Hybrid Clouds
Rightscale Webinar: Building Blocks for Private and Hybrid Clouds
 
Cloud Immortality - Architecting for High Availability & Disaster Recovery
Cloud Immortality - Architecting for High Availability & Disaster RecoveryCloud Immortality - Architecting for High Availability & Disaster Recovery
Cloud Immortality - Architecting for High Availability & Disaster Recovery
 
Enterprise-Ready Private and Hybrid Cloud Computing Today
Enterprise-Ready Private and Hybrid Cloud Computing TodayEnterprise-Ready Private and Hybrid Cloud Computing Today
Enterprise-Ready Private and Hybrid Cloud Computing Today
 
Development on Cloud,PaaS and SDDC
Development on Cloud,PaaS and SDDCDevelopment on Cloud,PaaS and SDDC
Development on Cloud,PaaS and SDDC
 
Ceph Overview for Distributed Computing Denver Meetup
Ceph Overview for Distributed Computing Denver MeetupCeph Overview for Distributed Computing Denver Meetup
Ceph Overview for Distributed Computing Denver Meetup
 
YARN - Next Generation Compute Platform fo Hadoop
YARN - Next Generation Compute Platform fo HadoopYARN - Next Generation Compute Platform fo Hadoop
YARN - Next Generation Compute Platform fo Hadoop
 
Solaris 11.2 What's New
Solaris 11.2 What's NewSolaris 11.2 What's New
Solaris 11.2 What's New
 
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
Webinar: Emerging Trends in Data Architecture – What’s the Next Big Thing?
 
Modern Application Development for the Enterprise
Modern Application Development for the EnterpriseModern Application Development for the Enterprise
Modern Application Development for the Enterprise
 
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
Streaming Movies brings you Streamlined Applications -- How Adopting Netflix ...
 
Docker Datacenter - CaaS
Docker Datacenter - CaaSDocker Datacenter - CaaS
Docker Datacenter - CaaS
 
Dr관련 세미나 자료 v2
Dr관련 세미나 자료 v2Dr관련 세미나 자료 v2
Dr관련 세미나 자료 v2
 
Dr관련 세미나 자료 v2333
Dr관련 세미나 자료 v2333Dr관련 세미나 자료 v2333
Dr관련 세미나 자료 v2333
 
Sesion Marzo Zaragoza
Sesion Marzo ZaragozaSesion Marzo Zaragoza
Sesion Marzo Zaragoza
 

Último

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Último (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Playing with Oracle clusterware infrastructure components

  • 1. Right Availability in RAC environment Playing with Oracle clusterware infrastructure components SPREKER : Jos van den Oord E-MAIL : Jos.van.den.Oord@transfer-solutions.com DATUM : 29 juni 2011 WWW.TRANSFER-SOLUTIONS.COM
  • 2. Who am I Jos van den Oord Working with Oracle products since 1998 Working at Transfer-Solutions since 2010 Interests Databases Right Availability Security, Performance Blog : joordsblog.vandenoord.eu Email : jos.van.den.oord@transfer-solutions.com © COPYRIGHT TRANSFER SOLUTIONS B.V. 3
  • 3. Agenda The RAC environment Right Availability for an application concept Configuration HP Data Protector on cluster Create Right Availability application on cluster Scheduling methods on RAC SCAN listener configurations Votingdisk problem on ASM ASM spfile - ASM mirroring © COPYRIGHT TRANSFER SOLUTIONS B.V. 4
  • 4. The RAC environment Public LAN Backend LAN joords-01 joords-02 joords-03 joords-04 Oracle RDBMS 11gR2 oracle Oracle RDBMS 10gR2 Oracle RDBMS 10gR2 EBS grid Oracle Clusterware 11gR2 DC 1 DC 2 ASM with ACFS ASM Mirroring © COPYRIGHT TRANSFER SOLUTIONS B.V. 5
  • 5. High Availability for an application concept Point of interest Objectives Framework clusterware architecture What is needed Clusterware options Clusterware resources Action Script Clusterware framework Summary © COPYRIGHT TRANSFER SOLUTIONS B.V. 6
  • 6. High Availability for an application concept Objectives Restart on application failure Relocate on node failure Uses Oracle Clusterware Brings the same level of protection for Application components as Oracle‟s database components benefits from. © COPYRIGHT TRANSFER SOLUTIONS B.V. 7
  • 7. High Availability for an application concept Framework clusterware architecture RESOURCES ACTION SCRIPT RESOURCES ACTION SCRIPT AGENT RESOURCE REGISTRA- RESOURCE TYPE TION REGISTRATION TYPE © COPYRIGHT TRANSFER SOLUTIONS B.V. 8
  • 8. High Availability for an application concept What is needed Network Location Clients need a node independent way of connecting to an Application Configuration Files Applications typically need configuration files stored on shared file system Dependencies Applications depend on these configuration files. They also depend on the location independent network. Or they can depend form other application resources. © COPYRIGHT TRANSFER SOLUTIONS B.V. 9
  • 9. High Availability for an application concept Clusterware options Application HA Framework Extends Oracle Clusterware Right Availability protection to your application Oracle HA API Interface to allow you to change, at run time, how Oracle Clusterware manages your application VIP resource Provides Application VIP‟s ACFS or OCFS Provides a common location for files visible across all nodes © COPYRIGHT TRANSFER SOLUTIONS B.V. 10
  • 10. High Availability for an application concept Clusterware resources A resource is an Oracle Clusterware managed application Profile Attributes for the resource are stored in the Oracle Cluster Registry Oracle RAC Database is made up from a series of resources Other applications can be treated as resources The API (C code – A control language) Register, unregister, query, start, stop resources Control their behavior from a program © COPYRIGHT TRANSFER SOLUTIONS B.V. 11
  • 11. High Availability for an application concept Action Script Must be able to accept 5 parameter values called Entry Points: start, stop, check, clean and abort case $1 in 'start') # start the application and check status 'stop') # stop the application „clean') # kill application and cleanup „check') # validate the status of the application esac An Control Agent resource © COPYRIGHT TRANSFER SOLUTIONS B.V. 12
  • 12. High Availability for an application concept Clusterware framework Contains the application modelling logic Invokes the application aware agents, performs resource recovery When a node goes down, the framework recovers the application by relocating it to a live node Hosts in the OCR cache © COPYRIGHT TRANSFER SOLUTIONS B.V. 13
  • 13. High Availability for an application concept Possible Resource States State Description Action ONLINE The resource is running - OFFLINE The resource is NOT running - UNKNOWN An attempt to stop the resource has crsctl stop resource failed. Oracle Clusterware does not command actively monitor resources that are in this state. crsctl start resource command INTERMEDIATE 1: Oracle Clusterware cannot determine crsctl stop resource the state command 2: Resource is not functional crsctl start resource (Database [no]mount status) command © COPYRIGHT TRANSFER SOLUTIONS B.V. 14
  • 14. High Availability for an application concept Summary Oracle Clusterware Brings Protection to 3rd Party Applications Restart / Relocate Virtual IP‟s Used by clients to locate application irrespective of location Relocate with the Application as a „package‟ Protection Brings the same level of protection Oracle provides to it‟s own processes to 3rd Party Applications © COPYRIGHT TRANSFER SOLUTIONS B.V. 15
  • 15. Configuration HP Data Protector Point of interest Application virtual IP for the Oracle cluster Using the backend network configuration Using DB Services Central Oracle password file for DB‟s © COPYRIGHT TRANSFER SOLUTIONS B.V. 16
  • 16. Configuration HP Data Protector HP Data Protector Hostname Node 1 Node 2 Node 3 Node 4 © COPYRIGHT TRANSFER SOLUTIONS B.V. 17
  • 17. Configuration HP Data Protector HP Data Protector Hostname Node 1 Node 2 Node 3 Node 4 Application VIP cluster VIP © COPYRIGHT TRANSFER SOLUTIONS B.V. 18
  • 18. Configuration HP Data Protector HP Data Protector Hostname Node 1 Node 2 Node 3 Node 4 Application VIP cluster VIP © COPYRIGHT TRANSFER SOLUTIONS B.V. 19
  • 19. Configuration HP Data Protector VIP resources existed since Oracle Database 10gR1 Only used to failover the VIP to another node so that a client got an „instant‟ NAK returned when it tried to connect to the Virtual IP. They still exist and operate in the same way in higher Releases. © COPYRIGHT TRANSFER SOLUTIONS B.V. 20
  • 20. Configuration HP Data Protector Application VIPs New resource in Oracle Database since 10gR2 Created as functional VIPs which can be used to connect to an application regardless of the node it is running on VIP is a dependent resource of the user registered application There can be many VIPs, only one VIP is allowed per User Application © COPYRIGHT TRANSFER SOLUTIONS B.V. 21
  • 21. Configuration HP Data Protector Validation Cluster Network crsctl stat res -p |grep -ie .network -ie subnet |grep -ie name -ie subnet Add application VIP on Backend Network srvctl add vip -n joords_01 -k 2 -A 172.30.4.80/255.255.252.0/bond0 Create joords_vip_bk in OCR appvipcfg create -network=2 -ip=172.30.4.80 - vipname=joords_vip_bk -user=root Validation Cluster Registration crsctl stat res joords_vip_bk –p © COPYRIGHT TRANSFER SOLUTIONS B.V. 22
  • 22. Configuration HP Data Protector Validation Cluster Network [root@joords1 ~]# crsctl stat res joords_vip_bk –p Sample output is: res -p |grep -ie .network -ie subnet |grep -ie name crsctl stat NAME=joords_vip_bk -ie NAME=ora.net1.network subnet TYPE=app.appvip.type USR_ORA_SUBNET=133.22.67.0 ACL=owner:root:rwx,pgrp:root:r-x,other::r--,user:root:r-x Add application VIP on Backend Network ACTIVE_PLACEMENT=0 AGENT_FILENAME=%CRS_HOME%/bin/orarootagent%CRS_EXE_SUFFIX% AUTO_START=restore -n joords_01 -k 2 -A Sample output is: vip srvctl add NAME=ora.net2.network CARDINALITY=1 172.30.4.80/255.255.252.0/bond0 USR_ORA_SUBNET=172.30.4.0 CHECK_INTERVAL=1 DEGREE=1 Create joords_vip_bk in OCR DESCRIPTION=hp_dataprotect HA Application VIP RESTART_ATTEMPTS=0 appvipcfg create -network=2 -ip=172.30.4.80 - SCRIPT_TIMEOUT=60 SERVER_POOLS=* vipname=joords_vip_bk -user=root START_DEPENDENCIES=hard(ora.net2.network) pullup(ora.net2.network) STOP_DEPENDENCIES=hard(ora.net2.network) Validation Cluster Registration USR_ORA_VIP=172.30.4.80 VERSION=11.2.0.1.0 crsctl stat res joords_vip_bk –p © COPYRIGHT TRANSFER SOLUTIONS B.V. 23
  • 23. Configuration HP Data Protector Grant to grid os user crsctl setperm resource joords_vip_bk -u user:grid:r-x Validate as GRID user crsctl status resource joords_vip_bk -t ping –c4 joords_vip_bk crsctl relocate resource joords_vip_bk [–n node 1,2,3,4] ping –c4 joords_vip_bk ssh connection test joords_vip_bk ifconfig -a © COPYRIGHT TRANSFER SOLUTIONS B.V. 24
  • 24. Configuration HP Data Protector Working with Services Register DB services with srvctl Create RMAN user with sysdba Connection error with RMAN as sysdba using Oracle service Using symbolic links to a central password file, Problem solved. Grant sysdba to RMAN, execute only once © COPYRIGHT TRANSFER SOLUTIONS B.V. 25
  • 25. Create HA application on Clusterware Example “Apache Tomcat” The action script The action script has dependencies with the VIP The Cluster registration statement Managing Apache Tomcat Application © COPYRIGHT TRANSFER SOLUTIONS B.V. 26
  • 26. Create HA application on Clusterware Example “Apache Tomcat” The action script case $1 in 'start') The action script has dependencies with the VIP $APACHE_TOMCAT_HOME/bin/startup.sh ; RET=$? ;; The Cluster registration statement 'stop') $APACHE_TOMCAT_HOME/bin/shutdown.sh ; RET=$? Managing Apache Tomcat Application ;; 'clean') $APACHE_TOMCAT_HOME/bin/shutdown.sh ; RET=$? ;; 'check') # download a simple, small image from the http server $APACHE_TOMCAT/usr/bin/wget -q --delete-after $CHECKURL ; RET=$? … © COPYRIGHT TRANSFER SOLUTIONS B.V. 27
  • 27. Create HA application on Clusterware Dependencies and cluster registration Depending on the resource of an Application VIP Other resource dependencies. Registration by configuration file or command line © COPYRIGHT TRANSFER SOLUTIONS B.V. 28
  • 28. Create HA application on Clusterware Dependencies and cluster registration Using a configuration file [root@joords-01 ]# $GRID_HOME/bin/crsctl add resource tomcat / -type cluster_resource / -file /mnt/acfs/oracle/grid/tomcat.config File : tomcat.config ACTION_SCRIPT=/mnt/acfs/oracle/grid/tomcat.scr PLACEMENT=restricted RESTRART_ATTEMP=2 HOSTING_MEMBERS=joords-01 joords-02 joords-03 joords-04 CHECK_INTERVAL=30 START_DEPENDENCIES='hard(httpd-vip), pullup(httpd-vip)‟ STOP_DEPENDENCIES='hard(httpd-vip)'“ DESCRIPTION=“Apache Tomcat HA Application” © COPYRIGHT TRANSFER SOLUTIONS B.V. 29
  • 29. Create HA application on Clusterware Dependencies and cluster registration The command line [root@joords-01 ] # $GRID_HOME/bin/crsctl add resource tomcat / / -type cluster_resource / -attr "ACTION_SCRIPT= =/mnt/acfs/oracle/grid/tomcat.scr, CHECK_INTERVAL=30, START_DEPENDENCIES='hard(httpd-vip) pullup(httpd-vip)', STOP_DEPENDENCIES='hard(http-vip) ', HOSTING_MEMBERS= joords-01 joords-02 joords-03 joords-04" © COPYRIGHT TRANSFER SOLUTIONS B.V. 30
  • 30. Create HA application on Clusterware Dependencies and cluster registration crsctl status resource tomcat -p NAME=tomcat TYPE=cluster_resource … ACTION_SCRIPT= /mnt/acfs/oracle/grid/tomcat.scr AGENT_FILENAME=%CRS_HOME%/bin/scriptagent AUTO_START=restore CARDINALITY=1 … HOSTING_MEMBERS=joords=01 joords=02 joords-03 joords-04 .. START_DEPENDENCIES=hard(httpd-vip) pullup(httpd-vip) STOP_DEPENDENCIES=hard(httpd-vip) … © COPYRIGHT TRANSFER SOLUTIONS B.V. 31
  • 31. Create HA application on Clusterware Managing the Application [oracle@joord-01 ]# start resource tomcat [oracle@joord-01 ]# crsctl status resource tomcat NAME=tomcat TYPE=cluster_resource TARGET=ONLINE STATE=ONLINE on joords-01 [oracle@joord-01 ]# $ crsctl relocate resource tomcat CRS-2673: Attempting to stop „tomcat' on „joords-01' CRS-2677: Stop of ' tomcat ' on „joord-01' succeeded CRS-2673: Attempting to stop ' tomcat ' on „joords-01' CRS-2677: Stop of „tomcat ' on „joord-01' succeeded CRS-2672: Attempting to start ' tomcat ' on „joords-02' CRS-2676: Start of „tomcat' on „joord-02' succeeded CRS-2672: Attempting to start „tomcat' on „joords-02' CRS-2676: Start of „tomcat on „joords-02' succeeded [oracle@joord-01 ]# $ crsctl stop resource tomcat © COPYRIGHT TRANSFER SOLUTIONS B.V. 32
  • 32. Scheduling methods on RAC Point of interest Crontabs, or windows tasks DBMS_JOB DBMS_SCHEDULER © COPYRIGHT TRANSFER SOLUTIONS B.V. 33
  • 33. Scheduling methods on RAC Crontab, or window tasks All crontabs are the same on every node Create an actieve/passive node activity Using an action script with cluster resource Add validation “active node” to the scripting Active node then “DO YOUR THING” else “EXIT” Result: HA scheduling, default shell scripts © COPYRIGHT TRANSFER SOLUTIONS B.V. 34
  • 34. Scheduling methods on RAC Crontab, or window tasks example Action script : crontab_check.sh #!/bin/bash export M_NAME=/oravar/grid/joords_cron/crontab_check.sh export GRID_OWNER=grid export CRS_HOME=/software/oracle/11.2.0.2/bin case $1 in 'start') hostname -a > ${M_NAME}; RET=0 ;; 'stop') echo "STOP" > ${M_NAME}; RET=0 ;; 'check') M_VALUE=`cat ${M_NAME}`; NDEF=`grep -c ${M_VALUE} ${CRS_HOME}/olsnodes` if [ $NDEF -eq 1 ] ; then ; RET=0 ; else ; RET=1 ;fi ;; esac if [ $RET -eq 0 ]; then ; exit 0 ; else ; exit 1 ;fi © COPYRIGHT TRANSFER SOLUTIONS B.V. 35
  • 35. Scheduling methods on RAC Crontab, or window tasks example Action configuration file : crontab_check.config PLACEMENT=restricted HOSTING_MEMBERS=joords-01 joords-02 joords-03 joords-04 CHECK_INTERVAL=30 CARDINALITY=1 ACTIVE_PLACEMENT=0 AUTO_START=always DEGREE=1 DESCRIPTION="Cron active node resource" RESTART_ATTEMPTS=1 ACTION_SCRIPT=/oravar/grid/joords_cron/crontab_check.sh © COPYRIGHT TRANSFER SOLUTIONS B.V. 36
  • 36. Scheduling methods on RAC Crontab, or window tasks example Registration [root@joords-01 ]# crsctl add resource CRONTAB_CHECK / –type cluster_resource © COPYRIGHT TRANSFER SOLUTIONS B.V. 37
  • 37. Scheduling methods on RAC DBMS_JOB Supports multi-instance execution of jobs NOT instance aware, Node affinity EXECUTE DBMS_JOB.INSTANCE(job=>123, instance=>1); No instance parameter, default instance where job is created Node affinity also with Advanced Queuing Result: A scheduling method, actions by node failure © COPYRIGHT TRANSFER SOLUTIONS B.V. 38
  • 38. Scheduling methods on RAC DBMS_SCHEDULER Fully instance aware Distribute your workload on services, instances Need Job classes Control the usage of resources through the resource consumer groups Managing on services Transparant Application Failover Result: HA scheduling method with load-balancing and node failover functionality © COPYRIGHT TRANSFER SOLUTIONS B.V. 39
  • 39. Scheduling methods on RAC DBMS_SCHEDULER Overview Resource Resource Window Consumer Group plan group Job class Window Program Job Schedule Arguments Arguments © COPYRIGHT TRANSFER SOLUTIONS B.V. 40
  • 40. Scheduling methods on RAC DBMS_SCHEDULER Overview Resource Logging Log Consumer Group Service Level History Job Class © COPYRIGHT TRANSFER SOLUTIONS B.V. 41
  • 41. Scheduling methods on RAC DBMS_SCHEDULER Create the services The Services : OLTP_SERVICE, BATCH_SERVICE, REPORT_SERVICE [oracle@joords-01 ]# srvctl add service -d ORCL-s OLTP_SERVICE -r ORCL1, ORCL2 -a ORCL3 [oracle@joords-01 ]# srvctl add service -d ORCL-s BATCH_SERVICE -r ORCL3 -a ORCL1,ORCL2 [oracle@joords-01 ]# srvctl add service -d ORCL -s REPORT_SERVICE -r ORCL3 -a ORCL1,ORCL2 [oracle@joords-01 ]# srvctl status service -d ORCL Service OLTP_SERVICE is running on instance(s) ORCL1 ORCL2 Service BATCH_SERVICE is running on instance(s) ORCL3 Service REPORT_SERVICE is running on instance(s) ORCL3 [oracle@joords-01 ]# srvctl config service -d ORCL OLTP_SERVICE PREF : ORCL1 ORCL2 AVAIL: ORCL3 BATCH_SERVICE PREF : ORCL3 AVAIL: ORCL1 ORCL2 REPORT_SERVICE PREF: ORCL3 AVAIL: ORCL1 ORCL2 © COPYRIGHT TRANSFER SOLUTIONS B.V. 42
  • 42. Scheduling methods on RAC DBMS_SCHEDULER Create the job classes and assign a service to them BEGIN DBMS_SCHEDULER.create_job_class( job_class_name => 'OLTP_JOB_CLASS', service => 'OLTP_SERVICE'); DBMS_SCHEDULER.create_job_class( job_class_name => 'BATCH_JOB_CLASS', service => 'BATCH_SERVICE'); DBMS_SCHEDULER.create_job_class( job_class_name => 'REPORT_JOB_CLASS', service => 'REPORT_SERVICE'); END; / dba_scheduler_job_classes © COPYRIGHT TRANSFER SOLUTIONS B.V. 43
  • 43. Scheduling methods on RAC DBMS_SCHEDULER Create a job and assign a job class to it. Distribute your workload on services, instances BEGIN sys.dbms_scheduler.create_job( job_name => "OLTP_JOB", program_name => 'my_oltp_procedure', start_date => systimestamp', job_class => 'OLTP_JOB_CLASS', comments => 'This job will run on ORCL1 and ORCL2 instances', auto_drop => FALSE, enabled => TRUE); END; / dba_scheduler_jobs , dba_scheduler_running_jobs. © COPYRIGHT TRANSFER SOLUTIONS B.V. 44
  • 44. SCAN Listener configurations Point of interest SCAN configuration on Cluster SCAN Compatibility Matrix © COPYRIGHT TRANSFER SOLUTIONS B.V. 45
  • 45. SCAN Listener configurations SCAN configuration on Cluster © COPYRIGHT TRANSFER SOLUTIONS B.V. 46
  • 46. SCAN Listener configurations Overview SCAN relocation Node 2 Node 3 Scan 1 Scan 2 Scan 3 Scan 3 Listener 2 Listener 3 Node 1 Node 4 Scan 3 1 Scan 1 2 Scan Listener 1 Listener 4 © COPYRIGHT TRANSFER SOLUTIONS B.V. 47
  • 47. SCAN Listener configurations SCAN configuration on Cluster Define the SCAN in your corporate DNS (Domain Name Service) joords-scan.joords.nl IN A 133.22.67.194 IN A 133.22.67.193 IN A 133.22.67.192 Use the Grid Naming Service (GNS) [optional] We don‟t use this Created during cluster configuration Default installation on port 1521 and default listener names. © COPYRIGHT TRANSFER SOLUTIONS B.V. 48
  • 48. SCAN Listener configurations SCAN configuration on Cluster [grid@joords-01 ~]# srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521 SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521 SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521 [grid@joords-01 ~]# srvctl config scan SCAN name: joords-scan, Network: 1/133.22.67.0/255.255.255.0/ SCAN VIP name: scan1, IP: /joords- scan.joords.nl/133.22.67.192 SCAN VIP name: scan2, IP: /joords- scan.joords.nl/133.22.67.193 SCAN VIP name: scan3, IP: /joords- scan.joords.nl/133.22.67.194 © COPYRIGHT TRANSFER SOLUTIONS B.V. 49
  • 49. (SCAN) Listener configurations SCAN configuration on Cluster Database configuration using SCAN local_listener  (DESCRIPTION=(ADDRESS_LIST= (ADRESS=(PROTOCOL=TCP) (HOST=133.22.67.111)(PORT=1521)))) remote_listener  joords1-scan.joords.nl:1521 TNSNAMES.ORA Serv_DB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = joords1-scan.joords.nl) (PORT = 1521)) (CONNECT_DATA =(SERVER = DEDICATED) (SERVICE_NAME = MyDBservice))) © COPYRIGHT TRANSFER SOLUTIONS B.V. 50
  • 50. SCAN Listener configurations Compatibility Matrix Local listener works for local DB‟s SCAN listener for Load balancing © COPYRIGHT TRANSFER SOLUTIONS B.V. 51
  • 51. SCAN Listener configurations Compatibility Matrix < 11gR2 versions TNSNAMES.ORA for Oracle Client serv_DB =(DESCRIPTION= (ADDRESS_LIST= (LOAD_BALANCE=on)(FAILOVER=ON) (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.192)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.193)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.194)(PORT=1521))) (CONNECT_DATA=(SERVICE_NAME= MyDBservice))) TNSNAMES.ORA for remote_listener DB clst_listener =(DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.192)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.193)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=133.22.67.194)(PORT=1521))) © COPYRIGHT TRANSFER SOLUTIONS B.V. 52
  • 52. SCAN Listener configurations Compatibility Matrix Local listener works for local DB‟s SCAN listener for Load balancing © COPYRIGHT TRANSFER SOLUTIONS B.V. 53
  • 53. Votingdisk issue on ASM Mirroring in ASM External, Normal, High Normal redundancy by voting file, 3 voting files are places, each on one ASM disk. ASM diskgroup (normal) consist of two ASM disks New quorum failgroup for voting disk © COPYRIGHT TRANSFER SOLUTIONS B.V. 54
  • 54. Votingdisk issue on ASM The Problem [grid@joords-01 ]# crsctl query css votedisk 1. ONLINE 5d7ab463aede4f91bfe985df041dc86b (ORCL:OCRVOTE1) [OCRVOTE] 2. ONLINE 78ab65495fe84f19bfcc05e1e8bcec83 (ORCL:OCRVOTE2) [OCRVOTE] Located 2 voting disk(s). SQLPLUS@ASM1>select name, path, label, header_status from v$asm_disk NAME PATH LABEL HEADER_STATU --------- ------------- -------- ------------ OCRVOTE1 ORCL:OCRVOTE1 OCRVOTE1 MEMBER OCRVOTE2 ORCL:OCRVOTE2 OCRVOTE2 MEMBER ORCL:OCRVOTE3 © COPYRIGHT TRANSFER SOLUTIONS B.V. 56
  • 55. Votingdisk issue on ASM Problem OCRVOTING has the correct labeling [root@joords-01 ]# kfed read /dev/oracleasm/disks/OCRVOTE1A | egrep 'dsknum|dskname|grpname|fgname|hdrsts|mntstmp.hi|mntstmp.lo' [root@joords-01 ]# kfed read /dev/oracleasm/disks/OCRVOTE1A | egrep 'dsknum|dskname|grpname|fgname|hdrsts|mntstmp.hi|mntstmp.lo' [root@joords-01 ]# kfed read /dev/oracleasm/disks/OCRVOTE1A | egrep 'dsknum|dskname|grpname|fgname|hdrsts|mntstmp.hi|mntstmp.lo' Column hdrsts tells you: MEMBER and is now in use FORMER used to be member and is available, safe to delete now © COPYRIGHT TRANSFER SOLUTIONS B.V. 57
  • 56. Votingdisk issue on ASM The Solution Clean the disk header of ocrvoting1c disk Add disk ocrvoting1c to the ocrvote diskgroup as “quorum failgroup” [root@joords-01 ]# dd if=/dev/zero of=/dev/oracleasm/disks/OCRVOTING1C bs=1024 count=100 SQLPLUS@ASM> ALTER DISKGROUP OCRVOTE ADD QUORUM FAILGROUP OCRVOTE3_EVA3 DISK 'ORCL:OCRVOTE3' NAME OCRVOTE3; © COPYRIGHT TRANSFER SOLUTIONS B.V. 58
  • 57. ASM spfile - ASM mirroring ASM spfile Pointer of the spfile in the OLR.ORA strings from file ‘/etc/oracle/olr.loc/’ “ $ORACLE_HOME/cdata/<hostname>.olr ..... spfile="+OCRVOTE/joords- clst/asmparameterfile/registry.253.743691783" .... asmcmd copy the spfile ASM [grid@joords-01 ]# asmcmd asmcmd> spget +OCRVOTE/joords-clst/asmparameterfile/registry.253.743691783 asmcmd> spcopy -u +OCRVOTE/joords- clst/asmparameterfile/registry.253.743691783 +DATA11G/joords- clst/asmparameterfile/spfileASM.ora asmcmd> spget +DATA11G/joords-clst/asmparameterfile/spfileASM.ora © COPYRIGHT TRANSFER SOLUTIONS B.V. 59
  • 58. ASM spfile - ASM mirroring ASM spfile Check the spfile location Strings from file ‘/etc/oracle/olr.loc/’ ..... SPFile="+DATA11G/joords-clst/asmparameterfile/spfileASM.ora " .... Move to the new ASM spfile Every node in the cluster execute : [root@joords-01 ~]# /software/oracle/11.2.0.2/bin/crsctl stop has [root@joords-01 ~]# /software/oracle/11.2.0.2/bin/crsctl start has sqlplus / as sysasm SQL@ASM> show parameter sp spfile +DATA11G/joords-clst/asmparameterfile/spfileasm.ora SQL@ASM> © COPYRIGHT TRANSFER SOLUTIONS B.V. 60
  • 59. ASM spfile - ASM mirroring ASM spfile Find all spfiles in asmcmd ASMCMD> find / *spfile* +DATA10G/ORA10G/spfileORA10G.ora +DATA11G/ORA11G/spfileORA11G.ora +DATA11G/joords-clst/asmparameterfile/spfileASM.ora © COPYRIGHT TRANSFER SOLUTIONS B.V. 61
  • 60. ASM spfile - ASM mirroring ASM mirroring Diskgroups when ASM mirrors the AU‟s The crucial aspect of administering the diskgroups when ASM mirrors the AUs, is having enough free space to re-copy the AUs when a loss occurs. This is not a concern when external redundancy is used, but it is for normal and high redundancy, and requires that the ASM administrator be aware of the free space needs Tracking free space within a diskgroup View V$ASM_DISKGROUP Examine the redundancy, offline state and free space TOTAL_MB => indicates the total space in the diskgroup FREE_MB => indicates the total free space in the diskgroup requirements for mirror recovery; view REQUIRED_MIRROR_FREE_MB => indicates free space required in the diskgroup to restore redundancy by copying allocation units. V$ASM_DISKGROUP USABLE_FILE_MB => indicates how much of the FREE_MB may be safely used whilst leaving enough free space for mirror copy recovery in the case of disk failure TYPE => indicates the redundancy attribute of the diskgroup. OFFLINE_DISKS => indicates how many disks are offline in the diskgroup © COPYRIGHT TRANSFER SOLUTIONS B.V. 62
  • 61. Vragen Antwoorden CONSULTING | MANAGED SERVICES | EDUCATION WWW.TRANSFER-SOLUTIONS.COM © COPYRIGHT TRANSFER SOLUTIONS B.V. 63