The process that is usually followed, is to create the TNSNAMES.ora in the appropriate location on *every* SAP application server of the SAP system. Then put the TNS service name and username/password into the DBCO transaction within SAP.
There are a couple of downsides to this approach:
1, You generally have to put the TNSNAMES.ora file in /sapmnt/<SID> as this is already shared across the SAP system’s application servers.
2, You have to keep the TNSNAMES.ora file updated. Any changes require a complete restart of the SAP system in order for the file to be re-read.
This is where the Easy Connect string can be used.
Instead of entering the TNS service name into the DBCO transaction, you simply enter all the service details, removing the need for the TNSNAMES.ora file.
An example of the Easy Connect string is:
"tns-service:1521/servername.com"We are supposing that:
- “tns-service” is the TNS service name for your target database (listened for on the target Oracle listener)
- Port 1521 (default port) is used by the listener.
- The server on which the listener is located is servername.com.
You must include the double quotes in the DBCO entry.
Based on the above entry, you can then dynamically change the value as and when needed.
No need for a restart of the SAP application server.
Reference: SAP note: 808505 - Secondary connections to Oracle database