4.2. Oracle Database Connection #

The following configuration directives control the access to the Oracle database.

ORACLE_HOME #

Used to set ORACLE_HOME environment variable to the Oracle libraries required by the DBD::Oracle Perl module.

ORACLE_DSN #

This directive is used to set the data source name in the form of standard DBI DSN. For example:

dbi:Oracle:host=oradb_host.myhost.com;sid=DB_SID;port=1521

or

dbi:Oracle:DB_SID

On 18c, this could be for example:

dbi:Oracle:host=192.168.1.29;service_name=pdb1;port=1521

For the second notation, the SID should be declared in the file $ORACLE_HOME/network/admin/tnsnames.ora or in the path given to the TNS_ADMIN environment variable.

ORACLE_DSN ORACLE_PWD #

These two directives are used to define the user and password for the Oracle database connection. Note that if you can, it is better to log in as Oracle super admin to avoid grants problem during the database scan and be sure that nothing is missing.

If you do not supply a credential with ORACLE_PWD, and you have installed the Term::ReadKey Perl module, ora2pgpro will ask for the password interactively. If ORACLE_USER is not set, it will be asked interactively too.

To connect to a local Oracle instance with connections as SYSDBA, you have to set ORACLE_USER to / and an empty password.

USER_GRANTS #

Set this directive to 1 if you connect to the Oracle database as a simple user and do not have enough grants to extract things from the DBA_ tables. It will use tables ALL_ instead.

Warning: if you use the export type GRANT, you must set this configuration option to 0, or it will not work.

TRANSACTION #

This directive may be used if you want to change the default isolation level of the data export transaction. Default is to set the level to a serializable transaction to ensure data consistency. The allowed values for this directive are:

  • readonly: 'SET TRANSACTION READ ONLY',
  • readwrite: 'SET TRANSACTION READ WRITE',
  • serializable: 'SET TRANSACTION ISOLATION LEVEL SERIALIZABLE'
  • committed: 'SET TRANSACTION ISOLATION LEVEL READ COMMITTED',

ORA_INITIAL_COMMAND #

This directive can be used to send an initial command to Oracle, just after the connection, for example, to unlock a policy before reading objects or to set some session parameters. This directive can be used multiple times.