HPlogo ALLBASE/SQL Reference Manual: HP 3000 MPE/iX Computer Systems > Appendix C Sample DBEnvironment

CREASEC Command File

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

   /* This file sets up authorities for the PurchDB and RecDB databases.  */

   /*   The DBA for the sample DBEnvironment is the DBEUserID John@Brock. */



   REVOKE ALL ON PurchDB.Parts FROM PUBLIC;

   REVOKE ALL ON PurchDB.Inventory FROM PUBLIC;

   REVOKE ALL ON PurchDB.SupplyPrice FROM PUBLIC;

   REVOKE ALL ON PurchDB.Vendors FROM PUBLIC;

   REVOKE ALL ON PurchDB.Orders FROM PUBLIC;

   REVOKE ALL ON PurchDB.OrderItems FROM PUBLIC;

   REVOKE ALL ON PurchDB.Reports FROM PUBLIC;

   REVOKE ALL ON RecDB.Members FROM PUBLIC;

   REVOKE ALL ON RecDB.Clubs FROM PUBLIC;

   REVOKE ALL ON RecDB.Events FROM PUBLIC;



   GRANT DBA TO John@Brock;



   /* The following commands create the group for the Purchasing   */ 

   /*   Department. This group has SELECT authority on all table   */ 

   /*   and views of the PurchDB database.                         */



   CREATE GROUP PurchManagers;



   ADD Margy@Hebert TO GROUP PurchManagers;

   ADD Ron@Harnar TO GROUP PurchManagers;

   ADD Sharon@Mathog TO GROUP PurchManagers;

   GRANT SELECT ON PurchDB.Parts TO PurchManagers;

   GRANT SELECT ON PurchDB.Inventory TO PurchManagers;

   GRANT SELECT ON PurchDB.SupplyPrice TO PurchManagers;

   GRANT SELECT ON PurchDB.Vendors TO PurchManagers;

   GRANT SELECT ON PurchDB.Orders TO PurchManagers;

   GRANT SELECT ON PurchDB.OrderItems TO PurchManagers;

   GRANT SELECT ON PurchDB.VendorStatistics TO PurchManagers;

   GRANT SELECT ON PurchDB.PartInfo TO PurchManagers;



   /* The following commands create the group that will maintain   */ 

   /*   the database. This group has RESOURCE authority and all    */ 

   /*   table and view authorities for the tables and views of the */ 

   /*   PurchDB database.                                          */



   CREATE GROUP PurchDBMaint;

   ADD Annie@Chik TO GROUP PurchDBMaint;

   ADD Doug@Griffin TO GROUP PurchDBMaint;

   ADD David@Lewis TO GROUP PurchDBMaint;

   GRANT RESOURCE TO PurchDBMaint;

   GRANT ALL ON PurchDB.Parts TO PurchDBMaint;

   GRANT ALL ON PurchDB.Inventory TO PurchDBMaint;

   GRANT ALL ON PurchDB.SupplyPrice TO PurchDBMaint;

   GRANT ALL ON PurchDB.Vendors TO PurchDBMaint;

   GRANT ALL ON PurchDB.Orders TO PurchDBMaint;

   GRANT ALL ON PurchDB.OrderItems TO PurchDBMaint;

   GRANT SELECT ON PurchDB.VendorStatistics TO PurchDBMaint;

   GRANT SELECT ON PurchDB.PartInfo TO PurchDBMaint;



   /* The following commands create the Purchasing Department's    */ 

   /*   group.  This group has SELECT, INSERT, DELETE, and UPDATE  */ 

   /*   authority for the Inventory, SupplyPrice, Vendors, Orders, */ 

   /*   and OrderItems tables of the PurchDB database.             */



   CREATE GROUP Purchasing;

   ADD AJ@Brown TO GROUP Purchasing;

   ADD Jorge@Guerrero TO GROUP Purchasing;

   ADD Ragaa@Ishak TO GROUP Purchasing;

   ADD Greg@Proulx TO GROUP Purchasing;

   ADD Karen@Thomas TO GROUP Purchasing;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.Inventory

     TO Purchasing;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.SupplyPrice

     TO Purchasing;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.Vendors

     TO Purchasing;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.Orders

     TO Purchasing;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.OrderItems

     TO Purchasing;



   /* The following commands create the Receiving Department's    */ 

   /*   group. This group has SELECT, INSERT, DELETE, and UPDATE  */ 

   /*   authority for the Orders, and OrderItems tables of the    */ 

   /*   PurchDB database.                                         */



   CREATE GROUP Receiving;

   ADD Al@Dal TO GROUP Receiving;

   ADD Sue@Morgan TO GROUP Receiving;

   ADD Martha@Roden TO GROUP Receiving;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.Orders

     TO Receiving;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.OrderItems

     TO Receiving;



   /* The following commands create the Warehouse Department's   */ 

   /*   group. This group has SELECT, INSERT, DELETE, and UPDATE */ 

   /*   authority for the Parts and Inventory tables of the      */ 

   /*   PurchDB database.                                        */



   CREATE GROUP Warehouse;

   ADD Kelly@Cota TO GROUP Warehouse;

   ADD Al@Dal TO GROUP Warehouse;

   ADD Peter@Kane TO GROUP Warehouse;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.Parts

     TO Warehouse;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.Inventory

     TO Warehouse;



   /* The following commands create the Accounts Payable          */ 

   /*   Department's group. This group has SELECT, INSERT, DELETE,*/ 

   /*   and UPDATE authority for the SupplyPrice, Vendors, Orders,*/  

   /*   and OrderItems tables of the PurchDB database.            */ 



   CREATE GROUP AccountsPayable;



   ADD Wolfgang@Demmel TO GROUP AccountsPayable;

   ADD Michele@Ding TO GROUP AccountsPayable;

   ADD Jim@Francis TO GROUP AccountsPayable;

   ADD Karen@Rizzo TO GROUP AccountsPayable;

   ADD Stacey@Wolf TO GROUP AccountsPayable;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.SupplyPrice

     TO AccountsPayable;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.Vendors

     TO AccountsPayable;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.Orders

     TO AccountsPayable;

   

   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON PurchDB.OrderItems

     TO AccountsPayable;



   /* The following commands create the group called Purch.  All DBEUserIDs, */

   /*   or the groups to which they belong, are made members of this group.  */

   /*   This group has CONNECT authority only to PartsDBE.                   */



   CREATE GROUP Purch;

   ADD PurchManagers TO GROUP Purch;

   ADD PurchDBMaint TO GROUP Purch;

   ADD Purchasing TO GROUP Purch;

   ADD Receiving TO GROUP Purch;

   ADD Warehouse TO GROUP Purch;

   ADD AccountsPayable TO GROUP Purch;

   ADD Tom@Wilkens TO GROUP Purch;

   GRANT CONNECT TO Purch;



   /* The following commands create the Manufacturing Dapartment's */

   /*   group. This group has SELECT, INSERT, DELETE, and UPDATE   */

   /*   authority for the TestData and SupplyBatches table of the  */

   /*   ManufDB database.                                          */



   CREATE GROUP Manuf;

   ADD Henry@Cato TO GROUP Manuf;

   ADD Peter@Kane TO GROUP Manuf;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON ManufDB.SupplyBatches

     TO Manuf;





   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

     ON ManufDB.TestData

     TO Manuf;



   GRANT CONNECT TO Manuf;



   /* The following commands GRANT specific authorities to */ 

   /*   specific DBEUserIDs.                               */



   GRANT SELECT ON PurchDB.Vendors TO Tom@Wilkens;

   GRANT SELECT ON PurchDB.VendorStatistics TO Tom@Wilkens;

   GRANT SELECT ON PurchDB.PartInfo TO Tom@Wilkens;

   GRANT UPDATE (BinNumber,QtyOnHand,LastCountDate)

             ON PurchDB.Inventory TO Kelly@Cota;

   GRANT UPDATE (BinNumber,QtyOnHand,LastCountDate)

             ON PurchDB.Inventory TO Peter@Kane;

   GRANT UPDATE (PhoneNumber,VendorStreet,VendorCity,

                 VendorState,VendorZipCode)

             ON PurchDB.Vendors TO Karen@Thomas;

   GRANT UPDATE (PhoneNumber,VendorStreet,VendorCity,

                 VendorState,VendorZipCode)

             ON PurchDB.Vendors TO Jim@Francis;



   /* The following commands create a group called DBEUser for all   */

   /*   other DBEUserIDs, and GRANTS specific authorities to this    */ 

   /*   group.                                                       */



   CREATE GROUP DBEUsers;

   GRANT CONNECT TO DBEUsers;

   GRANT RESOURCE to DBEUsers;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

   ON PurchDB.Parts

   TO DBEUsers;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

   ON PurchDB.Inventory

   TO DBEUsers;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

   ON PurchDB.SupplyPrice

   TO DBEUsers;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

   ON PurchDB.Vendors

   TO DBEUsers;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

   ON PurchDB.Orders

   TO DBEUsers;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

   ON PurchDB.OrderItems

   TO DBEUsers;



   GRANT SELECT

   ON PurchDB.PartInfo

   TO DBEUsers;



   GRANT SELECT

   ON PurchDB.VendorStatistics

   TO DBEUsers;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

   ON RecDB.Members

   TO DBEUsers;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

   ON RecDB.Clubs

   TO DBEUsers;



   GRANT SELECT,

         INSERT,

         DELETE,

         UPDATE

   ON RecDB.Events

   TO DBEUsers;
Feedback to webmaster