GENERATE ALL [ ALLBASE/SQL Database Administration Guide ] MPE/iX 5.5 Documentation
ALLBASE/SQL Database Administration Guide
GENERATE ALL
Generates the SQL commands necessary to recreate an entire DBEnvironment.
Scope
SQLGEN Only
SQLGEN Syntax
>> [GEN[ERATE]]ALL Schema file Name or '//' to STOP command >>
SchemaFileName
Parameters
SchemaFileName is the name of the schema file where SQLGEN
places the generated commands.
Description
* GENERATE ALL generates a set of commands that can be used to
migrate all the objects of a DBEnvironment.
* GENERATE ALL does not generate the CREATE SCHEMA statement.
* GENERATE ALL calls all the GENERATE commands except GENERATE LOAD
and GENERATE STATISTICS. All objects are selected for each
GENERATE command.
The commands are called in the following order:
[REV BEG]
1. GENERATE DBE
2. GENERATE DBEFILES
3. GENERATE SPECAUTH
4. GENERATE DEFAULTSPACE
5. GENERATE TEMPSPACES
6. GENERATE GROUPS
7. GENERATE PARTITION
8. GENERATE TABLES
9. GENERATE SPECAUTH
10. GENERATE TABAUTH
11. GENERATE INDEXES
12. GENERATE VIEWAUTH
13. GENERATE VIEWS
14. GENERATE PROCEDURES
15. GENERATE PROCAUTH
16. GENERATE RULES
17. GENERATE MODOPTINFO
18. GENERATE PROCOPTINFO
19. GENERATE MODAUTH
20. GENERATE INSTALLAUTH[REV END]
[REV BEG]
* This is a description of each command:
GENERATE DBE builds the commands necessary to start DBE new for a
DBEnvironment.
GENERATE builds ALLBASE/SQL commands to recreate one or more of
DBEFILES the DBEFileSets and associated DBEFiles of the
DBEnvironment.
GENERATE builds ALLBASE/SQL commands to grant SECTIONSPACE and
SPACEAUTH TABLESPACE authority.
GENERATE builds ALLBASE/SQL commands to set the default
DEFAULTSPACE SECTIONSPACE and TABLESPACE to certain DBEFileSet.
GENERATE builds ALLBASE/SQL commands to recreate one or more of
TEMPSPACES the TEMPSPACEs of the DBEnvironment.
GENERATE GROUPS builds SQL commands to recreate all the groups of the
DBEnvironment. It generates CREATE GROUP as well as
commands to add users/groups to a group.
GENERATE builds ALLBASE/SQL commands to recreate one or more of
PARTITION the PARTITIONs of the DBEnvironment.
GENERATE TABLES builds CREATE TABLE commands to recreate one or more
tables of the DBEnvironment. You can also recreate
associated indexes and table authorities for specified
tables.
GENERATE builds ALLBASE/SQL commands to recreate DBA, CONNECT and
SPECAUTH RESOURCEauthorities for a DBEnvironment.
GENERATE builds ALLBASE/SQL commands to recreate authorities for
TABAUTH one or more tables of the DBEnvironment.
GENERATE builds SQL commands to recreate one or more indexes of
INDEXES the DBEnvironment.
GENERATE builds ALLBASE/SQL commands to recreate authorities for
VIEWAUTH one or more views of the DBEnvironment.
GENERATE VIEWS builds CREATE VIEW commands to recreate one or more
views of the DBEnvironment.
GENERATE builds CREATE PROCEDURE commands to recreate one or more
PROCEDURES procedures of the DBEnvironment.
GENERATE builds GRANT EXECUTE commands to allow you to recreate
PROCAUTH authorities for one or more procedures stored in the
DBEnvironment.
GENERATE RULES builds SQL commands to recreate one or more rules of the
DBEnvironment.
GENERATE builds ALLBASE/SQL commands to generate modified access
MODOPTINFO plans of sections belonging to certain modules.
GENERATE builds ALLBASE/SQL commands to generate modified access
PROCOPTINFO plans of sections belonging to certain procedures.
GENERATE builds GRANT RUN commands to allow you to recreate
MODAUTH authorities for one or more modules stored in the
DBEnvironment.
GENERATE builds GRANT INSTALL commands to recreate all Module
INSTALLAUTH Authorities in the DBEnvironment
[REV END]
Example
>> gen all
ALLBASE/SQL Command Generator for ALL
Schema File Name or '//' to STOP command >> partschm
Generating command to START DBE PARTSDBE
Generating command to CREATE DBEFILESET ORDERFS
Generating command to CREATE DBEFILESET PURCHFS
. .
. .
Generating command(s) for DBEFILE ORDERDATAF1
Generating command(s) for DBEFILE ORDERINDXF1
. .
. .
Generating CREATE GROUP AJ@SERED.ACCOUNTSPAYABLE
Generating CREATE GROUP AJ@SERED.DBEUSERS
. .
. .
Generating ADD JIM@FRANCIS TO GROUP ACCOUNTSPAYABLE
Generating ADD KAREN@RIZZO TO GROUP ACCOUNTSPAYABLE
. .
. .
Generating CREATE TABLE PURCHDB.INVENTORY
Generating CREATE TABLE PURCHDB.ORDERITEMS
. .
. .
Generating CREATE INDEX on PURCHDB.INVENTORY
Generating CREATE INDEX on PURCHDB.ORDERITEMS
. .
. .
Generating Authority for PURCHDB.INVENTORY
Generating Authority for PURCHDB.ORDERITEMS
. .
. .
Generating Special Authority for AJ@SERED
Generating Special Authority for JOHN@BROCK
. .
. .
>>
Schema File Produced
START DBE 'PARTSDBE' MULTI NEW
DUAL LOG,
BUFFER = (100, 24),
TRANSACTION = 5,
DBEFILE0 DBEFILE PARTSDBE0
WITH PAGES = 150,
NAME = 'PARTSF0',
LOG DBEFILE DBELOG1 AND DBELOG2
WITH PAGES = 256,
NAME = 'PARTSLG1'
AND 'PARTSLG2';
CREATE DBEFILESET ORDERFS;
CREATE DBEFILESET PURCHFS;
CREATE DBEFILESET RECFS;
CREATE DBEFILESET WAREHFS;
CREATE DBEFILE ORDERDATAF1
WITH PAGES = 50, NAME = 'ORDERDF1',
TYPE = TABLE;
ADD DBEFILE ORDERDATAF1 TO DBEFILESET ORDERFS;
CREATE DBEFILE ORDERINDXF1
WITH PAGES = 50, NAME = 'ORDERXF1',
TYPE = INDEX;
ADD DBEFILE ORDERINDXF1 TO DBEFILESET ORDERFS;
. .
. .
COMMIT WORK;
CREATE GROUP AJ@SERED.ACCOUNTSPAYABLE;
CREATE GROUP AJ@SERED.DBEUSERS;
. .
. .
ADD JIM@FRANCIS TO GROUP ACCOUNTSPAYABLE;
ADD KAREN@RIZZO TO GROUP ACCOUNTSPAYABLE;
. .
. .
COMMIT WORK;
CREATE PUBLIC TABLE PURCHDB.INVENTORY
(PARTNUMBER CHAR( 16) NOT NULL,
BINNUMBER SMALLINT NOT NULL,
QTYONHAND SMALLINT,
LASTCOUNTDATE CHAR( 8),
COUNTCYCLE SMALLINT,
ADJUSTMENTQTY SMALLINT,
REORDERQTY SMALLINT,
REORDERPOINT SMALLINT) IN WAREHFS;
. .
. .
COMMIT WORK;
CREATE UNIQUE INDEX INVPARTNUMINDEX
ON PURCHDB.INVENTORY
(PARTNUMBER);
. .
. .
COMMIT WORK;
GRANT SELECT,
INSERT,
DELETE,
UPDATE
ON PURCHDB.INVENTORY TO DBEUSERS;
GRANT SELECT,
INSERT,
DELETE,
UPDATE
ON PURCHDB.INVENTORY TO PURCHASING;
. .
. .
COMMIT WORK;
GRANT DBA TO AJ@SERED;
GRANT DBA TO JOHN@BROCK;
COMMIT WORK;
MPE/iX 5.5 Documentation