--For sequence
select 'grant select on '||object_name||' to A_ADMIN;' from user_objects where object_type='SEQUENCE';
--For table
select 'grant select on '||object_name||' to A_ADMIN;' from user_objects where object_type='TABLE';
select 'grant insert on '||object_name||' to A_ADMIN;' from user_objects where object_type='TABLE';
select 'grant update on '||object_name||' to A_ADMIN;' from user_objects where object_type='TABLE';
select 'grant delete on '||object_name||' to A_ADMIN;' from user_objects where object_type='TABLE';
--For view
select 'grant select on '||object_name||' to A_ADMIN;' from user_objects where object_type='VIEW';
select 'grant insert on '||object_name||' to A_ADMIN;' from user_objects where object_type='VIEW';
select 'grant update on '||object_name||' to A_ADMIN;' from user_objects where object_type='VIEW';
select 'grant delete on '||object_name||' to A_ADMIN;' from user_objects where object_type='VIEW';
--For procedure
select 'grant execute on '||object_name||' to A_ADMIN;' from user_objects where object_type='PROCEDURE';
--For function
select 'grant execute on '||object_name||' to A_ADMIN;' from user_objects where object_type='FUNCTION';
--For package
select 'grant execute on '||object_name||' to A_ADMIN;' from user_objects where object_type='PACKAGE';
시노님 작업>
select 'create synonym '||object_name||' for '||owner||'.'||object_name||';' from dba_objects where object_type in ('TABLE','VIEW','PROCEDURE','FUNCTION','PACKAGE') and owner in ('CA_USR','KA_USR','ACADM2');
select 'create synonym '||object_name||' for HMCWAS.'||object_name||';' from user_objects where object_type='SEQUENCE';
select 'create synonym '||object_name||' for HMCWAS.'||object_name||';' from user_objects where object_type='TABLE';
select 'create synonym '||object_name||' for HMCWAS.'||object_name||';' from user_objects where object_type='VIEW';
select 'create synonym '||object_name||' for HMCWAS.'||object_name||';' from user_objects where object_type='PROCEDURE';
select 'create synonym '||object_name||' for HMCWAS.'||object_name||';' from user_objects where object_type='FUNCTION';
select 'create synonym '||object_name||' for HMCWAS.'||object_name||';' from user_objects where object_type='PACKAGE';
HCA_USER
grant select on R_USERINFO to HA_ADM;
grant insert on R_USERINFO to HA_ADM;
grant insert on V_OUT_USER to HA_ADM;
grant update on R_USERINFO to HA_ADM;
grant update on V_OUT_USER to HA_ADM;
grant delete on R_USERINFO to HA_ADM;
grant delete on V_OUT_USER to HA_ADM;
ACADM2
grant execute on FN_GET_NOTICE_COUNT to KA_ADM;
grant execute on FN_GET_NOTICE_COUNT to KA_ADM;
'DataBase > Sql' 카테고리의 다른 글
[Mysql] already closed 오류 (0) | 2013.02.06 |
---|---|
[Sql] MySql - mysql table, field별 권한 설절 (0) | 2013.01.24 |
[Sql] 페이지 단위 조회 (0) | 2012.11.28 |
[Sql] Trunc (0) | 2012.11.22 |
[Oracle] update where (0) | 2012.11.12 |