CREATE DATABASE
    FILENAME 'DKB200:[MEGA_RDB]MEGA_DB_D01'
    ALIAS MEGA_DB_D01
    RESERVE 2 JOURNALS
    SYSTEM INDEXED COMPRESSION IS ENABLED
    SNAPSHOT IS ENABLED DEFERRED
    DICTIONARY IS REQUIRED
    PATHNAME 'MEGA_RDB_PATH'
    PROTECTION IS ACLS
    ALLOCATION IS 1000 PAGES
    SNAPSHOT ALLOCATION IS 1000 PAGES
    EXTENT IS 100 PAGES
    SNAPSHOT EXTENT IS 100 PAGES
    ROW CACHE IS ENABLED
    OPEN IS AUTOMATIC
    NUMBER OF USERS IS 5;

GRANT ALL PRIVILEGES ON DATABASE ALIAS MEGA_DB_D01 TO MEGA_DBA;

GRANT SELECT, SHOW ON DATABASE ALIAS MEGA_DB_D01 TO MEGA_RO;

GRANT UPDATE, INSERT, SELECT, SHOW, DELETE, DISTRIBTRAN
        ON DATABASE ALIAS MEGA_DB_D01 TO MEGA_RW;
    
COMMIT;
