사용자 도구

사이트 도구


dbms:oracle:admin:oraclegrantmanage

문서의 이전 판입니다!


오라클 권한관리

타 계정에 권한 부여/회수하기

  1. scott 계정에서
  2. beflyt 계정에서 beflys 계정의 모든 테이블에 select 권한을 부여할때
-- 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';
  1. beflyt 계정에서 beflys 계정의 모든 테이블에 select 권한을 회수할때


다른 계정에 권한(SELECT,INSERT,DELETE..) 할당하기

  • scott 계정의 stable 테이블을 eagle 계정에서 select 할 수 있게 적용하는 방법
    1. scott 계정으로 로그인한다.
      $ sqlplus scott/******
    2. 권한을 생성한다.
      SQL> grant select on stable to eagle;
    3. 아래처럼 스크립트로 만들어서 적용할 수도 있다.
      #!/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.1182445814.txt.gz · 마지막으로 수정됨: 2007/06/22 02:10 저자 starlits