0

I'm not sure if what I'm trying to do is possible so I am here looking for guidance.

My goal is to set up a net service name in LDAP in such a way that it will serve 2 purposes using a DESCRIPTION_LIST It is also part of a DataGuard configuration:

  1. One DESCRIPTION will use a "virtual" service name, the service will only be up in one of the servers listed in the ADDRESS_LIST and clients will be able to connect to the net service name by way of this method.
  2. The other DESCRIPTION will be used to contact directly to a service

The first is for clients, it will allow a client to connect to which ever database is the current primary because that particular service will only ever be running on the server where the primary is.

The second is for allowing communication for archive log shipping.

Below is my attempt:

    apple=
 (DESCRIPTION_LIST=
  (DESCRIPTION=
  (FAILOVER=on)
   (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=TCP)(HOST=prim)(PORT=15940))
    (ADDRESS=(PROTOCOL=TCP)(HOST=sb)(PORT=15940)))
    (CONNECT_DATA=
     (SERVICE_NAME=virtual_apple)(FAILOVER_MODE=(TYPE=SESSION)(METHOD=basic))))

  (DESCRIPTION=
   (ADDRESS=(PROTOCOL=TCP)(HOST=prim)(PORT=15940))
   (CONNECT_DATA=
    (SERVICE_NAME=apple)(FAILOVER_MODE=(TYPE=SESSION)(METHOD=basic)))))

My thinking is that when a client tries to connect by way of sqlplus user/pw@apple the connection will first go to prim and check for virtual apple, if the service is not there it will then try the next address, sb. Then the second DESCRIPTION will allow for a more deliberate avenue which DataGuard will use for shipping archive logs.

I got this to work on all sides for a time but then things got muddled and it broke on me, I'm wondering if maybe theres some other parameter I need to define to prevent connections getting confused. Am I trying to do much?

exit_1
  • 1,240
  • 4
  • 13
  • 32

1 Answers1

0

This is the correct approach, you just have to create the service name with dbms_service.create_service in your database and register it at the listener using static database registration.