Setting up Oracle connection

 

You can use an existing Oracle database to work with Lycia or you can create a new one. Here are the general instructions to be used for an Oracle database creation and connecting to it from Lycia.

 

Step 1

Install and configure the Oracle RDBMS. You must have the Oracle client installed regardless of whether you want to create a new database or to connect to an existing one

 

Step 2

Create a user under Oracle and provide the username and password by running the command ‘sqlplus’, and connect as a user with DBA privileges. Refer to Oracle documentation for the details on creating and managing a database

 

Step 3

Record the database connection details into the database.cfg file

 

Step 4

For the GUI server running an authenticated port, set the following environment variables in the inet.env file:

  • ORACLE_HOME = the installation directory of Oracle

  • ORACLE_SID = the default server instance for this connection

  • DBTEMP = the directory for storing temporary files

 

The inet.env file can be opened and edited using the Studio. To open it in LyciaStudio, go to Window-> Preferences -> 4GL -> Run/Debug -> GUI Servers, select the GUI server from the list and press the Edit Environment button.

 

Step 5

Set the database driver to "Oracle" as described here

 

 

 

 

Step 1

Install and configure the Oracle RDBMS. You must have the Oracle client installed regardless of whether you want to create a new database or to connect to an existing one

 

Step 2

Create a user under Oracle and provide the username and password by running the command ‘sqlplus’, and connect as a user with DBA privileges

 

Step 3

Set Lycia environment variables:

  • set the environment variables ORACLE_HOME (the installation directory of Oracle) and ORACLE_SID (the default server instance for this connection). You may also need to set DBTEMP (the directory for storing temporary files) variables. The values of the variables will be used only if the database will not be found in the database.cfg file;

  • set the same environment variables (as specified in step 3a) in the env.properties file. This file is located in $LYCIA_DIR\LyciaIDE\etc directory. The values of the variables will be used only if the database will not be found in the database.cfg file;

  • for the GUI server, set the same environment variables (as specified in step 3) in the inet.env file,

  • record the database connection details into the database.cfg file

 

Step 4

Set the database driver to "Oracle" as described here

 

 

 

Connecting to a database in GUI mode is rather tricky, if your application is running on an application server without authentication (i.e. default).

An application using this post is run as the service owner and this means that all database connections are using the same user ID. Thus it is advisable to use the full authentication port (secure)