490 IBM OmniFind EE V8.4: Configuration and Implementation Scenarios
Figure C-1 Cloudscape database directory structure
Accessing crawler Cloudscape databases
The crawlers use the Cloudscape in embedded mode, and therefore only a
single process can access it at a time. Therefore, you need to stop the crawlers
to access a given database. These databases also do not have any user ID /
password associated with them.
A number of approaches are available to connect and navigate a Cloudscape
database, including the Cloudview GUI interface, the command-line interface
using the ij command, as described in “ij script overview” on page 485, and a
user-written program.
We use the command line interface to connect and query the crawler
Cloudscape database. In the following sections, we first describe the preparatory
work that is required, followed by access to the Cloudscape database and tables.
Appendix C. IBM OmniFind Enterprise Edition V8.4 control tables 491
Prepare the Cloudscape environment
As mentioned earlier, OmniFind accesses all the Cloudscape databases (crawler
or IMC) with no user ID / password, and the supported Cloudscape version ID
10.1. Therefore, the preparatory work required includes stopping all other access
to the Cloudscape database, modifying the ij.bat command, and modifying the
dblookup.bat command, as shown below
Stop access to all the Cloudscape databases
Stop the OmniFind crawler when you want to access the Cloudscape database
you want to access. This is not shown here.
Modify the ij.bat file
The ij.bat file is located in the c:\ibm\es\cloudscape\frameworks\embedded\bin\
directory. The commands to set the user ID / password should be commented
out, as shown in Example C-1. Also, modify the environment variables as
required.
Example: C-1 Modify the ij.bat file
@echo off
@if "%1" == "shortcut" set CLASSPATH=
@if "%1" == "shortcut" shift
set DERBY_INSTALL=C:\Program Files\IBM\es\cloudscape
set JAVA_HOME=C:\Program Files\IBM\es\_jvm\jre
@REM if "%DERBY_USER%" != "" set IJ_USER="-Dij.user=%DERBY_USER%"
@REM if "%DERBY_PASSWORD%" != "" set IJ_PASSWORD="-Dij.password=%DERBY_PASSWORD%"
@REM set PARAM="%IJ_USER% %IJ_PASSWORD%"
set OF_CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;%CLASSPATH%
@REM ---------------------------------------------------------
@REM -- start ij
@REM ---------------------------------------------------------
"%JAVA_HOME%\bin\java.exe" -cp "%OF_CLASSPATH%" %PARAM% -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij
@REM ---------------------------------------------------------
@REM -- To use a different JVM with a different syntax, simply edit
@REM -- this file
@REM ---------------------------------------------------------
492 IBM OmniFind EE V8.4: Configuration and Implementation Scenarios
Modify the dblook.bat file
The dblook.bat
1
file is located in the
c:\ibm\es\cloudscape\frameworks\embedded\bin\ directory. The commands to
set the user ID / password should be commented out, as shown in Example C-2.
Also, modify the environment variables as required. This command is used to list
the CREATE SQL statement for a given table in the Cloudscape database.
Example: C-2 Modify the dblook.bat file
..............................
set DERBY_INSTALL=C:\Program Files\IBM\es\cloudscape
set JAVA_HOME=C:\Program Files\IBM\es\_jvm\jre
@REM if "%DERBY_USER%" != "" set IJ_USER="-Dij.user=%DERBY_USER%"
@REM if "%DERBY_PASSWORD%" != "" set IJ_PASSWORD="-Dij.password=%DERBY_PASSWORD%"
@REM set PARAM="-DES_CFG=%ES_NODE_ROOT%/nodeinfo/es.cfg %IJ_USER% %IJ_PASSWORD%"
@REM set PARAM="%IJ_USER% %IJ_PASSWORD%"
set
OF_CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;%ES_INSTALL_ROOT%\lib\esctrl.jar;%CLASSPATH%
@REM ---------------------------------------------------------
@REM -- start dblook
@REM ---------------------------------------------------------
"%JAVA_HOME%\bin\java" -cp "%OF_CLASSPATH%" %PARAM% org.apache.derby.tools.dblook %*
Accessing the Cloudscape databases and tables
With the preparatory work done, we can proceed to identify the OmniFind tables
in a crawler database, determine the CREATE statement for a table, and list its
contents as follows.
The various crawler Cloudscape databases for our environment are shown in
Figure C-1 on page 490.
Invoke the ij environment and connect to a database
Example C-3 shows the establishment of the ij environment (by executing the
ij.bat command in the c:\ibm\es\cloudscape\frameworks\embedded\bin\
directory) and connection to a the crawler database
col_34035.QUICKPLACE_83590 (using the connect SQL statement).
Example: C-3 Invoke the ij environment and connect to a crawler database
C:\Program Files\IBM\es\cloudscape\frameworks\embedded\bin>ij.bat
ij version 10.1
ij> connect 'jdbc:derby:c:/progra~1/ibm/es/esadmin/data/cloudscape/omnifind_crawlers/col_34035.QUICKPLACE_83590';
ij>
1
dblook is used because the SQL DESCRIBE statement is not supported in Cloudscape Version
10.1.
Appendix C. IBM OmniFind Enterprise Edition V8.4 control tables 493
Identify OmniFind tables in the crawler database
After successfully connecting to the crawler database, as shown in Example C-3
on page 492, we can identify the OmniFind tables by executing the query shown
in Example C-4. The schema name of the OmniFind tables is ESADMIN.
Example C-4 shows four OmniFind tables in the QUICKPLACE crawler
database: CDSR, TDATAREC, TOPTDATA, and TSERVERREC.
Example: C-4 Identify OmniFind tables in this crawler database
ij> select schemaname, tablename from sys.systables a, sys.sysschemas b where a.schemaid=b.schemaid and
schemaname='ESADMIN';
SCHEMANAME TABLENAME
-------------------------------------------------------------------
ESADMIN CDSR
ESADMIN TDATAREC
ESADMIN TOPTDATA
ESADMIN TSERVERREC
4 rows selected

Get IBM OmniFind Enterprise Edition Version 8.4 Configuration and Implementation Scenarios now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.