Kbase P8291: How to configure DataDirect Technologies ODBC SQL89 w/ Windows Client and Windows Server
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  24/02/2009 |
|
Status: Verified
GOAL:
How to configure ODBC SQL89 for Progress.
FACT(s) (Environment):
MERANT 3.50 32-BIT PROGRESS
MERANT 3.60 32-BIT PROGRESS
MERANT 3.70 32-BIT PROGRESS
MERANT 4.00 32-BIT PROGRESS
Windows NT 32 Intel/Windows 2000
Windows
Progress 8.x
Progress 9.x
FIX:
Part 1.
A. Take note of how the database is currently started.
The current startup might be similar to the following:
_mprosrv.exe databasename -H hostname -S servicename1 -N TCP
Hostname is the name of the Windows NT, Win2000 or XP server machine.
Servicename1 is an entry in the services file that is associated with a port name / number.
For a personal Database ODBC will work using a local connection only.
Please start the personal Database using no connection parameters.
Example:
_mprosrv.exe databasename
B. Starting the OIBroker
The OIBroker is a listener that waits for a 3rd party ODBC client (i.e. your non-progress application) to call to it.
At that point, the OIBroker spawns an OIDriver to complete the connection to the database.
Only one OIBroker is needed on a system.
It doesn't matter how many databases, the OIBroker is functioning as a listener and relay point.
(NOTE: Most configurations will start the OIBroker on the same machine as the database and will therefore make a direct
connection (shared memory connection) to the database. There are a few situations that require the OIBroker to run on a
different machine, or to make a remote connection to the database.
Skip to Alternate configurations below for more information before continuing if either of these two exceptions are necessary.
Set the following environment variables.
These will be set up on the machine where the OI Broker will be running:
DLC=<path to dlc>
prooibrk=<path to dlc>\bin\oibrkr32.exe
prooidrv=<path to dlc>\bin\oidrvr32.exe
In the above example <path to dlc> is replaced by the actual path.
To set them, go to the System Icon in the Control Panel and click on
the Environment tab. Set them as System Environment Variables -
NOT the User Environment Variables.
If there are multiple versions of Progress on the system it would be advisible to
create a script file with these environment variables and launch the
OIBroker from this script.
Now, make another entry in the services file, associated with a different port number for the OIBroker,
for example servicename2.
(NOTE: This SAME EXACT entry will need to be made to the services file on the PC client machine also.)
To actually start the OIBroker use the following command:
<path to dlc\bin>oibrkr32.exe -SV -S servicename2 -H hostname -N TCP
In the above example <path to dlc\bin> is replaced by the actual path.
Verify that it started successfully by starting the NT task manager and verifying that there is an oibrkr32 process
in the process list.
C. Shutting down the OIBroker
**DO NOT shut the OIBroker down now**
The instructions are given here for completeness.
<path to dlc\bin>_mprshut.exe -SV -H hostname -S servicename2 -N tcp
In the above example the -H, -S values are the same ones used when the OIBroker was started.
Part 2. The PC Client
A.
Set the following environment variables on the
PC client:
DLC=<path to dlc>
PROMSGS=<path to dlc>\promsgs
IDLC=<path to dlc>
IPROMSGS=<path to dlc>\promsgs
In the above example <path to dlc> is replaced by the actual path.
If the PC client is Windows 95, 98 or Me the above variables should be set in the autoexec.bat file using the set command,
and then reboot the pc.
If the PC client is Windows NT or Win2000, go to the System Icon in the control panel and click on the Environment tab.
Set them as system environment variables NOT User Environment Variables.
NOTE: With the release of the "MERANT 4.00 32-BIT PROGRESS" ODBC driver the PATH environmnet variab.le MUST include:
<path to dlc>\bin
B.
Make an entry in the services file on this PC client machine, for the OIBroker. (See knowledgebase KB17365 or more information
on the services file) It has to be exactly the same as the entry made on the database machine for the OIBroker, for example same
name, and port number.
Part 3. Configuring the ODBC Datasource
You will now define your ODBC Datasource using the ODBC Administrator. The ODBC Administrator can be accessed from
the control panel by using the ODBC-32 icon.
One datasource will be needed for each database you will connect to.
Therefore if for example a non-progress application needs to connect to three Progress databases, three
distinct datasources will be needed.
Within the administrator, click Add, and select the MERANT 3.70 (3.50 or 3.60) 32-BIT Progress driver.
Do NOT select the SQL-92 driver unless your target database is version 9 or higher in which case the OIBroker and OIDriver are likely not necessary.
Click Finish and begin configuring the new datasource.
A. General Tab
Only two fields are necessary on the General tab:
The datasource name and the database name.
Assign a name to the datasource, it can be anything but something identifiable or memorable should be used.
Type the name of the database in the database name field (for example, sports).
B. OID/OIB Options Tab
The three entries on this screen, are the same three network parameters used when starting the OIBroker in Part 1 or 2
above.
Protocol will be TCP.
Service Name is the same -S value used when starting the OIBroker servicename2 from the example.
Host name is the name of the machine that the OIBroker is running on.
C. Database Options Tab
This screen refers to how the OIDriver will connect with the database. Because the OIBroker (and OIDrivers spawned) are on
the same machine as the database, use DIRECT for Database Access.
Database Path refers to the path on the server machine where the database is located.
As an example, if the database resides on an Windows NT or Win2000 machine in directory c:\progress\dbs then the database path here will be
c:\progress\dbs\
*** BE SURE TO PUT THE trailing \ on the database path! ***
Operating system can be set to ignore for all platforms.
D. Advanced Tab
There is nothing on this form that is required to be filled in.
Click OK. This completes the definition of the ODBC Datasource and you should now be able to use your non-progress application
to connect to the Progress database via the ODBC.
Part 4. Alternate Configurations
Unless a non-standard configuration is needed do not go forward with the directions
that follow.
Most configurations will start the OIBroker on the same machine as the database and will therefore make a direct
connection (shared memory connection) to the database. There are a few situations that require the OIBroker to run on a
different machine, or to make a remote connection to the database.
The specifics of these situations will not be discussed here.
After reviewing the specifics below, start back at Part 1, and proceed through Parts 1-4 making the noted changes
below.
A.
If it is necessary to have the OIBroker running on a machine other than the database machine:
Part 1B (or 2B) will be performed on the "different machine".
For example, if the OIBroker has to run on the pc client the environment variables prooibrk and prooidrv need be set
(appropriately for the version of windows), the service name for the OIBroker needs be made to the services file on the pc,
and then the OIBroker can .be started.
This scenario will then require that the OIBroker make a remote connection to the database, so follow the steps in B below.
B.
If the OIBroker (& OIDriver) needs to make a remote connection to the database, Part 4C above would read as follows:
Database Options Tab
This screen refers to how the OIDriver will connect with the database. Because the OIBroker (and OIDrivers spawned) are not
on the same machine as the database, use VIA SERVER for Database Access, and specify the network protocols used when starting the database:
Protocol will be TCP.
Service Name is the same -S value used when starting the
database (servicename1 from the example).
Host Name will be the -H value used when starting the database..