home *** CD-ROM | disk | FTP | other *** search
- Rem Copyright (c) 1988 by Oracle Corporation
- Rem NAME
- Rem IADVIEWS.SQL - Create views to restrict table access.
- Rem FUNCTION
- Rem NOTES
- Rem MODIFIED
- Rem Giljum 11/26/90 - Un-cluster forms tables
- Rem Eicher 02/05/90 - Creation
- Rem Eicher 02/05/90 - Rename from iadviews.sql - rename spool file
- Rem Eicher 12/06/89 - Add WITH CHECK OPTION
- Rem Hsi 03/06/89 - Clustering tables (V3.0.5)
- Rem Fine 01/25/89 - TOUCH
- Rem Fine 12/08/88 - Fold in UNIX porting changes
- Rem Hsi 08/31/88 - Change tables' name
- Rem Hsi 08/26/88 - Creation
- Rem
-
- spool iadview.lis
-
- drop view form_app
- /
- drop view form_blk
- /
- drop view form_fld
- /
- drop view form_trigger
- /
- drop view form_trg
- /
- drop view form_sqltxt
- /
- drop view form_page
- /
- drop view form_map
- /
- drop view form_comment
- /
- drop view form_reference
- /
- drop view form_procedure
- /
- drop view form_authuser
- /
- drop view form_user
- /
- rename form_app to form_app_
- /
- rename form_blk to form_blk_
- /
- rename form_fld to form_fld_
- /
- rename form_trigger to form_trigger_
- /
- rename form_trg to form_trg_
- /
- rename form_sqltxt to form_sqltxt_
- /
- rename form_page to form_page_
- /
- rename form_map to form_map_
- /
- rename form_comment to form_comment_
- /
- rename form_reference to form_reference_
- /
- rename form_procedure to form_procedure_
- /
- create table form_user_
- (
- usrapowner char(30) not null,
- usrapname char(30) not null,
- usruser char(30) not null
- )
- /
- drop index iform_user
- /
- create unique index iform_user
- on form_user_(usrapowner,usrapname,usruser)
- /
- create view form_authuser as
- select * from form_user_
- where usruser = user
- or usruser = 'PUBLIC'
- with check option
- /
- create view form_user as
- select * from form_user_
- where usrapowner = user
- with check option
- /
- create view form_app as
- select * from form_app_
- where appowner = user
- or ( appowner, appname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_blk as
- select * from form_blk_
- where blkapowner = user
- or ( blkapowner, blkapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_fld as
- select * from form_fld_
- where fldapowner = user
- or ( fldapowner, fldapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_trigger as
- select * from form_trigger_
- where trigapowner = user
- or ( trigapowner, trigapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_trg as
- select * from form_trg_
- where trgapowner = user
- or ( trgapowner, trgapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_sqltxt as
- select * from form_sqltxt_
- where sqtapowner = user
- or ( sqtapowner, sqtapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_page as
- select * from form_page_
- where pagapowner = user
- or ( pagapowner, pagapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_map as
- select * from form_map_
- where mapapowner = user
- or ( mapapowner, mapapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_comment as
- select * from form_comment_
- where cmtapowner = user
- or ( cmtapowner, cmtapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_reference as
- select * from form_reference_
- where refapowner = user
- or ( refapowner, refapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- create view form_procedure as
- select * from form_procedure_
- where procapowner = user
- or ( procapowner, procapname ) in
- ( select usrapowner, usrapname from form_authuser )
- with check option
- /
- grant select
- on system.form_authuser
- to public
- /
- grant select, insert, update, delete
- on system.form_user
- to public
- /
- drop public synonym form_authuser
- /
- create public synonym form_authuser
- for system.form_authuser
- /
- drop public synonym form_user
- /
- create public synonym form_user
- for system.form_user
- /
-
- spool off
-