HP 3000 Manuals

Attaching a TurboIMAGE/XL Database [ Getting Started with HP IMAGE/SQL ] MPE/iX 5.0 Documentation


Getting Started with HP IMAGE/SQL

Attaching a TurboIMAGE/XL Database 

This task describes how to attach a TurboIMAGE/XL database.


NOTE If you are attaching a database with the same name but in a different group and/or account from a database already attached to the DBEnvironment, you must specify an alternative owner name at attach time (see Task Reference). This is because in a mapped table, by default, the owner name is the database name, and duplicate table names are not allowed within the same database. In any case, you cannot attach the same TurboIMAGE/XL database twice to the same DBEnvironment.
Getting Ready * It is convenient to have the TurboIMAGE/XL database and the DBEnvironment in the same group and account. If this is not the case, there are several issues to consider. The following considerations apply if the TurboIMAGE/XL database(s) to be attached exist(s) in a different group and/or account than the DBEnvironment: * IMAGE/SQL supports standard MPE/iX security rules. Correct user, group, and account capabilities must be in place to use IMAGE/SQL to access a TurboIMAGE/XL database from a DBEnvironment in a different account than the database. * IMAGE/SQL utility administrators often need to specify DBEnvironment and TurboIMAGE/XL maintenance words as a part of the SET command if they are not the creator. Because of this, it is recommended that maintenance words exist for both database management systems. * IMAGE/SQL utility administrators need DBA authority to perform most IMAGE/SQL utility tasks. Be sure to grant DBA authority to everyone who will be performing IMAGE/SQL utility tasks (see Task Reference). * The TurboIMAGE/XL database and the DBEnvironment must have the same native language support (NLS) defined for them. * Be sure that all processes accessing the DBEnvironment are shutdown before using the ATTACH command. The ATTACH command using the IMAGE/SQL utility requires exclusive access to the DBEnvironment. * The ATTACH command requires that the appropriate SET SQLDBE and SET TURBODB commands have been issued. To check the status of these commands, use the DISPLAY OPTIONS command: _____________________________________________________________________________________ | | | :RUN IMAGESQL.PUB.SYS | | | | HP36385B X.F0.12 IMAGE/SQL Utility THU, APR 8, 1993, 10:30 AM| | (C) COPYRIGHT HEWLETT-PACKARD COMPANY 1993 | | | | >>DISPLAY OPTIONS | | Current base : | | Current SQLDBE : | | Echo : ON | | Command Logging : ON | | Log File : ATCLOG.PUB.TURBONM | _____________________________________________________________________________________ * Because there is no current database or DBEnvironment, issue the SET command as follows: ________________________________________ | | | >>SET SQLDBE MUSICDBE.PUB.TURBONM| | >>SET TURBODB MUSIC.PUB.TURBONM | | >> | ________________________________________ * Another DISPLAY OPTIONS command confirms that there is now a current database and DBEnvironment: _____________________________________________ | | | >>DISPLAY OPTIONS | | Current base : MUSIC.PUB.TURBONM | | Current SQLDBE : MUSICDBE.PUB.TURBONM| | Echo : ON | | Command Logging : ON | | Log File : ATCLOG.PUB.TURBONM | _____________________________________________ Performing the Task Once you are sure the appropriate SET command have been specified and that the correct MPE/iX security is in place, issue the IMAGE/SQL utility ATTACH command. _________________________________________________________________ | | | >>ATTACH | | Split 1 compound source fields (ATCWARN 32063). | | Mapped 15 source table/source field names (ATCWARN 32062).| | Mapped 1 incompatible source types (ATCWARN 32061). | | >> | _________________________________________________________________ Messages issued at attach time inform you if any mapping has been done (see Task Reference). The MUSIC database is now a logical part of the MusicDBE DBEnvironment. Although the data remains in the TurboIMAGE/XL database, it can now be selected from mapped tables just as it would be selected from ALLBASE/SQL tables. Task Reference * By default, the IMAGE/SQL utility uses the TurboIMAGE/XL database name as the owner name. You must specify an alternative owner name if you are attaching a TurboIMAGE/XL database with the same name as one already attached. To do this, use the WITH OWNER= parameter of the ATTACH command. * To specify a maintenance word, use the MAINT= parameter of the SET TURBODB or SET SQLDBE command. Refer to the HP IMAGE/SQL Administration Guide for details about these commands and their parameters. * Use the DISPLAY MAP command to see detailed database mapping information. * When a TurboIMAGE/XL database is attached to a DBEnvironment, IMAGE/SQL performs the following tasks: * Makes a table entry in the system catalog of the DBEnvironment for each corresponding source data set. * Creates a column definition for each field in the source data set. (The NOT NULL option is used because null values are not defined in TurboIMAGE/XL.) * Produces default mapping information which maps TurboIMAGE/XL data sets to SQL tables and stores this information in the ATCINFO file. Specifically, mapping is done in the following areas: * Data item and data set names Some characters allowed in TurboIMAGE/XL names (specifically: + - * / ? ' % & ) are not valid SQL names. Therefore, whenever IMAGE/SQL utility encounters such a character in a TurboIMAGE/XL name, it converts it to an underscore (_). * Data types TurboIMAGE/XL data types are mapped to SQL data types. When inexact or imprecise mapping is necessary, an `I' appears in the NOTES section of the DISPLAY MAP display. When a compound field is split into separate mapped columns, an S appears in the NOTES section of the display. * User security Initially, only the TurboIMAGE/XL database creator (DBC) is defined as a user in the DBEnvironment. For other users to access the attached database, the DBC must add users with IMAGE/SQL utility's ADD USER command. * Once the database is attached, the DBC must add any additional IMAGE/SQL users. * It is desirable to update data types and split mapped columns before IMAGE/SQL users access the attached database. For details, refer to the HP IMAGE/SQL Administration Guide. This is because whenever a mapped column is split or updated, any user-created views containing these mapped columns are dropped.


MPE/iX 5.0 Documentation