13 Replies Latest reply: Oct 3, 2012 10:57 AM by Valentin Minzatu RSS

    PRECONNECT vs BASIC TAF method

    piotrtal
      hi,

      i expected that if i define service with TAF BASIC policy there is not possible to connect to this service with TAF PRECONNECT polisy, but i failed.

      this is my entry in tnsname.

      CDBS1_TAF =
      *(DESCRIPTION =*
      *(ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521))*
      *(CONNECT_DATA =*
      *(SERVER = DEDICATED)*
      *(SERVICE_NAME = piodbserv2.world)*
      *(INSTANCE_NAME = piodb1)*
      *(FAILOVER_MODE=*
      *(BACKUP=CDBS2_TAF)*
      *(TYPE=SELECT)*
      *(METHOD=PRECONNECT)*
      *)*
      *)*
      *)*


      CDBS2_TAF =
      *(DESCRIPTION =*
      *(ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))*
      *(CONNECT_DATA =*
      *(SERVER = DEDICATED)*
      *(SERVICE_NAME = piodbserv2.world)*
      *(INSTANCE_NAME = piodb2)*
      *(FAILOVER_MODE=*
      *(BACKUP=CDBS1_TAF)*
      *(TYPE=SELECT)*
      *(METHOD=PRECONNECT)*
      *)*
      *)*
      *)*



      and this is my log session:

      *[oracle@rac1 ~]$ srvctl config service -d piodb -s piodbserv2 -a*
      piodbserv2 PREF: piodb1 piodb2 AVAIL:  TAF: BASIC

      SQL> SELECT inst_id, sid, serial#, username, failover_type, failover_method, service_name FROM gv$session
      *2 WHERE username = 'PIOTRTAL'*
      *3 ;*

      INST_ID        SID    SERIAL# USERNAME                       FAILOVER_TYPE FAILOVER_METHOD SERVICE_NAME
      ---------- ---------- ---------- ------------------------------ ------------- --------------- ----------------------------------------------------------------
      *1 148 412 PIOTRTAL SELECT PRECONNECT piodbserv2*
      *2 142 144 PIOTRTAL NONE NONE piodbserv2*




      why do i have two session and connection is made using PRECONNECT method instead of BASIC. i remind you that this service TAF policy is set as BASIC.

      thanks in advance
        • 1. Re: PRECONNECT vs BASIC TAF method
          Valentin Minzatu
          Is there a reason you have "(METHOD= *PRECONNECT* )" in your tnsnames.ora?
          • 2. Re: PRECONNECT vs BASIC TAF method
            piotrtal
            reason is only one. for testing purposes. i supposed that if i have SERVICE with BASIC TAF policy enablet i won't be able force PRECONNECT TAF policy from client (tnsnames.ora) - but i failed.

            the question is. why is posible set policy (BASIC/PRECONNECT) on service level if final behaviour depends from what is stored on client side?

            thx.
            • 3. Re: PRECONNECT vs BASIC TAF method
              Valentin Minzatu
              hm, I see what you mean ... you are reading this, right: "Server side TAF settings override client-side counterparts that might be configured in TNS connect descriptors"?

              Can you please post the output of the following, right after you connect your session (before killing the instance):
              select name, failover_method, failover_type from dba_services;
              SELECT inst_id, sid, serial#, username, failover_type, failover_method, service_name, failed_over FROM gv$session where username = UPPER('&your_user_name');
              Edited by: Valentin Minzatu on Sep 28, 2012 12:55 PM
              • 4. Re: PRECONNECT vs BASIC TAF method
                921598
                Plz check MOS ID 460982.1
                • 5. Re: PRECONNECT vs BASIC TAF method
                  piotrtal
                  this is my log (details) from session and configuration:

                  [oracle@rac1 ~]$ srvctl config service -d piodb -s piodbserv2 -a
                  piodbserv2 PREF: piodb1 piodb2 AVAIL: TAF: BASIC

                  so as you can notice this is BASIC TAF policy set for piodbserv2

                  after i am connected to the session from user piotrtal:

                  [oracle@rac1 ~]$ sqlplus / as sysdba

                  SQL> set line 200
                  SQL> select name, failover_method, failover_type from dba_services;



                  NAME                                        FAILOVER_METHOD                              FAILOVER_TYPE
                  ---------------------------------------------------------------- ---------------------------------------------------------------- ----------------------------------------------------------------
                  SYS$BACKGROUND
                  SYS$USERS
                  seeddataXDB
                  seeddata.regress.rdbms.dev.us.oracle.com
                  piodbXDB
                  piodb.world
                  piodbserv1
                  piodbserv2

                  8 rows selected.

                  SQL> SELECT sid,username FROM gv$session where username='PIOTRTAL';

                  SID USERNAME
                  ---------- ------------------------------
                  143 PIOTRTAL
                  148 PIOTRTAL

                  SQL> SELECT inst_id, sid, serial#, username, failover_type, failover_method, service_name, failed_over FROM gv$session where username = UPPER('PIOTRTAL');

                  INST_ID     SID     SERIAL# USERNAME               FAILOVER_TYPE FAILOVER_M SERVICE_NAME                                   FAI
                  ---------- ---------- ---------- ------------------------------ ------------- ---------- ---------------------------------------------------------------- ---
                       1     143     88 PIOTRTAL               NONE     NONE     piodbserv2                                   NO
                       2     148     41 PIOTRTAL               SELECT     PRECONNECT piodbserv2                                   NO

                  SQL>
                  • 6. Re: PRECONNECT vs BASIC TAF method
                    piotrtal
                    but i have additional question.
                    why TAF policy is not reflected in dba_services for piodbserv2, desipte it is defined on service level (you can see this in srvctl command).
                    • 7. Re: PRECONNECT vs BASIC TAF method
                      Valentin Minzatu
                      I don't see any type of failover associated with either of your services. Can you please use
                      srvctl modify ...
                      to change them to what you want them to look like and retry your test? (please don't forget to query for session details before killing the instance/node)
                      • 8. Re: PRECONNECT vs BASIC TAF method
                        piotrtal
                        please look at my service config command

                        [oracle@rac1 ~]$ srvctl config service -d piodb -s piodbserv2 -a
                        piodbserv2 PREF: piodb1 piodb2 AVAIL: TAF: BASIC

                        but (as i said), i don't know why this is not reflected in dba_services table.

                        i am sure that this service has TAF:BASIC policy enabled (like in the example above).
                        • 9. Re: PRECONNECT vs BASIC TAF method
                          Valentin Minzatu
                          What is the output of:
                          srvctl config service -d piodb -s piodbserv2 
                          • 10. Re: PRECONNECT vs BASIC TAF method
                            piotrtal
                            i just sent it to forum (look at previous posts):

                            output is no other than:

                            [oracle@rac1 ~]$ srvctl config service -d piodb -s piodbserv2 -a
                            piodbserv2 PREF: piodb1 piodb2 AVAIL: TAF: BASIC

                            which is prof that this service is configured with TAF:BASIC failover policy.
                            but (as I said).. i don't know why in dba_services this is not reflected.
                            • 11. Re: PRECONNECT vs BASIC TAF method
                              Valentin Minzatu
                              What is the version?
                              • 12. Re: PRECONNECT vs BASIC TAF method
                                piotrtal
                                SQL> select * from v$version;

                                BANNER
                                ----------------------------------------------------------------
                                Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
                                PL/SQL Release 10.2.0.1.0 - Production
                                CORE     10.2.0.1.0     Production
                                TNS for Linux: Version 10.2.0.1.0 - Production
                                NLSRTL Version 10.2.0.1.0 - Production

                                SQL>
                                • 13. Re: PRECONNECT vs BASIC TAF method
                                  Valentin Minzatu
                                  I wouldn't want that version in my production environment. try to bring it up to 10.2.0.5 ...
                                  In the meantime, I would like to test using srvctl modify command and see if that has any effect in your situation. Can you try that?