Consultor Eletrônico



Kbase P11847: How to Connect Via ODBC to a Database on a VMS Machine in Version 8 or later.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/7/2009
Status: Verified

GOAL:

How to Connect Via ODBC to a Database on a VMS Machine in Version 8 or later.

FACT(s) (Environment):

Progress 7.x
Progress 8.x
MERANT 4.0 32-BIT Progress SQL-89

FIX:

1) Have service in the services file reserved for the OIBroker.

For VMS define services in sys$system:services.dat

Format of entry in this file is: servicename port#/tcp

Example: oibsrv 3500/tcp

Note: Same entry needs to be made in the services file on the
ODBC client machine (Windows/NT). Location of these files
varies per platform and TCP stack being used. Refer to
Progress Knowledge Base Solution 15578, "Where to put
Windows Services Protocols Hosts Files".

2) Ensure that the following environment variables are set on the
server and client machines: DLC, PATH, PROCFG, and PROMSGS.
On the server machine you will also need to set PROOIBRK and
PROOIDRV.

VMS Syntax: define/system prooibrk bin:_prooibk.exe
define/system prooidrv bin:_prooidv.exe

The client machine will also require IDLC and IPROMSGS.

Win/NT Syntax: SET IDLC=%DLC%
SET IPROMSGS=%DLC%\promsgs

3) OIBroker Configuration:

The OIBroker will reside either on the machine where the database
is running or on the machine where the ODBC drivers (Intersolv /
DataDirect Technologies) are loaded. The location will determine
the connection type to use.

If on the machine with the Database, it should be set to DIRECT.
If on the machine with Intersolv, it would be VIA SERVER.

DIRECT is more efficient because it attaches to the database
via shared memory. VIA SERVER connects to the database via
a server process. This means that the OIBroker communicates
to the database via the network using -H -S -N connection
parameters.

To start the OIBroker on the VMS server issue this command:

progress/oib=start/host=<host>/service=<oibsrv>
etwork=tcp

To start the OIBroker on the client where the ODBC drivers reside,
issue either of these commands:

oibrkr32.exe -SV -S oibsrv -H host -N TCP or
%PROOIBRK% -SV -S oibsrv -H host -N TCP

4) Configuring the DSN (Data Source Name):

General Tab:
Data Source name: Anything you want to use as identifier.
Database name: database name (without .db suffix)

OID/OIB Tab:
Protocol = TCP
Service name = oibsrv (Service OIBroker was started with)
Host name = hostname (Machine name were OIBroker is running)

Database Tab:
(if DIRECT connection)
Database Access Mode = Direct
Database path = Full pathname to database (MUST have either
trailing / or \ depending upon Operating
System being used.)

(if VIA SERVER connection)
Database Access Mode = Via Server
Protocol = TCP
Service Name = servicename (Service database was started with)
Host name = hostname (Machine name where database is running)

Advanced Tab - Normally not used unless user needs to pass
extra parameters to either the OIB/OID
connections or Database Connections.

Once you have your DSN configured, you can press Test Connect to
validate that you are able to make a connection to the database.

5) Use the DSN you configured when accessing the database from your
ODBC client package. (Example: Access, WinSQL etc...)

6) To shut down the OIBroker use the following command:

VMS Syntax:
progress/oib=shut/host=<host>/service=<oibsrv>
etwork=tcp

Windows/NT Syntax:
_mprshut -SV -S oibsrv -H host - N TCP or
proshut -SV -S oibsrv -H host -N TCP