Oracle 11gr2 RAC service-side TAF configuration example

Source: Internet
Author: User
Tags taf

 

For more information, see the following blog:

Oracle racfailover details

Http://blog.csdn.net/tianlesoftware/article/details/5340788

 

How to configure Server Side transparentapplication failover [ID 460982.1]

 

 

1. Create tafservice

[Oracle @ db1 bin] $./srvctl add service-D orcl-s server_taf-R "orcl1, orcl2"-P basic

 

-- Here, orcl is the database name, And orcl1 and orcl2 are instance names.

 

2. Start the server_taf Service

[Oracle @ db1 bin] $./srvctl start service-D orcl-s server_taf

 

3. Check service running status

[Oracle @ db1 bin] $./srvctl config service-D orcl

Service name: server_taf

Service is enabled

Server pool: orcl_server_taf

Cardinality: 2

Disconnect: false

Service role: Primary

Management Policy: automatic

DTP transaction: false

AQ ha specifications: false

Failover type: None

Failover method: None

TAF failover retries: 0

TAF failover delay: 0

Connection Load Balancing goal: Long

Runtime Load Balancing goal: None

TAF Policy Specification: Basic

Edition:

Preferred instances: orcl1, orcl2

Available instances:

 

4. Confirm serviceid

 

SQL> select name, service_id from dba_services where name = 'server _ taf ';

 

Name service_id

--------------------------------------------------------------------------

Server_taf 3

 

5. Add parameters to the service:

SQL> execute dbms_service.modify_service (SERVICE_NAME => 'server _ taf '-
, Aq_ha_configurications => true-
, Failover_method => dbms_service.failover_method_basic-
, Failover_type => dbms_service.failover_type_select-
, Failover_retries = & gt; 180-
, Failover_delay => 5-
, Clb_goal => dbms_service.clb_goal_long );

 

6. Confirm parameter modification:

Col name format A15
Col failover_method format A11 heading 'method'
Col failover_type format A10 heading 'type'
Col failover_retries format 9999999 heading 'retries'
Col goal format A10
Col clb_goal format A8
Col aq_ha_ications ications format A5 heading 'aqnot'

 

SQL> select name, failover_method, failover_type, failover_retries, goal, clb_goal, aq_ha_ications ications from dba_services where service_id = 3;

 

Name method type retries goal clb_goal aqnot

-------------------------------------------------------------------

Server_taf basic select 180 none long Yes

 

SQL>

 

7. Check service registration:

 

[Oracle @ db1 bin] $ LSNRCTL services

 

LSNRCTL for Linux: Version 11.2.0.3.0-production on 15-jul-2012 13:26:43

 

Copyright (c) 1991,201 1, Oracle. All rights reserved.

 

Connecting to (description = (address = (Protocol = TCP) (host = db1) (Port = 1521 )))

Services summary...

Service "+ ASM" has 1 instance (s ).

Instance "+ ASM1", status ready, has 1 handler (s) for thisservice...

Handler (s ):

"Dedicated" Established: 57 refused: 0 state: Ready

Local Server

Service "orcl" has 1 instance (s ).

Instance "orcl1", status ready, has 1 handler (s) for thisservice...

Handler (s ):

"Dedicated" Established: 11 refused: 0 state: Ready

Local Server

Service "orclxdb" has 1 instance (s ).

Instance "orcl1", status ready, has 1 handler (s) for thisservice...

Handler (s ):

"D000" Established: 0 refused: 0 current: 0 MAX: 1022 state: Ready

Dispatcher <machine: db1, PID: 2167>

(Address = (Protocol = TCP) (host = db1.tianlesoftware.com) (Port = 38731 ))

Service "server_taf" has 1 instance (s ).

Instance "orcl1", status ready, has 1 handler (s) for thisservice...

Handler (s ):

"Dedicated" Established: 11 refused: 0 state: Ready

Local Server

The command completed successfully

 

 

8. The client can use service-sidetaf:

 

Configure TNS on the client:

Orcl =
(Description =
(Address = (Protocol = TCP) (host = orcl.tianlesoftware.com) (Port = 1521 ))
(CONNECT_DATA =

(Server = dedicated)

(SERVICE_NAME = server_taf)

)
)

-- Orcl.tianlesoftware.com is the scan IP address.

 

9. view the process status

[Oracle @ db1 bin] $./crs_stat-T

Name type target State host

------------------------------------------------------------

Ora. Data. DG ora... Up. type online db1

Ora. FRA. DG ora... Up. type online db1

Ora... er. lsnr ora... er. type online db1

Ora... n1.lsnr ora... er. type online DB2

Ora... n2.lsnr ora... er. type online db1

Ora... n3.lsnr ora... er. type online db1

Ora. OCR. DG ora... Up. type online db1

Ora. ASM ora. ASM. type online db1

Ora... sm1.asm application online db1

Ora... 01. lsnr application online db1

Ora...-01.gsd application offline

Ora...-01.ons application online db1

Ora...-01.vip ora... t1.type online db1

Ora... sm2.asm application online DB2

Ora... 02. lsnr application online DB2

Ora...-02.gsd application offline

Ora...-02.ons application online DB2

Ora...-02.vip ora... t1.type online DB2

Ora. cvu ora. cvu. type online db1

Ora. GSD ora. GSD. Type offline

Ora... network ora... rk. type online db1

Ora. Solaris ora. productname. type online db1

Ora. ONS ora. ons. type online db1

Ora. orcl. DB ora... se. type online db1

Ora... TAF. SVC ora... ce. type online db1

Ora. scan1.vip ora... IP. type online DB2

Ora. scan2.vip ora... IP. type online db1

Ora. scan3.vip ora... IP. type online db1

 

 

 

 

Bytes -------------------------------------------------------------------------------------------------------

All rights reserved. reprinted articles are allowed, but source addresses must be indicated by links. Otherwise, the documents will be held legally responsible!

Skype: tianlesoftware

QQ: tianlesoftware@gmail.com

Email: tianlesoftware@gmail.com

Blog: http://www.tianlesoftware.com

WEAVER: http://weibo.com/tianlesoftware

Twitter: http://twitter.com/tianlesoftware

Facebook: http://www.facebook.com/tianlesoftware

LinkedIn: http://cn.linkedin.com/in/tianlesoftware

 

 

------- Add a group to describe the relationship between Oracle tablespace and data files in the remarks section. Otherwise, reject the application ----

Dba1 group: 62697716 (full); dba2 group: 62697977 (full) dba3 group: 62697850 (full)

Super DBA group: 63306533 (full); dba4 group: 83829929 dba5 group: 142216823

Dba6 group: 158654907 dba7 group: 172855474 DBA group: 104207940

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.