HP 3000 Manuals

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


HP 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[REV BEG] a TurboIMAGE/XL database and a DBEnvironment.  At the
MPE XL system prompt, type IMAGESQL.[REV END] For example:
______________________________________________________________________________________
|                                                                                    |
|     :HELLO NANCY.ATC                                                               |
|     :IMAGESQL                                                                      |
|                                                                                    |
|                                                                                    |
|     HP36385 B.F0.10            IMAGE/SQL Utility        FRI, DEC 18, 1992, 11:30 AM|
|     (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1992                                     |
|                                                                                    |
|                                                                                    |
|     >>                                                                             |
______________________________________________________________________________________

            

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

            

Notice that the headings "Current TurboDB:" 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|
|     >>                             |
|                                    |
______________________________________

            

Once the SET commands are issued, the DISPLAY OPTIONS command displays
this information:
_______________________________________________
|                                             |
|     >>DISPLAY OPTIONS                       |
|     Current TurboDB     : SALES.SERED.ATC   |
|     Current SQLDBE      : PARTSDBE.SERED.ATC|
|     Echo                : ON                |
|     Command Logging     : ON                |
|     Log File            : ATCLOG.SERED.ATC  |
|     >>                                      |
_______________________________________________

            

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 for more
details.)

In the example below, ALLBASE/ISQL is used to connect to PartsDBE. A
SELECT statement is then used to display the data in the mapped table
SALES.VENDOR.
____________________________________________________________________________
|                                                                          |
|     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 |
|     .                 .                        .         .      .        |
|     .                 .                        .         .      .        |
|     .                 .                        .         .      .        |
|                                                                          |
____________________________________________________________________________

            

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 describes typical
IMAGE/SQL utility tasks and shows you how to perform them.



MPE/iX 5.0 Documentation