Forgot your password?    
+ Reply to Thread
Results 1 to 2 of 2

Thread: Oracle RAC 11gR2 Server Side TAF Using SRVCTL.

  1. #1
    Oracle Administrator
    Join Date
    Dec 2011
    Posts
    92

    Oracle RAC 11gR2 Server Side TAF Using SRVCTL.



    Add services on cluster through srvctl.

    Basic connection.

    [oracle@rac1 ~]$ srvctl add service -d dell -s report -r dell1 -a dell2 -P basic -e session

    start the service.

    [root@rac1 bin]# ./crsctl start resource ora.dell.report.svc
    Code:
    CRS-2672: Attempting to start 'ora.dell.report.svc' on 'rac1'
    CRS-2676: Start of 'ora.dell.report.svc' on 'rac1' succeeded
    Preconnect connection.

    [oracle@rac1 ~]$ srvctl add service -d dell -s testsrv -r dell1 -a dell2 -P preconnect

    start the service.


    [root@rac1 bin]# ./crsctl start resource ora.dell.testsrv.svc
    Code:
    CRS-2672: Attempting to start 'ora.dell.testsrv.svc' on 'rac1'
    CRS-2676: Start of 'ora.dell.testsrv.svc' on 'rac1' succeeded
    CRS-2672: Attempting to start 'ora.dell.testsrv_preconnect.svc' on 'rac2'
    CRS-2676: Start of 'ora.dell.testsrv_preconnect.svc' on 'rac2' succeeded
    Client side configuration


    [root@client ~]# vi /etc/resolv.conf
    search example.com
    192.168.1.100


    Sample tnsnames entry.



    Code:
    reporting =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rac-cluster-scan)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = report.example.com)
        )
      )
    
    
    
    
    testsrv =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rac-cluster-scan)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = testsrv.example.com)
          (failover_mode= (backup=testsrv_preconnect)(type=select)(method=preconnect))
        )
      )
    
    
    testsrv_preconnect =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = rac-cluster-scan)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = testsrv_preconnect.example.com)
    
        )
      )
    Connect client using reporting.

    [oracle@client admin]$ sqlplus /nolog

    SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 24 18:16:59 2012

    Copyright (c) 1982, 2009, Oracle. All rights reserved.

    SQL> conn scott/tiger@reporting
    Connected.


    check on cluster.

    SQL> select inst_id,sid,username,failover_type,failover_method ,failed_over from gv$session where username='SCOTT';

    Code:
    INST_ID        SID USERNAME                       FAILOVER_TYPE FAILOVER_M FAI
    ---------- ---------- ------------------------------ ------------- ---------- ---
             1         50 SCOTT                          SESSION       BASIC      NO

    Connect client using testsrv.

    [oracle@client admin]$ sqlplus /nolog

    SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 24 19:15:07 2012

    Copyright (c) 1982, 2009, Oracle. All rights reserved.

    SQL> conn scott/tiger@testsrv
    Connected.


    Check on cluster

    SQL> select inst_id,sid,username,failover_type,failover_method ,failed_over from gv$session where username='SCOTT';

    Code:
    INST_ID        SID USERNAME                       FAILOVER_TYPE FAILOVER_M FAI
    ---------- ---------- ------------------------------ ------------- ---------- ---
             1         62 SCOTT                          SELECT        PRECONNECT NO
             2         62 SCOTT                          NONE          NONE       NO
    Removing created services.

    Options Description

    -d Database Name

    -s Service Name

    -i Instance Name

    -f Force remove



    [oracle@rac1 ~]$ srvctl stop service -d dell -s testsrv
    [oracle@rac1 ~]$ srvctl remove service -d dell -s testsrv -i dell1,dell2

  2. #2
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427
    TAF can be configured at the Oracle Client side in tnsnames.ora or at the Database Server side using srvctl.

    Configuring it at the server is preferred as it is convenient to put the configuration in one place i.e. on the server.
    TAF configuration is associated with the database service as shown above. Creating the service with TAF related options is all about configuring TAF.

    1. Create service with srvctl

    srvctl defines services in OCR which is accessible across nodes. The service configuration details can be viewed with srvctl config service command.

    2. Start the Service with srvctl

    When the service is started with srvctl, it actually creates a service in the database i.e. RDBMS. The service name and the configuration details of the
    service created at the database can be viwed with DBA_SERVICES view. Then the SERVICE_NAMES database parameter is set, which allows PMON to register this
    service with the listener. Hence connections can be established through listener to the database.


    NOTE:
    The clusterware automatically starts/stops and manages the services in the database according to the configuration of the service.
    manually setting the SERVICE_NAMES parameter in RAC is not allowed as clusterware manages setting this parameter.



    Databases in 11gR2 can be Administrator-managed or Policy-managed. Certain options can be used only with certain type of database.

    Here is the description of the options that we are going to use in configuring TAF.


    administrator-managed database

    An administrator-managed database is a database created on nodes that are not part of a server pool and are managed by the database or clusterware administrator.
    At the time of service creation, this clause is valid only for Administrator-managed database which support PRECONNECT method.
    -r "<preferred_list>" [-a "<available_list>"] [-P {BASIC | NONE | PRECONNECT}]


    policy-managed database

    A policy-managed database is created using a server pool. Oracle Clusterware allocates and reassigns capacity based on policies you define, enabling faster resource failover and dynamic capacity assignment.
    When you define services for a policy-managed database, you define the service to a server pool where the database is running. •You can define the service as either uniform policy(running on all instances in the server pool) or a singleton (running on only one instance in the server pool). For singleton policy services, RAC chooses on which instance in the server pool the service is active. •If that instance fails, then the service fails over to another instance in the pool. A service can only run in one server pool.

    At the time of service creation, this clause is valid only for Policy-managed database where in PRECONNECT method is not available.
    -g <server_pool> [-c {UNIFORM | SINGLETON}]

    (Server Pool has been covered on a seperate post)

+ Reply to Thread

Similar Threads

  1. Rac 11gR2 Server Pool
    By Hemant in forum RAC Performance,LoadBalancing,TAF,FAN,Troubleshooting
    Replies: 0
    Last Post: 11-15-2012, 06:51 PM
  2. Transparent Application Failover (TAF) Setup on Client Side for Oracle RAC
    By Hemant in forum RAC Performance,LoadBalancing,TAF,FAN,Troubleshooting
    Replies: 1
    Last Post: 10-22-2012, 07:51 PM
  3. Oracle RAC 11gR2 Client Side TAF.
    By ajaychandi in forum RAC Performance,LoadBalancing,TAF,FAN,Troubleshooting
    Replies: 0
    Last Post: 09-24-2012, 08:45 AM
  4. Server-side Transparent Application Failover (TAF) in Oracle RAC
    By Hemant in forum RAC Performance,LoadBalancing,TAF,FAN,Troubleshooting
    Replies: 0
    Last Post: 12-15-2011, 03:08 AM
  5. Srvctl Major Options and Usage in Oracle RAC
    By Hemant in forum RAC Concepts and Administration
    Replies: 0
    Last Post: 11-04-2011, 06:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics