OutSystems Platform 9 - Configuring Oracle Connections

Configuring the OutSystems Platform 9 for Oracle

From release 9 and onwards, the OutSystems Platform supports Service Name, or TNS Name to connect to an Oracle database. As always, this configuration is done in the Configuration Tool.

When choosing the Service Name drop-down option, you'll have to fill the following fields:

  • Host: the name or IP of the database server;
  • Port: the TCP port number in which the database listens to. The default value for Oracle is 1521;
  • Service Name: is a string that represents the name of the Oracle database that you want to connect to.

When choosing the TNS Name drop-down option, you'll have to fill the following field:

  • TNS Name: (Transparent Network Substrate) is a simple name, that will resolve to a complex connect descriptor, that is configured in a file named tnsnames.ora.

This option will allow more advanced configurations.

Setting Up a TNS Name Configuration

1) Create an environment System variable called TNS_ADMIN and set its value to a folder of your choosing. The Oracle driver will use this variable to find the tnsnames.ora file that includes all TNS configurations for Oracle.

2) Create a file named tnsnames.ora in that folder.

3) Configure your TNS names file. Check Oracle's documenation to learn more.

Upgrading to OutSystems Platform 9

In OutSystems Platform 8 there was a configuration called Server Instance that accepted an EZConnect configuration. This value was on the form of:

  • HOST/ServiceNameOrSID, or
  • A TNS Name

If you are using a SID configuration, you'll have to change it. Either ask your DBA to provide you with a Service name, or if you really need to continue using an SID, you can upgrade it to a TNS name configuration.

Upgrading SID to TNS Name

  1. Configure the server for TNS Names usage (see below);
  2. Edit your tnsnames.ora file and create a new TNS configuration;
  3. Copy paste the following text to it:
      (ADDRESS = (PROTOCOL = TCP)(HOST = HOST)(PORT = 1521))
      (SID = ORACLE_SID)

Make sure that there is the initial spacing in the parentheses syntax, since Oracle is picky about it.

You are now ready to configure your Oracle connection in Configuration tool.

In the Configuration Tool check the configurations you had for the Service Instance.

The first part of the name before the slash, is the host information, and the second part, the SID.

Change your tnsnames.ora file to contain this SID.

In the OutSystems Configuration Tool, choose TNS Name for Naming method in the drop-down, and fill it with the name given in the tnsnames.ora

The OutSystems Platform is now configured to connect to your Oracle database using a TNS Name.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.