0

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?

  • Query:

      1* select inst_id,username,service_name,failover_type,failover_method,failed_over from gv$session where username='SYS'
    

    SQL> /

    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 - ?
6
  • What does your gv$session query say when you connect as a normal user, rather than sys? – Philᵀᴹ Dec 6 '16 at 12:05
  • @Philᵀᴹ same message. NONE. I created a new user and tested it. – tesla747 Dec 6 '16 at 12:13
  • 1
    I think that is expected for (method=basic), try changing that to preconnect and you will most likely see difference in the output of your sql. Were you expecting something else? – Raj Dec 6 '16 at 12:24
  • @Raj Oh alright. Can you also help with the tnsnames.ora query whether that is right on server side and also the last query? – tesla747 Dec 6 '16 at 12:27
  • @Raj I have some more queries, could you help me clarifying that as well? – tesla747 Dec 7 '16 at 6:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.