Task 1:Configuring a DBEnvironment [ IMAGE/SQL Administration Guide ] MPE/iX 5.0 Documentation
IMAGE/SQL Administration Guide
Task 1:Configuring a DBEnvironment
This task describes how to configure a DBEnvironment so you can access
your TurboIMAGE/XL database(s) with ALLBASE/SQL.
Instead of using the commands as shown in the examples, you can use the
IMAGE/SQL utility to create your DBEnvironment. When you run the
IMAGE/SQL utility, it prompts you to create the DBEnvironment. You
should still read through this section to see important information such
as setting TIMEOUT values.
Getting Ready
* When all of the TurboIMAGE/XL databases to be attached to the
DBEnvironment are created by the same user in one group and
account, it is convenient to configure the DBEnvironment in this
group and account.
If this is not the case, several other issues should be
considered. The following considerations apply if the
TurboIMAGE/XL database to be attached exists in a different group
and/or account than the DBEnvironment:
* IMAGE/SQL supports standard MPE/iX security rules. Make
sure correct user, group, and account capabilities are in
place when you plan to access a TurboIMAGE/XL database from
a DBEnvironment in a different account than the database.
* Make sure maintenance words exist for the DBEnvironment and
all TurboIMAGE/XL databases because IMAGE/SQL utility
administrators often need to specify DBEnvironment and
TurboIMAGE/XL maintenance words if they are not the
creator.
* Be sure to grant DBA authority to everyone who will be
performing IMAGE/SQL utility tasks because IMAGE/SQL
utility administrators need DBA authority to perform most
IMAGE/SQL utility tasks.
* Make sure the TurboIMAGE/XL database and the DBEnvironment have
the same native language support (NLS) defined for them.
* When a DBEnvironment is configured, two files are created:
DBEFILE0 and DBELOG1. The default size of these files is 5000.
In the example below, a file size of 500 pages is used for each of
these files, but you may need to adjust these sizes depending on
the size and number of TurboIMAGE/XL databases you plan to attach.
Performing the Task
* Log on in the same group and account as the TurboIMAGE/XL
database(s) and run ISQL to enter the statements interactively.
At the ISQL prompt, enter the START DBE NEW statement. For
example, to configure a DBEnvironment named PartsDBE, enter the
following:
________________________________________________________
| |
| :RUN ISQL.PUB.SYS |
| isql=> START DBE 'PartsDBE' MULTI NEW |
| > MAXIMUM TIMEOUT = 2 MINUTES |
| > DEFAULT TIMEOUT = MAXIMUM |
| > DBEFILE0 DBEFILE DBEFILE0 <==DBEFile0Definition|
| > WITH PAGES = 500, <== . . |
| > NAME = 'PartsF0', <== . . |
| > LOG DBEFILE DBELOG1 <==DBELog0Definition |
| > WITH PAGES = 500, <== . . |
| > NAME = 'PartsLog'; <== . . |
| isql=> EXIT; |
| : |
________________________________________________________
If you forget the semicolon, ISQL prompts you with a right-angle
bracket (>). At this prompt, enter a semicolon and ISQL will
execute the statement. If you wish to terminate the command,
enter //. The MULTI parameter is necessary if you plan on a
multiuser IMAGE/SQL environment.
The above command can also be done by the IMAGE/SQL utility. The
difference is that IMAGE/SQL utility automatically creates the
DBEfiles, and you do not need to specify the values that are
default values.
* To avoid deadlock situations when there are more than two
connections, you should either set the MAXIMUM TIMEOUT and DEFAULT
TIMEOUT options with the START DBE NEW statement or change them
with the SQLUtil ALTDBE command. The ALTDBE command updates the
parameters required for DBEnvironment startup. The SQLUtil
utility prompts you for necessary information. Enter a carriage
return to retain an old value.
________________________________________________________
| |
| :RUN SQLUTIL.PUB.SYS |
| >>ALTDBE |
| DBEnvironment Name: PartsDBE |
| Maintenance Word: MaintWd |
| : |
| Maximum Timeout (opt): 10 SECONDS |
| Default Timeout (opt): 5 SECONDS |
| Authorize Once per Session (opt): ON |
| Alter DBEnvironment Startup Parameters (y/n)? YES|
| |
| DBEnvironment startup parameters altered. |
| >>EXIT |
________________________________________________________
* To set a maintenance word for the newly configured DBEnvironment,
use the SETDBEMAINT command of SQLUtil, as in the following
example:
_________________________________________________
| |
| :RUN SQLUTIL.PUB.SYS |
| >>SETDBEMAINT |
| DBEnvironment Name: PartsDBE |
| Current Maintenance Word: Carriage Return|
| New Maintenance Word: usr |
| Retype New Maintenance Word: usr |
| >>EXIT |
_________________________________________________
* Once you have configured the DBEnvironment, set a maintenance word
for it, and set the timeout time, you are ready to attach
TurboIMAGE/XL databases to it. This is explained in Task 2.
Task Reference
* No information is given here about considerations that may be
necessary when configuring a DBEnvironment that contains
ALLBASE/SQL databases. Consult the ALLBASE/SQL Database
Administration Guide for more guidance in this area.
* The following summaries of SQL statements will get you started.
The ALLBASE/SQL statements are fully described in the ALLBASE/SQL
Reference Manual. You can use ISQL to invoke these statements
interactively.
* The SQL START DBE NEW statement has the following syntax:
________________________________________________________________________
| |
| |
|START DBE 'DBEnvironmentName' [MULTI] NEW |
| |
|[DUAL LOG ] |
|[BUFFER = (DataBuffPages,LogBuffPages) ] |
|[LANG = LanguageName ] |
|[TRANSACTION = MaxTransactions ] |
|[ {TimeoutValue [SECONDS]}] |
|[MAXIMUM TIMEOUT = { [MINUTES]}] |
|[ { }] |
|[ {NONE }]|,...| |
|[ ] |
|[ {TimeoutValue [SECONDS]}] |
|[DEFAULT TIMEOUT = { [MINUTES]}] |
|[ { }] |
|[ {MAXIMUM }] |
|[ ] |
|[DBEFile0Definition ] |
|[DBELogDefinition ] |
________________________________________________________________________
DBEFile0 is a file containing the data for the SYSTEM
DBEFileSet, which contains the system catalog. DBELOG1 is
the log file, which records operations that modify the
database in any way. The default number of pages for a
DBEnvironment created by IMAGE/SQL as of version B.G0 for
DBEFile0 and DBELOG1 is 5,000. Refer to the syntax for the
START DBE NEW statement shown on a previous page for
details of the syntax for DBEFile0Definition and
DBELogDefinition.
* When you issue the START DBE statement, a fileset named
IMAGESQL is created. You can add up to 3000 pages to this
fileset.
To add pages to the IMAGESQL fileset, create DBEFiles and
then add them to the IMAGESQL fileset.
* The CREATE DBEFILE statement has the following syntax:
________________________________________________________________________
| |
| |
|CREATE DBEFILE DBEFilename WITH PAGES = DBEFileSize, NAME = |
| |
| [, INCREMENT = DBEFileIncrSize] [ {TABLE}] |
|'SystemFileName' [ ] [,TYPE = {INDEX}] |
| [[, MAXPAGES = DBEFileMaxSize]] [ {MIXED}] |
| |
|[,DEVICE = volume;] |
________________________________________________________________________
* The ADD DBEFILE statement has the following syntax:
________________________________________________________________________
| |
| |
|ADD DBEFILE DBEFileName TO DBEFILESET IMAGESQL |
________________________________________________________________________
* The SQL GRANT statement has the following syntax for
granting DBA authority:
________________________________________________________________________
| |
| |
| {CONNECT } {DBEUserID} |
|GRANT {DBA } TO {GroupName} [,...] |
| {RESOURCE} {ClassName} |
________________________________________________________________________
* Use SQLUtil to set a DBEnvironment maintenance word. First access
SQLUtil, then use the SQLUtil SETDBEMAINT command to set a
maintenance word. The syntax for this command is as follows:
_______________________________________________________
| |
| :RUN SQLUTIL.PUB.SYS |
| >>SETDBEMAINT |
| DBEnvironment Name: DBEnvironmentName |
| Current Maintenance Word: OldMaintenanceWord |
| New Maintenance Word: NewMaintenanceWord |
| Retype New Maintenance Word: NewMaintenanceWord|
| >>EXIT |
_______________________________________________________
When no current maintenance word exists, enter a carriage return
at the "Current Maintenance Word:" prompt.
MPE/iX 5.0 Documentation