Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: RAC problem, TAF in primary/secondary role?

Re: RAC problem, TAF in primary/secondary role?

From: tomi wijanto <restomi_w_at_yahoo.com>
Date: Mon, 25 Oct 2004 09:28:40 -0700 (PDT)
Message-ID: <20041025162840.4825.qmail@web52010.mail.yahoo.com>


sorry for the typos in my posting before, i just said 'tnsnames.ora in server' as 'listener.ora in server'. Let me repost tnsnames and listener file in db server.

listener.ora in db server:


LISTENER_RAC =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
(ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER_A)(PORT = 1522))

      )

(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = rac_1)) )

    )
  )

SID_LIST_LISTENER_RAC =
  (SID_LIST =
    (SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME =

/home/oracle/app/oracle/product/920)

(PROGRAM = extproc)

    )
    (SID_DESC =
(ORACLE_HOME =

/home/oracle/app/oracle/product/920)

(SID_NAME = mydb1)

    )
  )

tnsnames.ora in db server


--for mydb1
LISTENER_RAC1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER_A)(PORT = 1522))
  )

--for mydb2
LISTENER_RAC2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = SERVER_B)(PORT = 1522))
  )

--for both remote listener
LISTENER_RAC =
  (DESCRIPTION =
    (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =

SERVER_A)(PORT = 1522))

(ADDRESS = (PROTOCOL = TCP)(HOST =
SERVER_B)(PORT = 1522)) )

  )

regards,
tomi

> Hi,
> 
> i have tested it again, and now failover back and
> forth between instance is working.
> Before in tnsnames, i use INSTANCE_ROLE of PRIMARY
> for
> primary connection, and SECONDARY for backup
> connection.
> Now i change both of them to ANY. But, i'm still not
> sure if this is the best way, because in all samples
> i
> found, they use PRIMARY and SECONDARY instead of
> ANY.
> 
> tnsnames.ora in client
> ------------------
> MYDB_PRI =
>   (DESCRIPTION =
>     (LOAD_BALANCE=off)(FAILOVER=on)
>     (ADDRESS_LIST =
>       (ADDRESS = (PROTOCOL = TCP)(HOST =
> SERVER_A)(PORT = 1522))
>       (ADDRESS = (PROTOCOL = TCP)(HOST =
> SERVER_B)(PORT = 1522))
>     )
>     (CONNECT_DATA =
>       (SERVICE_NAME = mydb)
>       (INSTANCE_ROLE = ANY)  # PRIMARY ??
>       (SERVER = DEDICATED)
>       (FAILOVER_MODE =
>          (type=select)(method=basic)
>          (backup=MYDB_SEC)
>       )
>     )
>   )
> 
> MYDB_SEC =
>   (DESCRIPTION =
>     (LOAD_BALANCE=off)(FAILOVER=on)
>     (ADDRESS_LIST =
>       (ADDRESS = (PROTOCOL = TCP)(HOST =
> SERVER_B)(PORT = 1522))
>       (ADDRESS = (PROTOCOL = TCP)(HOST =
> SERVER_A)(PORT = 1522))
>     )
>     (CONNECT_DATA =
>       (SERVICE_NAME = mydb)
>       (INSTANCE_ROLE = ANY)  # SECONDARY ?? 
>       (SERVER = DEDICATED)
>       (FAILOVER_MODE =
>          (type=select)(method=basic)
>          (backup=MYDB_PRI)
>       )
>     )
>   )
> 
> init.ora
> --------
> mydb1.LOCAL_LISTENER = LISTENER_RAC1
> mydb2.LOCAL_LISTENER = LISTENER_RAC2
> mydb1.REMOTE_LISTENER = LISTENER_RAC
> mydb2.REMOTE_LISTENER = LISTENER_RAC
> 
> listener.ora in server
> ------------------
> LISTENER_RAC1 =
>   (DESCRIPTION =
>     (ADDRESS = (PROTOCOL = TCP)(HOST =
> SERVER_A)(PORT
> = 1522))
>   )
> 
> LISTENER_RAC2 =
>   (DESCRIPTION =
>     (ADDRESS = (PROTOCOL = TCP)(HOST =
> SERVER_B)(PORT
> = 1522))
>   )
> 
> LISTENER_RAC =
>   (DESCRIPTION =
>     (ADDRESS_LIST =
>       (ADDRESS = (PROTOCOL = TCP)(HOST =
> SERVER_A)(PORT = 1522))
>       (ADDRESS = (PROTOCOL = TCP)(HOST =
> SERVER_B)(PORT = 1522))
>     )
>   )
> 
> regards,
> tomi
> 
> --- Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
> wrote:
> 
> > 
> > 
> > Given that you weren't aware of the 
> > primary/secondary option, it seems
> > likely that you haven't configured the
> > tnsnames.ora file, two listener.ora files 
> > and spfile to make best use of the configuration.
> > Look of INSTANCE_ROLE in the RAC
> > manuals, and primary/secondary.
> > 
> > I wouldn't normally expect to do a normal
> > shutdown on a RAC instance to test failover,
> > by the way, so I've only played around with
> > shutdown abort - which obviously wouldn't
> > result in a  "shutdown in progress" error.
> > 
> > If you want to post the relevant bits of the
> > listener and tnsnames files I'll take a quick
> > look to see if I can spot the problem.
> > 
> > Regards
> > 
> > Jonathan Lewis
> > 
> > http://www.jlcomp.demon.co.uk/faq/ind_faq.html
> > The Co-operative Oracle Users' FAQ
> > 
> > http://www.jlcomp.demon.co.uk/seminar.html
> > Optimising Oracle Seminar - schedule updated Sept
> > 19th
> > 
> > 
> > 
> > 
> > 
> > ----- Original Message ----- 
> > From: "tomi wijanto" <restomi_w_at_yahoo.com>
> > To: <oracle-l_at_freelists.org>
> > Sent: Friday, October 22, 2004 9:55 AM
> > Subject: Re: RAC problem, TAF in primary/secondary
> > role?
> > 
> > 
> > Hi,
> > 
> > i have tested the primary / secondary role, and i
> > found some differences when using TAF.
> > 
> > For example when NOT using active_instance_count,
> > first i connect to instance A, and then i shutdown
> > instance A. From the same session, i check that it
> > was
> > failed over to instance B (select * from
> > v$instance).
> > Then i startup instance A and shutdown instance B.
> > It
> > also failed over back to instance A.
> > 
> > But when i use prim/second role, failover didn't
> > worked. I always get error message 'shutdown in
> > process' or 'disconnected'.
> > So, does TAF not work in this kind of setting? The
> > only failover that is success is for
> > connection/logon
> > time.
> > 
> > regards,
> > tomi



		
_______________________________

Do you Yahoo!?
Declare Yourself - Register online to vote today! http://vote.yahoo.com
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Oct 25 2004 - 11:24:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US