Kbase P10296: How to establish an ODBC connection using SQL-89
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/4/2003 |
|
Status: Unverified
GOAL:
How to establish an ODBC connection with SQL-89
FIX:
In order to connect a Progress DB using ODBC with SQL-89 it is necessary to have a DataDirect (Merant) ODBC driver license and start an OIB (Open Interfase broker). Follow the steps to connect the OIB with the ODBC driver.
1. Make sure that they have a service configured For the OIBroker. Check the services file for this.
2. Set environment variables for server machine.
NT - Set PROOIBRK=%dlc%\bin\oibrkr32.exe
NT - Set PROOIDRV=%dlc%\bin\oidrvr32.exe
UNIX - PROOIBRK=$DLC/bin/_prooibrk;export PROOIBRK
UNIX - PROOIDRV=$DLC/bin/_prooidrv;export PROOIDRV
3. Environment variables for client machine.
SET IDLC=%DLC%
SET IPROMSGS=%DLC%\promsgs
4. Select the type of OIB connection. The OIBroker will reside either on the
machine where database is running or on the machine where the ODBC drivers (Intersolv) are loaded. Its location will determine the connection type to use.
- If on the machine with the DB it should be set to DIRECT
- If on the machine with Intersolv it has to be VIA SERVER
You will need a Progress client on the OIB/OID machine if you would
like to connect VIA SERVER.
If possible try to make a DIRECT connection, this will reduce the network
traffic.
It is the OID (Open Interfase driver) that connects to the DB server, the OIB is a broker that spawns an OID from each request/user, depending on how the request is done.
The difference between a DIRECT and VIA SERVER connection is related to
the way the OID is attached to the Database, via shared memory or trough
a remote connection (using the network connection parameters -H -S -N).
5.- Starting the Broker: (either line for each OS is valid)
NT - oibrkr32.exe -SV -S oibsrv -H host -N TCP
NT - PROOIBRK -SV -S oibsrv -H host -N TCP (this requires PROOIBRK to
be set as an environment setting of the system.)
UNIX - _prooibk -SV -S oibsrv -H host -N TCP
UNIX - $PROOIBRK -SV -S oibsrv -H host -N TCP
To stop the OIBroker use:
UNIX/NT - _mprshut -SV -S oibsrv -H host - N TCP
UNIX/NT - proshut -SV -S oibsrv -H host -N TCP
6. DataSource Setup:
General Tab - Give the DataSource a name and enter in the
database name (leave the .db extension off)
OID/OIB Tab - Protocol = TCP
Service name = oibsrv (service OIB was started)
Host name = host
Database Tab (if DIRECT connection)
Database Access Mode = Direct
Database path = path to db (MUST have either trailing /
or \ depending upon OS.)
Database Tab (if VIA SERVER connection)
Database Access Mode = Via Server
Protocol = TCP
Service Name = dbsrv (service DB was started)
Host name = host
Advanced Tab - Normally not used unless user needs to pass
extra parameters to either the OIB/OID
connections or the Database Connections.
7. Testing the Connection (using Access)
- Start Access and open a Database
- Click NEW and then Import Table
- Got to FILES OF TYPE and hit the down arrow until you can \
select ODBC Databases()
- Click on the Machine Data Source tab and select the DSN you
created.
- You will get the logon screen. If your database does
not use Username and passwords, hit enter, otherwise enter
them here and then click OK
- You should then be presented with the list of tables from the
Database. Now is connected.