You are on page 1of 19

Welcome to RDBMS Conversion learning unit of course Oracle Direct Connect

Drivers . In this learning unit, you will learn about creation of Tablespaces and users

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 1


After completing this learning unit, you will be able to:

Configure Driver
Testing the working of driver

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 2


A file called jedi_config will be created under the config directory of jbase . This file
physically holds the (encrypted) configuration parameters that the driver reads.
When we execute config-XMLORACLE utility, the information that we supply
related to database and user will be stored under this file.

From R10 onwards, this file gets created automatically

This file holds info like


T24 Release
Name of the Data Tablespace and Index Tablespace
User name and Password

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 3


When we execute config-XMLORACLE, it will display a menu with options.

The first option is database setting which is used to specify the data tablespace and
index tablespace

The second option is used to specify the oracle user name and password, which the
driver will be using to connect to oracle

The third option is used to run a script called install.sql (we will learn about this later)

After getting this setup done you can choose the fouth option to test whether we are
successfully able to connect to the external database using the driver.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 4


Now for jBASE to communicate to Oracle, we need to store the database settings in
jedi_config file.

1. You will choose option 1 to set the database settings.


2. In the database menu select option 3 to set database name.
3. You will choose option 4 on database menu to set the data tablespace name.
4. You will choose option 5 on database menu to set Index tablespace name.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 5


Well for jBASE to communicate to Oracle, we need to also store the Oracle user
details in jedi_config file. The jBASE system would use these user setting to push
data into Oracle database.

1. You will choose option 2 in main menu to get into User menu.
2. In user menu choose option 2 to set Oracle user name.
3. You will choose option 3 on User menu to set password for this user.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 6


Now having set the database and user setting, Let us test the connectivity between
jBASE and Oracle.

You will choose option 4 in main menu to check the connectivity between jBASE and
Oracle. If the option result in displaying system date and time you can be sure that
connectivity between jBASE and Oracle is fine. When it results in a error, you
need to double check the setting in config-XMLORACLE utility and the listener
configuration at Oracle.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 7


You have to execute a script called install.sql which will be present under the
$DRIVER_HOME/sql directory by choosing option 3

Executing install.sql script, will create the STUBFILES table in Oracle. Apart from
creating the STUBFILES table, this script will also create the JBASEXML package
that has a number of procedures which are used during read/write operations. The
procedures that are part of the JBASEXML package are:

PROCEDURE BLOB_INSERT ()
PROCEDURE BLOB_UPDATE ()
PROCEDURE XML_INSERT ()
PROCEDURE XML_UPDATE ()
FUNCTION Index_List ()

You will choose option 5 in the main menu to save the settings

You will choose option 6 in the main menu to save and exit

Note:

The table STUBFILE get screated when the script install.sql is executed. The data in

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 8


the table is populated during rdbms conversion which you will learn later in this course.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 8


Now that you have created two tablespaces and have defaulted these tablespaces to
TRGUSER, how do we double check it at Oracle level? Use the SELECT command to
view the default tablespaces assigned to TRGUSER.

Eg:
SELECT TABLESPACE_NAME FROM USER_TABLESPACES;

This will display the tablespace defaulted to this user.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 9


In order to check if the driver is communicating properly with Oracle and vice versa,
execute the following command – CREATE.FILE TRG.TEST TYPE=XMLORACLE
The above command has created one data file and one dict file. These files are of
data type XMLORACLE and storage type CLOB
The above command generates a jBASE stub-file (pointer device) that jBASE uses to
locate the actual data table in Oracle. You can see this and the Oracle details in
the statistics of the file.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 10


The command in the previous slide to create a file of type XMLORACLE generates
two Oracle tables TRG_TEST and D_TRG_TEST. These tables equate to the DATA
and DICTIONARY. Both tables have two columns; the first is the unique key for the
record and the second column holds that actual data in XML format.

To view the description of those tables created for TRG.TEST, use the command
DESC followed by table name.
To view the type of file and path of the stub file at T24, you can query STUBFILES
table.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 11


Now we have a table created inside Oracle, let us add some simple data into this
table using the jBASE Editor.

Once we have inserted data, let us query the table from sqlplus to view its content.
What we see on this screenshot is the content of the record – SAMPLE.RECORD. The
type of record is XML RECORD and the record id is SAMPLE.RECORD. The data is
stored within xml tags in column.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 12


When we try to create an XML-ORACLE type files, if the library path for the driver is
not set properly, then we could get an error message as shown

To fix this error: check if the environmental variable


LD_LIBRARY_PATH/LIBPATH/SHLIB_PATH is setup correctly.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 13


When we try to create a record in XML-ORACLE type files, if the T24 Oracle User is
not granted “execute” privilege on DBMS_LOCK, the given error is displayed.

To fix this error: The “execute” privilege on DBMS_LOCK must be


granted to the T24 Oracle User

Following steps are to be followed.

1. The Oracle supplied script catblock.sql must have been run in the database by the
DBA. This creates the Oracle DBA Lock Views.

2. The “execute” privilege on DBMS_LOCK must be granted to the T24 Oracle User.

To complete this, do the following using the sqlplus command line tool:
sqlplus sql> conn / as sysdba

sql> @$ORACLE_HOME/rdbms/admin/catblock.sql

sql> grant execute on dbms_lock to T24;

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 14


When we are configuring jedi_config file using the config-XMLORACLE utility, if we
have not correctly specified the data and index tablespaces or the user name and
password, then we are likely to get the above error message.

To fix this error: Check the database and User setting in jedi_config file and at Oracle
level check if the Oracle service and listener are running. It is also recommended to
check the listener setting.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 15


While creating file of type XMLORACLE, jBASE returns an error
JEDI_FILE_ILLEGAL_CMD.

To fix this error: Check the environmental variables associated with the driver
configuration, JBCOBJECTLIST does not include the location of the driver. This could
also be because TYPE=XMLORACLE is not specified correctly in the CREATE-FILE
command. jBASE was unable to find driver. As discussed earlier use jshow command
on XMLORACLEInit to find the location.

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 16


1. Config-XMLORACLE
2. No (T24 is build on JBasic)
3. False (Need to run rdbmsConversion)

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 17


In this learning unit, you learnt about Oracle direct connect drivers

You will now be able to:

Configure Driver
Test the working of the driver

CONV1.Direct Connect Drivers Oracle - General RDBMS Conversion-R15 18

You might also like