I have a two node RAC database. I have created a server side service as below:
srvctl config service -d test -s testsrv Service name: test Server pool: Cardinality: 2 Disconnect: false Service role: PRIMARY Management policy: AUTOMATIC DTP transaction: false AQ HA notifications: true Global: false Commit Outcome: false Failover type: SESSION Failover method: TAF failover retries: 180 TAF failover delay: 5 Connection Load Balancing Goal: LONG Runtime Load Balancing Goal: NONE TAF policy specification: BASIC Edition: Pluggable database name: Maximum lag time: ANY SQL Translation Profile: Retention: 86400 seconds Replay Initiation Time: 300 seconds Session State Consistency: GSM Flags: 0 Service is enabled Preferred instances: test1,test2 Available instances:
Tnsnames.ora (Is this right on the server side?):
TEST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = testsrv-scan.idfcbank.com)(PORT = 1653)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TEST) ) ) testsrv = (DESCRIPTION = (LOAD_BALANCE = ON) (FAILOVER = ON) (ADDRESS = (PROTOCOL = TCP)(HOST = testsrv-scan.idfcbank.com)(PORT = 1653)) (CONNECT_DATA = (SERVICE_NAME = testsrv) (FAILOVER_MODE = (TYPE = SELECT) (METHOD = BASIC) (RETRIES = 180) (DELAY = 5) ) ) )
While I connect to the database using the service which I created through sql developer and I run the below query it says it is connected by service which I created but failover_type,failover_method,failed_over is NONE
Why is it that way?
1* select inst_id,username,service_name,failover_type,failover_method,failed_over from gv$session where username='SYS'
INST_ID USERNAME SERVICE_NAME FAILOVER_TYPE FAILOVER_M FAI
1 SYS SYS$USERS NONE NONE NO 1 SYS SYS$USERS NONE NONE NO 1 SYS SYS$USERS NONE NONE NO 1 SYS SYS$USERS NONE NONE NO 1 SYS testsrv NONE NONE NO 2 SYS SYS$USERS NONE NONE NO 2 SYS SYS$USERS NONE NONE NO 2 SYS SYS$USERS NONE NONE NO
DB Unique name
NAME TYPE VALUE db_unique_name string test
Service name from sho parameter service
SQL> show parameter service
service_names string test
DB_unique_name and service name is one and the same.
As per MOS, I should create the service in this format:
srvctl add service -d <db_unique_name> -s <service_name>
So should I create a service like below or is the service which I created above is fine?
srvctl add service -d test -s test - ?