Manual Service configuration.

Source: Internet
Author: User
Tags taf
When using srvctl to create a service, note that the TAF policy option must be configured through the dbms_service package. The following example demonstrates how to create a service felix_ora: 1. view the existing service of the system before creating the service: SQLshowparameterserviceNAMETYPEVALUE -------------------------------------------

When using srvctl to create a service, note that the TAF policy option must be configured through the dbms_service package. The following example demonstrates how to create a service felix_ora: 1. view the existing service of the system before creating the service: SQL show parameter service NAME TYPE VALUE -------------------------------------------

When using srvctl to create a service, note that the TAF policy option must be configured through the dbms_service package. The following example demonstrates how to create a service felix_ora:

1. view the existing service of the system before the creation:

SQL> show parameter service

NAME TYPE VALUE

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

Service_names string felix

SQL>

2. Use srvctl to create the felix_ora service;

[Oracle @ felix1 ~] $ Srvctl add service-d felix-s felix_ora-r felix1-a felix2-P BASIC

[Oracle @ felix1 ~] $

[Oracle @ felix1 ~] $ Srvctl config service-d felix-

Felix_ora PREF: felix1 AVAIL: felix2 TAF: BASIC

[Oracle @ felix1 ~] $ Srvctl status service-d felix

Service felix_ora is not running.

[Oracle @ felix1 ~] $

3. confirm that the service is successfully created. The following red part indicates that the service has been registered to CRS as a CRS Resource, but it has not been started yet.

[Oracle @ felix1 ~] $ Crs_stat-t-v

Name Type R/ra f/FT Target State Host

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

Ora. felix. db application 0/0 0/1 ONLINE felix1

Ora... x1.inst application 0/5 0/0 ONLINE felix1

Ora... x2.inst application 0/5 0/0 ONLINE felix2

Ora... _ ora. cs application 0/0 0/1 OFFLINE

Ora... ix1.srv application 0/0 0/0 OFFLINE

Ora... SM1.asm application 0/5 0/0 ONLINE felix1

Ora... X1.lsnr application 0/5 0/0 ONLINE felix1

Ora. felix1.gsd application 0/5 0/0 ONLINE felix1

Ora. felix1.ons application 0/3 0/0 ONLINE felix1

Ora. felix1.vip application 0/0 0/0 ONLINE felix1

Ora... SM2.asm application 0/5 0/0 ONLINE felix2

Ora... X2.lsnr application 0/5 0/0 ONLINE felix2

Ora. felix2.gsd application 0/5 0/0 ONLINE felix2

Ora. felix2.ons application 0/3 0/0 ONLINE felix2

Ora. felix2.vip application 0/0 0/0 ONLINE felix2

[Oracle @ felix1 ~] $

4. Configure Automatic Service Startup

[Oracle @ felix1 ~] $ Srvctl enable service-d felix-s felix_ora

PRKP-1018: Service felix_ora already enabled.

[Oracle @ felix1 ~] $

5. Start this service

[Oracle @ felix1 ~] $ Srvctl start service-d felix-s felix_ora

[Oracle @ felix1 ~] $

[Oracle @ felix1 ~] $ Srvctl status service-d felix-s felix_ora

Service felix_ora is running on instance (s) felix1

[Oracle @ felix1 ~] $

6. Confirm the service status;

[Oracle @ felix2 ~] $ Crs_stat-t-v

Name Type R/ra f/FT Target State Host

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

Ora. felix. db application 0/0 0/1 ONLINE felix1

Ora... x1.inst application 0/5 0/0 ONLINE felix1

Ora... x2.inst application 0/5 0/0 ONLINE felix2

Ora... _ ora. cs application 0/0 0/1 ONLINE felix1

Ora... ix1.srv application 0/0 0/0 ONLINE felix1

Ora... SM1.asm application 0/5 0/0 ONLINE felix1

Ora... X1.lsnr application 0/5 0/0 ONLINE felix1

Ora. felix1.gsd application 0/5 0/0 ONLINE felix1

Ora. felix1.ons application 0/3 0/0 ONLINE felix1

Ora. felix1.vip application 0/0 0/0 ONLINE felix1

Ora... SM2.asm application 0/5 0/0 ONLINE felix2

Ora... X2.lsnr application 0/5 0/0 ONLINE felix2

Ora. felix2.gsd application 0/5 0/0 ONLINE felix2

Ora. felix2.ons application 0/3 0/0 ONLINE felix2

Ora. felix2.vip application 0/0 0/0 ONLINE felix2

[Oracle @ felix2 ~] $

It indicates that all instances have been started;

The new service is automatically added to the initialization parameter file:

SQL> show parameter service

NAME TYPE VALUE

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

Service_names string felix, felix_ora

SQL>

7. To modify the TAF configuration of the service, you must use dbms_service.modify_service.

Begin

Dbms_service.modify_service (service_name => 'Felix _ ora ',

Failover_method => dbms_service.failover_method_basic,

Failover_type => dbms_service.failover_type_select,

Failover_retries = & gt; 180,

Failover_delay => 5 );

End;

/

PL/SQL procedure successfully completed.

8. Confirm to take effect

Set lines 1000 pages 1000

Col name for a50

Col clb_goal for a15

Col FAILOVER_METHOD for a15

Col failover_type for a20;

SQL> selectname, failover_method, failover_type, clb_goal from dba_services;

NAME FAILOVER_METHOD FAILOVER_TYPE CLB_GOAL

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

SYS $ BACKGROUND SHORT

SYS $ USERS SHORT

SeeddataXDB LONG

Seeddata.regress.rdbms.dev.us.oracle.com LONG

FelixXDB LONG

Felix LONG

Taf_server LONG

Taf_srvctl LONG

Felix_ora BASIC SELECT LONG

9 rows selected.

[Oracle @ felix1 ~] $ Srvctl config service-d felix-

Felix_ora PREF: felix1 AVAIL: felix2 TAF: BASIC

[Oracle @ felix1 ~] $

[Reference RAC-Zhang Xiaoming]

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.