Assign7 Ans

Preview:

Citation preview

  • 8/10/2019 Assign7 Ans

    1/2

    Assignment #7Roles and Privileges

    Create two roles: REGISTRAR and INSTRUCTOR. Then create the following views and assign select rights oneach set of views to the roles they are listed nder:

    !. REGISTRAR

    CURRENT"REGS: All stdents that have registered in the crrent day

    SEATS"A#AI$: The re%aining &seats' availa(le in all sections )&seats' * ca+acity , enroll%ent-

    EE/"REGS: All stdents that have registered in the last seven days

    0. INSTRUCTOR

    ROSTER: all stdents in classes taght. Ass%e that instrctors have Oracle acconts that they

    rn the view fro% and that their login ids %atch their last na%es.

    ASSIGN1ENTS: all sections taght (y the instrctor

    2inally3 grant the registrar role to 1itch )%rov"%- instrctor role to 1itch )%rov"%-. This is %y ser idwhich e4ists in the data(ase in the la(s. If yo are wor5ing at ho%e3 yo will have to create these sers to%a5e sre yor scri+ts wor5.

    CREATE RO$E registrar6CREATE RO$E instrctor6

    CREATE OR RE7$ACE #IE crrent"regs AS SE$ECT last"na%e3 first"na%e 2RO1 stdent 8ERE TO"C8AR)TRUNC)registration"date-3 911;;

  • 8/10/2019 Assign7 Ans

    2/2

    GRANT registrar TO Bc0!0@GRANT instrctor TO Bc0!0@

Recommended