HP 3000 Manuals

Getting Acquainted with the IMAGE/SQL Utility [ IMAGE/SQL Administration Guide ] MPE/iX 5.5 Documentation


IMAGE/SQL Administration Guide

Getting Acquainted with the IMAGE/SQL Utility 

The following example shows how to use the IMAGE/SQL utility to attach a
TurboIMAGE/XL database to a DBEnvironment. 

Invoking the IMAGE/SQL Utility 

To initiate an IMAGE/SQL utility session, log on to a group and account
containing a TurboIMAGE/XL database and a DBEnvironment.  Then at the
MPE/iX system prompt, type RUN IMAGESQL.PUB.SYS. For example:
___________________________________________________________________________
|                                                                         |
|     :HELLO NANCY.ATC                                                    |
|     :RUN IMAGESQL.PUB.SYS                                               |
|                                                                         |
|     HP36385B B.G0.03    IMAGE/SQL Utility    FRI, DEC 16, 1994, 11:30 AM|
|     (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1993                          |
|                                                                         |
|     >>                                                                  |
___________________________________________________________________________

            

The DISPLAY OPTIONS command displays information about your IMAGE/SQL
utility session:
_____________________________________________
|                                           |
|     >>DISPLAY OPTIONS                     |
|     Current base        :                 |
|     Current SQLDBE      :                 |
|     Echo                : ON              |
|     Command Logging     : ON              |
|     Current Log File    : ATCLOG.SERED.ATC|
|                                           |
|     >>                                    |
_____________________________________________

            

Notice that the headings "Current base:" and "Current SQLDBE:" have no
information displayed at this time.

Attaching to a DBEnvironment 

Three IMAGE/SQL commands are needed to attach a TurboIMAGE/XL database to
the DBEnvironment:

SET TURBODB      identifies the TurboIMAGE/XL database to be attached to
                 a DBEnvironment.  To issue this command you must be the
                 DBC or supply the TurboIMAGE/XL database maintenance
                 word.

SET SQLDBE       identifies the DBEnvironment to which the TurboIMAGE/XL
                 database will be attached.  To issue this command you
                 must be the DBECreator or supply the DBEnvironment
                 maintenance word.

ATTACH           performs the attach.  To issue this command you must be
                 a DBA of the DBEnvironment.

In the following example, the SALES database and the PartsDBE
DBEnvironment are identified with two SET commands.
______________________________________
|                                    |
|     >SET TURBODB SALES.SERED.ATC   |
|     >>SET SQLDBE PARTSDBE.SERED.ATC|
|     >>                             |
______________________________________

            

After the SET commands are issued, the DISPLAY OPTIONS command displays
this information:
_______________________________________________
|                                             |
|     >>DISPLAY OPTIONS                       |
|     Current base        : SALES.SERED.ATC   |
|     Current SQLDBE      : PARTSDBE.SERED.ATC|
|     Echo                : ON                |
|     Command Logging     : ON                |
|     Current Log File    : ATCLOG.SERED.ATC  |
|                                             |
|     ***Database is not attached.            |
|     >>                                      |
_______________________________________________

            

The ATTACH command can now be used to attach SALES to PartsDBE. Note that
messages issued at attach time inform you if mapping is taking place.
______________________________________________________________________
|                                                                    |
|     >>ATTACH                                                       |
|     Split 1 compound source field(s) (ATCWARN 32063).              |
|     Mapped 15 source table/source field name(s) (ATCWARN 32062).   |
|     Mapped 1 incompatible/imprecise source type(s) (ATCWARN 32061).|
|     >>EXIT                                                         |
|                                                                    |
______________________________________________________________________

            

Selecting TurboIMAGE/XL Data from Mapped Tables 

The attached TurboIMAGE/XL database is now a part of the DBEnvironment
and can be queried with SQL SELECT statements by the DBC. (Other users
must be explicitly added by the DBC. Refer to Chapter 2, "Using the
IMAGE/SQL Utility," for more details.)

In the example below, the ALLBASE/SQL utility, ISQL, is used to connect
to PartsDBE. A SELECT statement is then used to display the data in the
mapped table SALES.VENDOR.
_____________________________________________________________________
|                                                                   |
|     :RUN ISQL.PUB.SYS                                             |
|     isql=>CONNECT to 'PartsDBE';                                  |
|     isql=>SELECT * from sales.vendor;                             |
|                                                                   |
|     select * from sales.vendor;                                   |
|     ----------------+--------------------+------------+-----+-----|
|     VENDOR          |STREET              |CITY        |STATE|ZIP  |
|     ----------------+--------------------+------------+-----+-----|
|     Celtic Graphics |105 19th Ave.       |Seattle     |WA   |98115|
|     Trident 3D      |55 Homestead Road   |Cupertino   |CA   |95014|
|     Ablrn Tech.     |90 Marina Way       |Berkeley    |CA   |94708|
|     Space Ent.      |110 Homestead Ave.  |Cupertino   |CA   |95014|
|     Cutler Micro    |9442 E. 57th Ave.   |Seattle     |WA   |98115|
|     Seminational Co.|5000 Marina Way     |San Diego   |CA   |92093|
|     .                .                    .            .     .    |
|     .                .                    .            .     .    |
|     .                .                    .            .     .    |
_____________________________________________________________________

            

[REV BEG]

The multi-connect feature enables you to simultaneously connect to more
than one DBEnvironment or connect to the same DBEnvironment more than
once.[REV END] This chapter has shown you how easy it is to get started
using IMAGE/SQL. Once the database is attached, you may need to complete
several additional IMAGE/SQL utility tasks.  Chapter 2, "Using the
IMAGE/SQL Utility," describes typical IMAGE/SQL utility tasks and shows
you how to perform them.
[REV DEL]



MPE/iX 5.5 Documentation