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:
When choosing the TNS Name drop-down option, you'll have to fill the following field:
This option will allow more advanced configurations.
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.
In OutSystems Platform 8 there was a configuration called Server Instance that accepted an EZConnect configuration. This value was on the form of:
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.
(ADDRESS = (PROTOCOL = TCP)(HOST = HOST)(PORT = 1521))
(SID = ORACLE_SID)
(SERVER = DEDICATED)
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.