10g RAC use service to implement TAF

Source: Internet
Author: User
Tags taf sqlplus

As one of the key concepts in Oracle databases, service can be used properly to facilitate database management and improve database execution efficiency.

With service, Oracle can implement server side TAF to simplify the maintenance of the client. Next we will look at how to experiment with service to implement serve side TAF at 10 Gb RAC.

Use dbca to configure TAF

You can easily configure Server Side TAF through dbca





Now, the service configuration is complete. Let's verify it.

[[email protected] ~]# su - oracle[[email protected] ~]$ lsnrctl statusLSNRCTL for Linux: Version 10.2.0.5.0 - Production on 05-AUG-2014 21:46:10Copyright (c) 1991, 2010, Oracle.  All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))STATUS of the LISTENER------------------------Alias                     LISTENER_NODE1Version                   TNSLSNR for Linux: Version 10.2.0.5.0 - ProductionStart Date                05-AUG-2014 21:26:40Uptime                    0 days 0 hr. 19 min. 30 secTrace Level               offSecurity                  ON: Local OS AuthenticationSNMP                      OFFListener Parameter File   /u01/app/oracle/product/11.2.0/db/network/admin/listener.oraListener Log File         /u01/app/oracle/product/11.2.0/db/network/log/listener_node1.logListening Endpoints Summary...  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.131)(PORT=1521)))  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.100.31)(PORT=1521)))Services Summary...Service "+ASM" has 1 instance(s).  Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...Service "+ASM_XPT" has 1 instance(s).  Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...Service "PLSExtProc" has 1 instance(s).  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...Service "racdb" has 3 instance(s).  Instance "racdb", status UNKNOWN, has 1 handler(s) for this service...  Instance "racdb1", status READY, has 2 handler(s) for this service...  Instance "racdb2", status READY, has 1 handler(s) for this service...Service "racdbXDB" has 2 instance(s).  Instance "racdb1", status READY, has 1 handler(s) for this service...  Instance "racdb2", status READY, has 1 handler(s) for this service...Service "racdb_XPT" has 2 instance(s).  Instance "racdb1", status READY, has 2 handler(s) for this service...  Instance "racdb2", status READY, has 1 handler(s) for this service...Service "service1" has 1 instance(s).  Instance "racdb1", status READY, has 2 handler(s) for this service...The command completed successfully[[email protected] ~]$ sqlplus / as sysdbaSQL*Plus: Release 10.2.0.5.0 - Production on Tue Aug 5 21:46:23 2014Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing optionsSQL> show parameter serviceNAME     TYPE VALUE------------------------------------ ----------- ------------------------------service_names     string service1SQL> col name for a20SQL> col failover_method for a20SQL> col failover_type for a20SQL>  select name,failover_method,failover_type from dba_services;NAME     FAILOVER_METHOD  FAILOVER_TYPE-------------------- -------------------- --------------------SYS$BACKGROUNDSYS$USERSseeddataXDBseeddata.regress.rdbms.dev.us.oracle.comracdbXDBracdbservice17 rows selected.SQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing options[[email protected] ~]$ srvctl config service -d racdb -s service1 -aservice1 PREF: racdb1 AVAIL: racdb2 TAF: basic[[email protected] ~]$ srvctl config service -d racdbservice1 PREF: racdb1 AVAIL: racdb2


From the above results, we can see that the TAF configuration information (only the TAF method) will be stored in OCR by using dbca to configure the Service's TAF, and the service entry will be added to the database parameter file, in addition, the corresponding records are added to the data dictionary, but the TAF information in the data dictionary is empty and needs to be added separately, as shown in figure

SQL> begin  2  dbms_service.modify_service(  3  service_name=>'service1',  4  failover_method=>dbms_service.failover_method_basic,  5  failover_type => dbms_service.failover_type_select,  6  failover_retries => 180,  7  failover_delay => 5   8  );  9  end; 10  /PL/SQL procedure successfully completed.SQL> col name for a20SQL> col failover_method for a20SQL> col failover_type for a20SQL> select name,failover_method,failover_type from dba_services;NAME     FAILOVER_METHOD  FAILOVER_TYPE-------------------- -------------------- --------------------SYS$BACKGROUNDSYS$USERSseeddataXDBseeddata.regress.rdbms.dev.us.oracle.comracdbXDBracdbservice1     BASIC  SELECT7 rows selected.

You can also use srvctl to add a service.

[[email protected] ~]# srvctl add service -hUsage: srvctl add service -d <name> -s <service_name> -r "<preferred_list>" [-a "<available_list>"] [-P <TAF_policy>]    -d <name>           Unique name for the database    -s <service>        Service name    -r "<pref_list>"    List of preferred instances    -a "<avail_list>"   List of available instances    -P <TAF_policy>     TAF policy (NONE, BASIC, or PRECONNECT)Usage: srvctl add service -d <name> -s <service_name> -u {-r "<new_pref_inst>" | -a "<new_avail_inst>"}    -d <name>           Unique name for the database    -s <service>        Service name    -u                  Add a new instance to service configuration    -r <new_pref_inst>  Name of new preferred instance    -a <new_avail_inst> Name of new available instance    -h                  Print usage[[email protected] ~]# srvctl add service -d racdb -s service2 -r racdb1 -a racdb2 -P BASICPRKH-1014 : Current user root is not the same as oracle owner oracle of oracle home /u01/app/oracle/product/11.2.0/db.[[email protected] ~]# su - oracle[[email protected] ~]$ srvctl add service -d racdb -s service2 -r racdb1 -a racdb2 -P BASIC[[email protected] ~]$ srvctl config service -d racdb -aservice1 PREF: racdb1 AVAIL: racdb2 TAF: basicservice2 PREF: racdb1 AVAIL: racdb2 TAF: BASIC[[email protected] ~]$ sqlplus / as sysdbaSQL*Plus: Release 10.2.0.5.0 - Production on Tue Aug 5 22:16:43 2014Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing optionsSQL> show parameter serviceNAME     TYPE VALUE------------------------------------ ----------- ------------------------------service_names     string service1, racdbSQL> select name from dba_services;NAME----------------------------------------------------------------SYS$BACKGROUNDSYS$USERSseeddataXDBseeddata.regress.rdbms.dev.us.oracle.comracdbXDBracdbservice17 rows selected.

From this, we can see that the service added through srvct does not add the corresponding information in the database parameters and data dictionary.



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.