Skip to main content

Command Palette

Search for a command to run...

Legacy Clients on 19c

Updated
2 min read

We've just migrated one of the last databases to 19c. The main area of concern for the client was that they were using rather old embedded devices, which had 11g client libraries and connect strings baked into their firmware.

Here's the list of the main “tricks” we used to make it work.

Allowed Logon Version

These are the settings from sqlnet.ora:

SQLNET.ALLOWED_LOGON_VERSION_CLIENT=11
SQLNET.ALLOWED_LOGON_VERSION_SERVER=11

The _CLIENT one sets the minimum authentication protocol version that clients connecting to this database must use. And the _SERVER one sets the minimum authentication protocol that the database will use when acting as a client.

So, now the old clients are allowed to connect.

Just be also aware that allowing older protocols also means allowing weaker protocols.

USE_SID_AS_SERVICE

In most cases, you want clients to use service name rather than SID when connecting to a specific PDB. This is because if you connect using SID= to $ORACLE_SID, then you’ll be connected to CDB$ROOT and not to the PDB (which is usually the intention).

But in this case, the client was an embedded device with a hardcoded connect string - so changing the tnsnames.ora or the connect string itself to use service name instead of SID was not an option.

We can convince the listener to consider SIDs as service names by setting the following parameter in listener.ora:

USE_SID_AS_SERVICE_LISTENER = ON

Static Listener Service

However, there is a complication when the database is also using db_domain. This domain becomes the suffix to every service name that our database is using.

One way around this is to create a static listener.ora entry like this:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = sfx)
      (ORACLE_HOME = /oracle/db_se/19.28.0/dbhome_1)
      (SID_NAME = sfxc)
      (SERVICE_NAME = sfx.example.com)
    )
  )

This will create a new service in the listener called sfx. It is also the SID used by our embedded client.

(SID_NAME = sfxc) is the actual $ORACLE_SID that is running from $ORACLE_HOME. And since we want to connect to a specific PDB, we can also specify the default service name for this particular PDB, which in this example is (SERVICE_NAME = sfx.example.com).

References