-- beflyt 계정에서
sql> select 'grant select on '||TABLE_NAME||' to BEFLYS;' from user_all_tables;
-- system 계정에서
sql> select 'grant select on '||TABLE_NAME||' to BEFLYS;' from user_all_tables where owner = 'BEFLYT';
beflyt 계정에서 beflys 계정의 모든 테이블에 select 권한을 회수할때
다른 계정에 권한(SELECT,INSERT,DELETE..) 할당하기
scott 계정의 stable 테이블을 eagle 계정에서 select 할 수 있게 적용하는 방법
scott 계정으로 로그인한다.
$ sqlplus scott/******
권한을 생성한다.
SQL> grant select on stable to eagle;
아래처럼 스크립트로 만들어서 적용할 수도 있다.
#!/bin/sh
if [ $USER != "oracle" ] ; then
echo "'$USER' is not oracle "
fi
sqlplus /nolog <<EOF
connect scott/******
grant select on stable to eagle;
EOF
dbms/oracle/admin/oraclegrantmanage.txt · 마지막으로 수정됨: (바깥 편집)