How To Create Services

SRVCTL SYNTAX

  • srvctl add service -d _db_unique_name -s service_name -r preferred_list [-a available_list] [-P TAF_policy]
  -d db_unique_name  Unique name for the database
  -s service_name    The service name
  -r preferred_list  The list of preferred instances
  -a available_list  The list of available instances
  -P TAF_policy      The TAF policy (NONE, BASIC, or PRECONNECT) 
                     The BASIC and PRECONNECT settings affect the content of the TNS string that Oracle generates

EXAMPLE COMMANDS

  • A load balanced service listening on both nodes:
      srvctl add service -d <database_name> -s <service_name> -r "<instance1>,<instance2>" -P BASIC
      srvctl start service -d <database_name> -s <service_name>
  • A service listening on node 1, but will fail over to node 2 if the preferred node fails:
      srvctl add service -d <database_name> -s <service_name> -r "<instance1>" -a "<instance2>" -P BASIC
      srvctl start service -d <database_name> -s <service_name>
  • A service listening on node 2, but will not fail over to node 1 if the preferred node fails:
      srvctl add service -d <database_name> -s <service_name> -r "<instance2>" -P BASIC
      srvctl start service -d <database_name> -s <service_name>
© copyright 2001-2014 ABCdba.com | all rights reserved