Hi all,
just FYI: This small cookbook intends to show all SharePlex users of
you, how to use your shadow systems for reporting issues with ODBC
instead of just to be there and give you the feeling of having an
uptodate backup system ...
For all who don't know what SharePlex (shadowing only) is and are
interested, the first part gives you a brief description.
Holger Wiemann
HP Response Center, Germany
(Of course SharePlex (Quest's netbase) is supported by HP also!)
Here we go ...
How to access shadow TurboImage databases (SharePlex/iX) with ODBC (16
bit)!
SharePlex/iX shadowing, how it works:
-------------------------------------
SharePlex/iX gives you the ability to 'shadow/mirror' files and
databases from a master system to a shadow system for high availability
reasons. For that all database and file intrinsics are intercepted by
the NETBASE SHELL (modified XL.PUB.SYS, SL.PUB.SYS), producing events in
the central message file NBM.IPC.NETBASE on the master system, read and
transmitted by the NBEXPORT process on the master, received and written
from the NBIMPORT to a message queue file IQ######.QUEUE.NETBASE at the
shadow side and there read and distributed by the NBPOST process.
Here, we only look at TurboImage files, short draft of data flow
(files in capital letters):
------------
master system shadow system
... ------------LAN----------- ...
^ |
| v
nbexport nbimport
^ |
| v
NBM.IPC.NETBASE IQ#######.QUEUE.NETBASE
^ |
| v
user application (netbase shell) nbpost
^ |
| v
ORIGINAL IMAGE DB SHADOW IMAGE DATABASE
In case of a disaster of the master system, you can switch your
production to your shadow system to prevent long downtimes.
Many customers of Netbase/SharePlex suffer by seeing their shadow
systems run only for suckling data from the LAN without any active
production ... but only a few know and use their shadow system for work
like reporting, etc.
So, it's good to know that you can access the shadow copy for READ-ONLY
tasks like reporting, etc. (Try query, querynm!)
This article explains how you can use your MPE/iX shadow system for
access of sql-programs (Allbase) like ISQL and remote ODBC applications
to your shadow database.
At first some assumptions this article expects for the reminder:
- your SharePlex/iX environment should be set up, shadowing runs for
your TurboImage database (Netbase Reference Manual)
- the author used MPE/iX 5.5 PP C5502 systems, SharePlex/iX 9.6,
TurboIMAGE C.06.18, Allbase A.G1.15, ImageSQL B.G1.10, 16-bit ODBC
G1.05
installed on PC with MS-Windows (not supported for WIN95 or WINNT !!!)
- the shadow system is prepared for running the Allbase listener process
(HP PC API User's Guide for ALLBASE/SQL and IMAGE/SQL, see also the
readme file of your ODBC driver (here you find ALL infos how to setup
your HP3000 and PC for work)!!!)
The next draft describes the relationship between the MPE/iX systems
(master and shadow) with the ODBC PC and/or Allbase application (here
ISQL):
-------------------------------------
master system shadow system
... ------------LAN----------- ...
| |
nbexport nbimport
| |
NBM.IPC.NETBASE IQ#######.QUEUE.NETBASE
| |
user application (netbase shell) nbpost
| |
ORIGINAL IMAGE DB SHADOW IMAGE DATABASE \
| (by
IMAGESQL)
ALLBASE DBE /
| \
| allbase appl
| (isql.pub.sys)
|
hpdadvr.pub.sys
|
PC ...
|
... -----------LAN------------ ...
|
PC's network stack
|
ODBC driver
|
SQL Windows Appl (like MS-Access)
This seems to be a little bit complex but you should only keep in mind,
which processes try to directly access your shadow TurboImage database.
Steps of configuration (assuming shadowing is still running!!!):
----------------------------------------------------------------
1. stop the nbpost process in the shadow system
nbctrl.pub.netbase "stop post"
(This prevents the shadow system from accessing the shadow database;
don't panic, your shadow system will queue all transactions into
import queue files until you restart your nbpost process again!)
2. Shutdown your Allbase listener processes:
anstop arpa
and/or
anstop ns
3. You have to do several changes to your netbase directory on the
shadow system:
a) first check your shadow entries (example):
:nbdir.pub.netbase
D> lists @[log in to unmask]@,all
... S Q U D S L
--------TRANSPORT REFERENCE----------LOCAL COPY REFERENCE--- Y U S I H O
File Group Account Node File Group Account N E R S R G
DB DBSHADOW TESTDB DJANGOL -> --Same-- - - - - - -
^ ^
| |
(if you see here a 'Q' you have a problem, |
contact your support before further work!!!) |
|
(if you see here a 'Y', your nbpost process will open |
your database in MODE 1, otherwise in MODE 4!!!)
Make a note in what mode your nbpost is accessing the shadow db!
b) prevent specific programs from being intercepted by the netbase
shell
(all programs which try to access the shadow database directly)
D> program IMAGESQL.PUB.SYS;NONB
D> program HPDADVR.PUB.SYS;NONB
D> program ISQL.PUB.SYS;NONB (and all other sql-programs accessing
your shadow database for reading)
D> exit
4. setup your Allbase DBE and attach to your TurboImage database:
a) logon to the account where the database is located
b) start IMAGESQL
c) set your TurboImage database
d) set your Allbase DBE (create one if not existent)
e) attach your dbe to the TurboImage database
f) display the current defined users
g) add new users if necessary and change access mode of users to
compatibility one:
nbpost uses MODE 1 ---> your users must use MODE 5
nbpost uses MODE 4 ---> your users must use MODE 6
h) exit imagesql
Example (assumes MODE 4 used by nbpost process at 4.a) ):
--------
:imagesql
HP36385B B.G1.10 IMAGE/SQL Utility FRI, JUN 27, 1997,
11:57 AM
(C) COPYRIGHT HEWLETT-PACKARD COMPANY 1993
>>turbo db
>>sqldbe dbe
DBE does not exist, do you want to create one? [Y/N] : y
Creating DBE now ...
>>attach
Mapped 14 source table/source field name(s) (ATCWARN 32062).
>>di users
ATTACHED BASES : DB.DBSHADOW.TESTDB
DBEnvironment : DBE.DBSHADOW.TESTDB
Owner Name : DB
USER LOGON DBOPEN MODE USER PASSWORD USER CLASS
---------- ----------- ------------- ----------
MGR.TESTDB 5 ; 64
(use dbutil.pub.sys to found out right user classes within the db!)
>>add user TEST.MGR WITH class=10, mode=6
ALLBASE/SQL group DB_10 created.
View DB.USERS_V10 created.
View DB.PRODUCTS_V10 created.
View DB.LENDING_USER_V10 created.
View DB.LENDING_PRODUCT_V10 created.
View DB.LENDING_V10 created.
>>update user MGR.TESTDB TO MODE=6
>>di users
ATTACHED BASES : DB.DBSHADOW.TESTDB
DBEnvironment : DBE.DBSHADOW.TESTDB
Owner Name : DB
USER LOGON DBOPEN MODE USER PASSWORD USER CLASS
---------- ----------- ------------- ----------
MGR.TESTDB 6 ; 64
TEST.MGR 6 USER 10
>>exit
5. prepare your Allbase DBE for ODBC access:
isql=> connect to 'dbe';
isql=> start ODBCVIEW.PUB.SYS;
(If you see some errors like DBERR 2200, 2202, 2206: That's normal!)
isql=> exit;
6. restart your nbpost process on the shadow system
run NBCTRL.PUB.NETBASE;INFO="START POST"
7. restart your Allbase listeners:
anstart arpa
and/or
anstart ns
8. setup your ODBC access on the PC (you'll find the ODBC icon in
the 'Control Panel', choose 'Allbase SQL', look at the readme file
of the driver!!!)
Now you can access the TurboImage databases via ODBC with
applications like MS-Access, etc.
That's all!!!
Holger Wiemann
HP Response Center, Germany
|