11gr2 RAC添加service


---添加服务
su -oracle

srvctl add service -d tyolap -s srv_kfpb2 -r tyolap2 -a tyolap1 -P basic -e select -m basic -z 180 -w 5

---查看服务的状态
srvctl start service -d tyolap -s srv_kfpb1

crsctl status resource -t

crsctl status resource ora.tyolap.srv_kfpb1.svc -t

srvctl status service -d tyolap

srvctl config service -d tyolap -s srv_kfpb1

[grid@dtydb4 ~]$ srvctl config service -d tyolap -s srv_kfpb1
Service name: srv_kfpb1
Service is enabled
Server pool: tyolap_srv_kfpb1
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: SELECT
Failover method: BASIC
TAF failover retries: 180
TAF failover delay: 5
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition:
Preferred instances: tyolap1
Available instances: tyolap2

--删除服务

srvctl remove service -d tyolap -s srv_kfpb2 -f

---查看服务注册情况
[oracle@dtydb3 ~]$ lsnrctl status


--配置客户端的连接tnsnames.ora

srv_kfpb1 =
  (DESCRIPTION =
    (LOAD_BALANCE = NO)
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.4.1.*)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.4.1.2)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.4.1.3)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.4.1.4)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = srv_kfpb1)
    )
  )
 
sqlplus test/test@tydb_kfpb1

你可能感兴趣的:(11gr2 RAC添加service)