반응형


SSH Java client GUI for Unix, Linux administration and monitoring


리눅스 시스템 관리 및 모니터링 툴

총론.... (아... 세시간동안 캡쳐 뜨고 설치 및 사용 해봤으나.... 초보를 위한 툴임...)

시험기간 5년 동안 무료 (http://sshadmincontrol.com/download-admin-tool)
(사용자 등록을 하면 등록된 메일로 

** 전제조건 jre 1.6 이상 설치 필요(monkey 1.2.0 설치하고 난 뒤 JRE가 미설치 되어 있으면 안내페이지가 뜸)



특징

  • Remote Desktop Win (RDP)
  • PuTTY(포함)
  • WinSCP (포함)
  • Wireshark (별도 다운로드)
  • 당신의 서버들을 원격으로 제어 및 통제
  • 자동 방화벽 규칙 체크 : 엑셀로 결과 출력 
  • 여러서버들에게 동시에 유닉스 명령어를 다양하게 실행 
  • 당신의 서버들의 CPU와 메모리 대시보드 화면을 실시간으로 원격 모니터링 
  • 구글 대화 
  • NC Test
  • 네트워크 대역폭과 시스템 모니터링

화면(기능 특징 나열)








출처 : http://sshadmincontrol.com/

http://sourceforge.net/projects/sshadmincontrol/?source=directory




** 인터넷을 통한 매뉴얼 검색 : http://sshadmincontrol.com/documentation


1. 사용자 등록하기


    - 웹 사이트 : http://sshadmincontrol.com/download-admin-tool


    - 아래에 보듯이 붉은 별 ( * ) 표시를 모두 입력해야 하나 크롬 or IE에서도 아래와 같이 깨져 있어 정상적으로 입력화면이 인식되지 않는다... 따라서 * 표시를 클릭하여 해당하는 칸에 focus가 되면 입력한다.

    



2. 이메일을 통한 사용자 등록(5년 동안 무료로 사용 가능)



3. 설치된 프로그램을 통한 실행

    - 설치는 어렵지 않기 때문에 Pass

    - 설치된 아래의 아이콘을 실행(HelperMonkeyTool 실행)





4. 첫 실행

   

   - 90일 트라이얼 라이센스로 설치되었다는 안내 화면 (90이내로 등록하면 5년 무료 사용 가능... 그 이후는.. 잘...)




5. 서버 등록화면


- ServerName : 서버명으로 적음

- Address : 실제 서버 주소

- User : 접속할 사용자 계정

- Password : User에 맞는 암호

- Protocol : 사용 프로토콜 ( 기본적 22 port : ssh / 23 port : telnet ) 

   ※ 서버 환경을 변경하여 포트가 상이할 수 있으므로 담당자에게 반드시 확인 필요

- Domain : 도메인

- Environment : 환경

- Port : 사용 포트


위의 정보를 모두 입력 후 해당 줄에 우클릭을 눌러 Test Connection을 클릭하면 Server Name 앞에 정상적일 경우 v 표시가 뜨면, 만약 연결이 안될 시에는 X 표시가 떠 확인 가능함.





6. SSH 접근


   - 해당 서버에 우클릭을 선택하여 (위 화면 참조) Open Putty를 실행하면 아래와 같이 putty 접속화면이 뜸


      




7. SCP (Secure Copy) 사용 해 보기


  - SCP 명령을 통해 파일 복사하기

  - 화면상에 SCP를 클릭하고 (처음 실행시 Yes를 한번 눌러준다)



- 위의 SCP 클릭한 화면





- SCP 상에 한글 깨짐(폰트 설정) 현상시 환경 설정에서 글꼴 변경을 통해 해결 하기

 

WinSCP기동->Envirment->UTF-8 encoding for filename

Auto 를 On으로 변경



8. 모니터링 하기(네트워크 모니터링)


   - Bandwidth Monitor





- 모니터링 환경 설정으로 Default는 기본으로 1분 단위로 모니터링 이며, Aggressive는 1초 단위로 모니터링 하는 것임

   > 크리티컬 하게 시스템 장애시 Aggressive으로 설정 뒤 Set Properties 클릭 





-  eth1 네트워크에 대한 NIC 네트워크 대역 폭, CPU 등 정보를 표기 함

- Extend View 클릭을 통해 전체를 더 상세하게 조회 가능함



- 시스템의 상태를 전체적인 GUI 형태로 조회함




8. 모니터링 하기(ADV 모니터링)


- ADV Monitor을 클릭하여 결과를 엑셀 파일을 저장한뒤 RECORD Charting 기능을 통해 GUI 결과를 조회할 수 있음


- ADV Monitor -> Aggressive -> Set Properties 


- 좌측 붉은 색 RECORD (CPU/RAM)을 클릭하면 Aggressive 설정에 지정된 시간 단위로 파일로 저장

 

- 우측에 흰 RECORD을 누르면 저장된 파일의 디렉토리가 조회 가능함


- 좌측 붉은 색 RECORD 클릭



- RECORD 한뒤 서버에서 PING을 실행하여 네트워크 및 CPU 부하 발생 뒤 STOP을 눌러 멈춤



- RECORD 한뒤 서버에서 PING을 실행하여 네트워크 및 CPU 부하 발생 뒤 STOP을 눌러 멈춤

- RECORD Charting을 눌러 저장된 GUI을 조회





- 우측 위에 파일 선택(여러개 캡쳐한 경우)

- Refactor에서 Mavg, CPU, RAM 값 선택 가능, 시간(Secords, Minutes, Hours, Days)을 선택하여 기록된 정보를 기준으로 대쉬 보드를 조회 가능함



9. 모니터링 하기(디스크 모니터링)

- DISK Monitor을 눌러 디스크 공간 조회 가능



- 디스크 공간 조회 




반응형

'UTILITY' 카테고리의 다른 글

정규식 방법  (0) 2014.06.17
Process Hacker  (0) 2014.03.26
secureCRT 대신 putty 사용하기 (멀티탭 관련)  (0) 2014.03.01
윈도우 빠른 파일 검색 및 내용 검색  (1) 2014.02.11
Virtual BOX SATA 방식의 XP  (0) 2013.07.23
반응형


형태

오라클 계정 -> 5분 단위로 해서 -> 아래의 테이블 생성후 -> Crontab 으로 조회하여 입력하는 형태

자세한 것은 Shell, Crontab 정보를 찾으면서 하면됨

-- 임의로 실행하는 쿼리목록 조회하기
select      to_char(sysdate,'yyyymmdd'),
            to_char(sysdate, 'HH24'),
            to_char(sysdate, 'MI'),
            A.inst_id,
            A.SID,
            A.SERIAL#,
            A.USERNAME,
            A.TYPE,
            A.STATUS,
            A.STATE,
            A.EVENT,
            A.OSUSER,
            A.PROGRAM,
            A.MACHINE,
            A.SQL_ADDRESS,
            B.SQL_ID,
            B.sharable_mem,
            B.persistent_mem,
            B.runtime_mem,
            B.first_load_time,
            B.OPTIMIZER_MODE,
            B.OPTIMIZER_COST,
            B.MODULE,
            B.SQL_FULLTEXT
   from     GV$SESSION a, GV$SQL B
  WHERE     A.STATUS = 'ACTIVE'                       -- 현재 활성화된
    AND     B.ADDRESS=A.SQL_ADDRESS                   -- FULL SQL TEXT 를 얻기 위해
    AND     A.MACHINE NOT IN ('NewWas1','NewWas2')    -- 접속 Machine 이름이 NewWas1, NewWas2 는 아님
    AND     UPPER(B.SQL_FULLTEXT) NOT LIKE '%V$%';    -- V$ 로 시작하는 뷰를 보는 경우는 제외
   
   
CREATE TABLE MStorage.USER_SQL_LOG
(
      VIEW_YMD   VARCHAR2(8) DEFAULT to_char(sysdate,'yyyymmdd'),
      VIEW_HH    VARCHAR2(2) DEFAULT to_char(sysdate, 'HH24'),
      VIEW_MI    VARCHAR2(2) DEFAULT to_char(sysdate, 'MI'),
      INST_ID    NUMBER,
      SID      NUMBER,
      SERIAL#    NUMBER,
      USERNAME   VARCHAR2(30),
      TYPE     VARCHAR2(10),
      STATUS    VARCHAR2(8),
      STATE     VARCHAR2(19),
      EVENT     VARCHAR2(64),
      OSUSER    VARCHAR2(30),
      PROGRAM    VARCHAR2(48),
      MACHINE    VARCHAR2(64),
      SQL_ADDRESS RAW(8),
      SQL_ID   VARCHAR2(13),
      SHARABLE_MEM NUMBER,
      PERSISTENT_MEM NUMBER,
      RUNTIME_MEM NUMBER,
      FIRST_LOAD_TIME VARCHAR2(38),
      OPTIMIZER_MODE VARCHAR2(10),
      OPTIMIZER_COST NUMBER,
      MODULE     VARCHAR2(64),
      SQL_FULLTEXT  CLOB
) TABLESPACE MStorage;

COMMENT ON TABLE MStorage.USER_SQL_LOG IS '로그 모니터링 테이블(GV$SESSION) 참조';

 


-- 인덱스 생성
CREATE INDEX MStorage.IX_USER_SQL_LOG_01 ON MStorage.USER_SQL_LOG
(
  VIEW_YMD,VIEW_HH, VIEW_MI
)
TABLESPACE MStorage;

 


-- 실제 입력 구문

INSERT INTO MStorage.USER_SQL_LOG
       (
       inst_id,
            SID,
            SERIAL#,
            USERNAME,
            TYPE,
            STATUS,
            STATE,
            EVENT,
            OSUSER,
            PROGRAM,
            MACHINE,
            SQL_ADDRESS,
            SQL_ID,
            sharable_mem,
            persistent_mem,
            runtime_mem,
            first_load_time,
            OPTIMIZER_MODE,
            OPTIMIZER_COST,
            MODULE,
            SQL_FULLTEXT               
            )
select      A.inst_id,
            A.SID,
            A.SERIAL#,
            A.USERNAME,
            A.TYPE,
            A.STATUS,
            A.STATE,
            A.EVENT,
            A.OSUSER,
            A.PROGRAM,
            A.MACHINE,
            A.SQL_ADDRESS,
            B.SQL_ID,
            B.sharable_mem,
            B.persistent_mem,
            B.runtime_mem,
            B.first_load_time,
            B.OPTIMIZER_MODE,
            B.OPTIMIZER_COST,
            B.MODULE,
            B.SQL_FULLTEXT
   from     GV$SESSION a, GV$SQL B
  WHERE     1=1-- A.STATUS = 'ACTIVE'                       -- 현재 활성화된
    AND     B.ADDRESS=A.SQL_ADDRESS                   -- FULL SQL TEXT 를 얻기 위해
    AND     A.MACHINE NOT IN ('NewWas1','NewWas2')    -- 접속 Machine 이름이 NewWas1, NewWas2 는 아님
    AND     UPPER(B.SQL_FULLTEXT) NOT LIKE '%V$%';    -- V$ 로 시작하는 뷰를 보는 경우는 제외

반응형
반응형

.bff 파일은 AIX 시스템에서는

다음과 같이 설치가능하다.

1. java1.4.2.bff 파일을 FTP를 사용하여 AIX 시스템에 upload(/tmp/java14/)

2. root로 접근하여 smitty install or smitty installp 하여 해당 디렉토리(/tmp/java14/)를 설치하면
   자동으로 설치됨.
반응형

'OS > AIX' 카테고리의 다른 글

날짜 관련 얻기  (0) 2011.03.02
AIX 5.3 OPENSSH INSTALL  (0) 2011.02.16
IBM AIX 용 JAVA 다운로드 주소  (0) 2010.12.07
AIX 5.3에서 Tomcat 설치 및 기본 홈 디렉토리 변경  (1) 2010.12.07
AIX 시스템 점검 쉘  (0) 2010.06.04
반응형

VMS....


뭐 그냥 그렇지요...


반응형
반응형

어디서(사람, p/g) 서 잘못된 비밀번호로 로긴을 여러번 시도하면...락이 걸립니다.

 

예로 아래 scott이 DEFAULT profile 을 사용합니다.

 

SQL> select username, account_status, lock_date,PROFILE   from dba_users where username ='SCOTT';

USERNAME             ACCOUNT_STATUS       LOCK_DAT PROFILE
-------------------- -------------------- -------- --------------------
SCOTT                EXPIRED & LOCKED     10/06/24 DEFAULT  <---


아래 보시면...암호가 연속3회 실패하면 계정이 락이 걸리게 되어 있습니다.

 

  1* select * from dba_profiles
SQL> /

PROFILE              RESOURCE_NAME                  RESOURCE_TYPE    LIMIT
-------------------- ------------------------------ ---------------- --------------------
DEFAULT              COMPOSITE_LIMIT                KERNEL           UNLIMITED
DEFAULT              SESSIONS_PER_USER              KERNEL           UNLIMITED
DEFAULT              CPU_PER_SESSION                KERNEL           UNLIMITED
DEFAULT              CPU_PER_CALL                   KERNEL           UNLIMITED
DEFAULT              LOGICAL_READS_PER_SESSION      KERNEL           UNLIMITED
DEFAULT              LOGICAL_READS_PER_CALL         KERNEL           UNLIMITED
DEFAULT              IDLE_TIME                      KERNEL           UNLIMITED
DEFAULT              CONNECT_TIME                   KERNEL           UNLIMITED
DEFAULT              PRIVATE_SGA                    KERNEL           UNLIMITED
DEFAULT              FAILED_LOGIN_ATTEMPTS          PASSWORD         3 <-----
DEFAULT              PASSWORD_LIFE_TIME             PASSWORD         UNLIMITED
DEFAULT              PASSWORD_REUSE_TIME            PASSWORD         UNLIMITED
DEFAULT              PASSWORD_REUSE_MAX             PASSWORD         UNLIMITED
DEFAULT              PASSWORD_VERIFY_FUNCTION       PASSWORD         NULL
DEFAULT              PASSWORD_LOCK_TIME             PASSWORD         UNLIMITED
DEFAULT              PASSWORD_GRACE_TIME            PASSWORD         UNLIMITED

 

이것을 막기 위해서는 어디서 잘못된 암호로 로긴을 시도하는지 찾거나 안될 경우 3을 unlimited로 바꿉니다

반응형

'Database > ORACLE' 카테고리의 다른 글

DBMS_METADATA  (0) 2010.08.05
tnsnames.ora 등록 없이 Database Link 만들기  (0) 2010.08.03
오라클 클론 디비로 복구 하기  (0) 2010.07.13
PL/SQL Exception  (0) 2010.07.06
RMAN 사용법  (0) 2010.07.06
반응형


올해 30세 초반인 필자는

용인으로 신혼집을 정했으니....

문제는 서울에 온지는 3년이 넘었으나... 방배동 <-> 삼성역 간의 길 밖에 모른다는 것입니다...

더구나... 청담역 <-> 삼성역 간의 버스를 제외하곤 버스를 탈일이 없었습니다....

우선 급한 불인 신혼집을 구하고 나니... 헉... 고속버스를 타고 무조건 와야 하나 어찌나 걱정이 되던지...

긴 한숨에 걱정만 태산이었습니다...

주위의 사람들에게 물어도 서울 버스 노선은 대부분 자기가 타는 노선만 기억하고 타고 다니고 있더군요...

우짜지... 머리속은 깜깜해 졌고...

물론 인터넷 검색을 해봐도

용인에서 삼성역까지 빠른길 ... 오는 방법.... 최단 거리... 아침에 출근하기 좋은 방법...

별의별 검색을 해봐도 찾기란... 에휴....

그러다가

경기도 버스 정보 시스템 사이트가 존재하는 것을 알게 되었고

쉽게 노선을 검색하는 방법을 찾게 되었네요.

경기도 버스 정보 시스템 사이트 주소 : http://www.gbis.go.kr/




노선 검색

메인 화면 -> 실시간 검색 -> 노선 검색의 화면입니다.


통합 검색 메뉴에는
1. 노선번호 2. 건물명 3. 정류소 번호 4. 정류소명 4개의 선택 박스가 존재한다.
가장 먼저 노선번호는 우리가 볼수 있는 버스의 번호이다. 아래는 용인 <-> 강남역 구간을 운행하는 5002 번 노선을 검색한 결과이다.


검색결과를 보면 5002번에 대해 용인, 서울 이라는 검색 결과가 나오며 상세보기를 클릭하면 아래와 같은 화면을 볼수 있다.

검색결과 아래를 보면 실제 정류장도 확인 할 수 있어 어디서 타야 하는지 정확하게 알수 있습니다.

또한 그아래에 보면 배차 간격과 첫차 시간등을 알수 있어 매우 유익 합니다.


더 자세한 내용은

서비스 이용안내를 누르면 바로 확인 가능합니다.

반응형
반응형

#echo $ODMDIR /etc/objrepos에 있어야 함

# odmget -q attribute=route CuAt  <- 여기에 route 정보들을 가진 ODM stanza가 나열됨.

## 아래 예 ##
CuAt:
        name = "inet0"
        attribute = "route"
        value = "net,-hopcount,0,,0,165.244.227.1"
        type = "R"
        generic = "DU"
        rep = "s"
        nls_index = 0

CuAt:
        name = "inet0"
        attribute = "route"
        value = "net,-hopcount,0,,0,165.244.226.1"
        type = "R"
        generic = "DU"
        rep = "s"
        nls_index = 0

해당하는 default gateway를 반드시 확인하고 잘못된 route 정보들을 ODM에서 지우기 위해서는

#  odmget -q attribute=route CuAt  에서 나온 정보 중 value 값을 copy 해서 지웁니다.

value 부분을 쓸때는 따옴표를 주의

#  odmdelete -q "value=net,-hopcount,0,,0,165.244.226.1" -o CuAt

0518-307 odmdelete: 1 objects deleted.


정확히 확인을 위해서 다시 odmget을 통하여 default value 확인

# odmget -q attribute=route CuAt 

CuAt:
        name = "inet0"
        attribute = "route"
        value = "net,-hopcount,0,,0,165.244.227.1"
        type = "R"
        generic = "DU"
        rep = "s"
        nls_index = 0
#

마지막으로 netstat -nr을 통하여 route 정보 확인
여기서는 route delete option을 통하여 삭제

반응형
반응형

출처 : 오라클 사이트

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm#SQLRF01603

GRANT

Purpose

Use the GRANT statement to grant:

  • System privileges to users and roles.

  • Roles to users and roles. Both privileges and roles are either local, global, or external. Table 18-1 lists the system privileges (organized by the database object operated upon). Table 18-2 lists Oracle Database predefined roles.

  • Object privileges for a particular object to users, roles, and PUBLIC. Table 18-3 summarizes the object privileges that you can grant on each type of object. Table 18-4 lists object privileges and the operations that they authorize.

Notes on Authorizing Database Users You can authorize database users through means other than the database and the GRANT statement.

  • Many Oracle Database privileges are granted through supplied PL/SQL and Java packages. For information on those privileges, please refer to the documentation for the appropriate package.

  • Some operating systems have facilities that let you grant roles to Oracle Database users with the initialization parameter OS_ROLES. If you choose to grant roles to users through operating system facilities, then you cannot also grant roles to users with the GRANT statement, although you can use the GRANT statement to grant system privileges to users and system privileges and roles to other roles.

See Also:

Additional Topics

Prerequisites

To grant a system privilege, you must either have been granted the system privilege with the ADMIN OPTION or have been granted the GRANT ANY PRIVILEGE system privilege.

To grant a role, you must either have been granted the role with the ADMIN OPTION or have been granted the GRANT ANY ROLE system privilege, or you must have created the role.

To grant an object privilege, you must own the object, or the owner of the object must have granted you the object privileges with the GRANT OPTION, or you must have been granted the GRANT ANY OBJECT PRIVILEGE system privilege. If you have the GRANT ANY OBJECT PRIVILEGE, then you can grant the object privilege only if the object owner could have granted the same object privilege. In this case, the GRANTOR column of the DBA_TAB_PRIVS view displays the object owner rather than the user who issued the GRANT statement.

Syntax

grant::=

Description of grant.gif follows
Description of the illustration grant.gif

(grant_system_privileges::=, grant_object_privileges::=)

grant_system_privileges::=

Description of grant_system_privileges.gif follows
Description of the illustration grant_system_privileges.gif

(grantee_clause ::=)

grant_object_privileges::=

Description of grant_object_privileges.gif follows
Description of the illustration grant_object_privileges.gif

(on_object_clause ::=, grantee_clause ::=)

on_object_clause ::=

Description of on_object_clause.gif follows
Description of the illustration on_object_clause.gif

grantee_clause ::=

Description of grantee_clause.gif follows
Description of the illustration grantee_clause.gif

Semantics

grant_system_privileges

Use these clauses to grant system privileges.

system_privilege

Specify the system privilege you want to grant. Table 18-1 lists the system privileges, organized by the database object operated upon.

  • If you grant a privilege to a user, then the database adds the privilege to the user's privilege domain. The user can immediately exercise the privilege.

  • If you grant a privilege to a role, then the database adds the privilege to the privilege domain of the role. Users who have been granted and have enabled the role can immediately exercise the privilege. Other users who have been granted the role can enable the role and exercise the privilege.

  • If you grant a privilege to PUBLIC, then the database adds the privilege to the privilege domains of each user. All users can immediately perform operations authorized by the privilege.

Oracle Database provides the ALL PRIVILEGES shortcut for granting all the system privileges listed in Table 18-1, except the SELECT ANY DICTIONARY privilege.

role

Specify the role you want to grant. You can grant an Oracle Database predefined role or a user-defined role. Table 18-2 lists the predefined roles.

  • If you grant a role to a user, then the database makes the role available to the user. The user can immediately enable the role and exercise the privileges in the privilege domain of the role.

  • If you grant a role to another role, then the database adds the privilege domain of the granted role to the privilege domain of the grantee role. Users who have been granted the grantee role can enable it and exercise the privileges in the granted role's privilege domain.

  • If you grant a role to PUBLIC, then the database makes the role available to all users. All users can immediately enable the role and exercise the privileges in the privilege domain of the role.

    See Also:

    "Granting a Role to a Role: Example" and CREATE ROLE for information on creating a user-defined role

IDENTIFIED BY Clause

Use the IDENTIFIED BY clause to specifically identify an existing user by password or to create a nonexistent user. This clause is not valid if the grantee is a role or PUBLIC. If the user specified in the grantee_clause does not exist, then the database creates the user with the password and with the privileges and roles specified in this clause.

See Also:

CREATE USER for restrictions on usernames and passwords

WITH ADMIN OPTION

Specify WITH ADMIN OPTION to enable the grantee to:

  • Grant the role to another user or role, unless the role is a GLOBAL role

  • Revoke the role from another user or role

  • Alter the role to change the authorization needed to access it

  • Drop the role

If you grant a system privilege or role to a user without specifying WITH ADMIN OPTION, and then subsequently grant the privilege or role to the user WITH ADMIN OPTION, then the user has the ADMIN OPTION on the privilege or role.

To revoke the ADMIN OPTION on a system privilege or role from a user, you must revoke the privilege or role from the user altogether and then grant the privilege or role to the user without the ADMIN OPTION.

grantee_clause

TO grantee_clause identifies users or roles to which the system privilege, role, or object privilege is granted.

Restriction on Grantees A user, role, or PUBLIC cannot appear more than once in TO grantee_clause.

PUBLIC Specify PUBLIC to grant the privileges to all users.

Restrictions on Granting System Privileges and Roles Privileges and roles are subject to the following restrictions:

  • A privilege or role cannot appear more than once in the list of privileges and roles to be granted.

  • You cannot grant a role to itself.

  • You cannot grant a role IDENTIFIED GLOBALLY to anything.

  • You cannot grant a role IDENTIFIED EXTERNALLY to a global user or global role.

  • You cannot grant roles circularly. For example, if you grant the role banker to the role teller, then you cannot subsequently grant teller to banker.

grant_object_privileges

Use these clauses to grant object privileges.

object_privilege

Specify the object privilege you want to grant. You can specify any of the values shown in Table 18-3. See also Table 18-4.

Restriction on Object Privileges A privilege cannot appear more than once in the list of privileges to be granted.

ALL [PRIVILEGES]

Specify ALL to grant all the privileges for the object that you have been granted with the GRANT OPTION. The user who owns the schema containing an object automatically has all privileges on the object with the GRANT OPTION. The keyword PRIVILEGES is provided for semantic clarity and is optional.

column

Specify the table or view column on which privileges are to be granted. You can specify columns only when granting the INSERT, REFERENCES, or UPDATE privilege. If you do not list columns, then the grantee has the specified privilege on all columns in the table or view.

For information on existing column object grants, query the USER_, ALL_, or DBA_COL_PRIVS data dictionary view.

on_object_clause

The on_object_clause identifies the object on which the privileges are granted. Directory schema objects and Java source and resource schema objects are identified separately because they reside in separate namespaces.

If you can make this grant only because you have the GRANT ANY OBJECT PRIVILEGE system privilege--that is, you are not the owner of object, nor do you have object_privilege on object WITH GRANT OPTION--then the effect of this grant is that you are acting on behalf of the object owner. The *_TAB_PRIVS data dictionary views will reflect that this grant was made by the owner of object.

See Also:

WITH GRANT OPTION

Specify WITH GRANT OPTION to enable the grantee to grant the object privileges to other users and roles.

Restriction on Granting WITH GRANT OPTION You can specify WITH GRANT OPTION only when granting to a user or to PUBLIC, not when granting to a role.

WITH HIERARCHY OPTION

Specify WITH HIERARCHY OPTION to grant the specified object privilege on all subobjects of object, such as subviews created under a view, including subobjects created subsequent to this statement.

This clause is meaningful only in combination with the SELECT object privilege.

object Specify the schema object on which the privileges are to be granted. If you do not qualify object with schema, then the database assumes the object is in your own schema. The object can be one of the following types:

  • Table, view, or materialized view

  • Sequence

  • Procedure, function, or package

  • User-defined type

  • Synonym for any of the preceding items

  • Directory, library, operator, or indextype

  • Java source, class, or resource

You cannot grant privileges directly to a single partition of a partitioned table.

DIRECTORY directory_name Specify a directory schema object on which privileges are to be granted. You cannot qualify directory_name with a schema name.

JAVA SOURCE | RESOURCE The JAVA clause lets you specify a Java source or resource schema object on which privileges are to be granted.

See Also:

CREATE JAVA

Listings of System and Object Privileges

Note:

When you grant a privilege on ANY object, such as CREATE ANY CLUSTER, the result is determined by the value of the O7_DICTIONARY_ACCESSIBILITY initialization parameter. By default, this parameter is set to FALSE, so that ANY privileges give the grantee access to that type of object in all schemas except the SYS schema. If you set O7_DICTIONARY_ACCESSIBILITY to TRUE, then the ANY privileges also give the grantee access, in the SYS schema, to all objects except Oracle Scheduler objects. For security reasons, Oracle recommends that you use this setting only with great caution.

Table 18-1 System Privileges

System Privilege Name Operations Authorized

Advisor Framework Privileges: All of the advisor framework privileges are part of the DBA role.

--

ADVISOR

Access the advisor framework through PL/SQL packages such as DBMS_ADVISOR and DBMS_SQLTUNE.

Please refer to PL/SQL Packages and Types Reference for information on these packages.

ADMINISTER SQL TUNING SET

Create, drop, select (read), load (write), and delete a SQL tuning set owned by the grantee through the DBMS_SQLTUNE package.

ADMINISTER ANY SQL TUNING SET

Create, drop, select (read), load (write), and delete a SQL tuning set owned by any user through the DBMS_SQLTUNE package.

CREATE ANY SQL PROFILE

Accept a SQL Profile recommended by the SQL Tuning Advisor, which is accessed through Enterprise Manager or by the DBMS_SQLTUNE package.

DROP ANY SQL PROFILE

Drop an existing SQL Profile.

ALTER ANY SQL PROFILE

Alter the attributes of an existing SQL Profile.

CLUSTERS:

--

CREATE CLUSTER

Create clusters in the grantee's schema.

CREATE ANY CLUSTER

Create a cluster in any schema. Behaves similarly to CREATE ANY TABLE.

ALTER ANY CLUSTER

Alter clusters in any schema.

DROP ANY CLUSTER

Drop clusters in any schema.

CONTEXTS:

--

CREATE ANY CONTEXT

Create any context namespace.

DROP ANY CONTEXT

Drop any context namespace.

DATABASE:

--

ALTER DATABASE

Alter the database.

ALTER SYSTEM

Issue ALTER SYSTEM statements.

AUDIT SYSTEM

Issue AUDIT statements.

DATABASE LINKS:

--

CREATE DATABASE LINK

Create private database links in the grantee's schema.

CREATE PUBLIC DATABASE LINK

Create public database links.

DROP PUBLIC DATABASE LINK

Drop public database links.

DEBUGGING:

--

DEBUG CONNECT SESSION

Connect the current session to a debugger.

DEBUG ANY PROCEDURE

Debug all PL/SQL and Java code in any database object. Display information on all SQL statements executed by the application.

Note: Granting this privilege is equivalent to granting the DEBUG object privilege on all applicable objects in the database.

DIMENSIONS:

--

CREATE DIMENSION

Create dimensions in the grantee's schema.

CREATE ANY DIMENSION

Create dimensions in any schema.

ALTER ANY DIMENSION

Alter dimensions in any schema.

DROP ANY DIMENSION

Drop dimensions in any schema.

DIRECTORIES:

--

CREATE ANY DIRECTORY

Create directory database objects.

DROP ANY DIRECTORY

Drop directory database objects.

INDEXTYPES:

--

CREATE INDEXTYPE

Create an indextype in the grantee's schema.

CREATE ANY INDEXTYPE

Create an indextype in any schema and create a comment on an indextype in any schema.

ALTER ANY INDEXTYPE

Modify indextypes in any schema.

DROP ANY INDEXTYPE

Drop an indextype in any schema.

EXECUTE ANY INDEXTYPE

Reference an indextype in any schema.

INDEXES:

--

CREATE ANY INDEX

Create in any schema a domain index or an index on any table in any schema.

ALTER ANY INDEX

Alter indexes in any schema.

DROP ANY INDEX

Drop indexes in any schema.

JOB SCHEDULER OBJECTS:

The following privileges are needed to execute procedures in the DBMS_SCHEDULER package.

CREATE JOB

Create jobs, schedules, or programs in the grantee's schema.

CREATE ANY JOB

Create, alter, or drop jobs, schedules, or programs in any schema.

Note: This extremely powerful privilege allows the grantee to execute code as any other user. It should be granted with caution.

CREATE EXTERNAL JOB

Create in the grantee's schema an executable scheduler job that runs on the operating system.

EXECUTE ANY PROGRAM

Use any program in a job in the grantee's schema.

EXECUTE ANY CLASS

Specify any job class in a job in the grantee's schema.

MANAGE SCHEDULER

Create, alter, or drop any job class, window, or window group.

LIBRARIES:

--

CREATE LIBRARY

Create external procedure or function libraries in the grantee's schema.

CREATE ANY LIBRARY

Create external procedure or function libraries in any schema.

DROP ANY LIBRARY

Drop external procedure or function libraries in any schema.

MATERIALIZED VIEWS:

--

CREATE MATERIALIZED VIEW

Create a materialized view in the grantee's schema.

CREATE ANY MATERIALIZED VIEW

Create materialized views in any schema.

ALTER ANY MATERIALIZED VIEW

Alter materialized views in any schema.

DROP ANY MATERIALIZED VIEW

Drop materialized views in any schema.

QUERY REWRITE

This privilege has been deprecated. No privileges are needed for a user to enable rewrite for a materialized view that references tables or views in the user's own schema.

GLOBAL QUERY REWRITE

Enable rewrite using a materialized view when that materialized view references tables or views in any schema.

ON COMMIT REFRESH

Create a refresh-on-commit materialized view on any table in the database.

Alter a refresh-on-demand materialized on any table in the database to refresh-on-commit.

FLASHBACK ANY TABLE

Issue a SQL Flashback Query on any table, view, or materialized view in any schema. This privilege is not needed to execute the DBMS_FLASHBACK procedures.

OPERATORS:

--

CREATE OPERATOR

Create an operator and its bindings in the grantee's schema.

CREATE ANY OPERATOR

Create an operator and its bindings in any schema and create a comment on an operator in any schema.

ALTER ANY OPERATOR

Modify an operator in any schema.

DROP ANY OPERATOR

Drop an operator in any schema.

EXECUTE ANY OPERATOR

Reference an operator in any schema.

OUTLINES:

--

CREATE ANY OUTLINE

Create public outlines that can be used in any schema that uses outlines.

ALTER ANY OUTLINE

Modify outlines.

DROP ANY OUTLINE

Drop outlines.

PROCEDURES:

--

CREATE PROCEDURE

Create stored procedures, functions, and packages in the grantee's schema.

CREATE ANY PROCEDURE

Create stored procedures, functions, and packages in any schema.

ALTER ANY PROCEDURE

Alter stored procedures, functions, or packages in any schema.

DROP ANY PROCEDURE

Drop stored procedures, functions, or packages in any schema.

EXECUTE ANY PROCEDURE

Execute procedures or functions, either standalone or packaged.

Reference public package variables in any schema.

PROFILES:

--

CREATE PROFILE

Create profiles.

ALTER PROFILE

Alter profiles.

DROP PROFILE

Drop profiles.

ROLES:

--

CREATE ROLE

Create roles.

ALTER ANY ROLE

Alter any role in the database.

DROP ANY ROLE

Drop roles.

GRANT ANY ROLE

Grant any role in the database.

ROLLBACK SEGMENTS:

--

CREATE ROLLBACK SEGMENT

Create rollback segments.

ALTER ROLLBACK SEGMENT

Alter rollback segments.

DROP ROLLBACK SEGMENT

Drop rollback segments.

SEQUENCES:

--

CREATE SEQUENCE

Create sequences in the grantee's schema.

CREATE ANY SEQUENCE

Create sequences in any schema.

ALTER ANY SEQUENCE

Alter any sequence in the database.

DROP ANY SEQUENCE

Drop sequences in any schema.

SELECT ANY SEQUENCE

Reference sequences in any schema.

SESSIONS:

--

CREATE SESSION

Connect to the database.

ALTER RESOURCE COST

Set costs for session resources.

ALTER SESSION

Issue ALTER SESSION statements.

RESTRICTED SESSION

Logon after the instance is started using the SQL*Plus STARTUP RESTRICT statement.

SNAPSHOTS:

See MATERIALIZED VIEWS

SYNONYMS:

--

CREATE SYNONYM

Create synonyms in the grantee's schema.

CREATE ANY SYNONYM

Create private synonyms in any schema.

CREATE PUBLIC SYNONYM

Create public synonyms.

DROP ANY SYNONYM

Drop private synonyms in any schema.

DROP PUBLIC SYNONYM

Drop public synonyms.

TABLES:

Note: For external tables, the only valid privileges are CREATE ANY TABLE, ALTER ANY TABLE, DROP ANY TABLE, and SELECT ANY TABLE.

CREATE TABLE

Create tables in the grantee's schema.

CREATE ANY TABLE

Create tables in any schema. The owner of the schema containing the table must have space quota on the tablespace to contain the table.

ALTER ANY TABLE

Alter any table or view in any schema.

BACKUP ANY TABLE

Use the Export utility to incrementally export objects from the schema of other users.

DELETE ANY TABLE

Delete rows from tables, table partitions, or views in any schema.

DROP ANY TABLE

Drop or truncate tables or table partitions in any schema.

INSERT ANY TABLE

Insert rows into tables and views in any schema.

LOCK ANY TABLE

Lock tables and views in any schema.

SELECT ANY TABLE

Query tables, views, or materialized views in any schema.

FLASHBACK ANY TABLE

Issue a SQL Flashback Query on any table, view, or materialized view in any schema. This privilege is not needed to execute the DBMS_FLASHBACK procedures.

UPDATE ANY TABLE

Update rows in tables and views in any schema.

TABLESPACES:

--

CREATE TABLESPACE

Create tablespaces.

ALTER TABLESPACE

Alter tablespaces.

DROP TABLESPACE

Drop tablespaces.

MANAGE TABLESPACE

Take tablespaces offline and online and begin and end tablespace backups.

UNLIMITED TABLESPACE

Use an unlimited amount of any tablespace. This privilege overrides any specific quotas assigned. If you revoke this privilege from a user, then the user's schema objects remain but further tablespace allocation is denied unless authorized by specific tablespace quotas. You cannot grant this system privilege to roles.

TRIGGERS:

--

CREATE TRIGGER

Create a database trigger in the grantee's schema.

CREATE ANY TRIGGER

Create database triggers in any schema.

ALTER ANY TRIGGER

Enable, disable, or compile database triggers in any schema.

DROP ANY TRIGGER

Drop database triggers in any schema.

ADMINISTER DATABASE TRIGGER

Create a trigger on DATABASE. You must also have the CREATE TRIGGER or CREATE ANY TRIGGER system privilege.

TYPES:

--

CREATE TYPE

Create object types and object type bodies in the grantee's schema.

CREATE ANY TYPE

Create object types and object type bodies in any schema.

ALTER ANY TYPE

Alter object types in any schema.

DROP ANY TYPE

Drop object types and object type bodies in any schema.

EXECUTE ANY TYPE

Use and reference object types and collection types in any schema, and invoke methods of an object type in any schema if you make the grant to a specific user. If you grant EXECUTE ANY TYPE to a role, then users holding the enabled role will not be able to invoke methods of an object type in any schema.

UNDER ANY TYPE

Create subtypes under any nonfinal object types.

USERS:

--

CREATE USER

Create users. This privilege also allows the creator to:

  • Assign quotas on any tablespace.

  • Set default and temporary tablespaces.

  • Assign a profile as part of a CREATE USER statement.

ALTER USER

Alter any user. This privilege authorizes the grantee to:

  • Change another user's password or authentication method.

  • Assign quotas on any tablespace.

  • Set default and temporary tablespaces.

  • Assign a profile and default roles.

DROP USER

Drop users

VIEWS:

--

CREATE VIEW

Create views in the grantee's schema.

CREATE ANY VIEW

Create views in any schema.

DROP ANY VIEW

Drop views in any schema.

UNDER ANY VIEW

Create subviews under any object views.

FLASHBACK ANY TABLE

Issue a SQL Flashback Query on any table, view, or materialized view in any schema. This privilege is not needed to execute the DBMS_FLASHBACK procedures.

MERGE ANY VIEW

If a user has been granted the MERGE ANY VIEW privilege, then for any query issued by that user, the optimizer can use view merging to improve query performance without performing the checks that would otherwise be performed to ensure that view merging does not violate any security intentions of the view creator. See also Oracle Database Reference for information on the OPTIMIZER_SECURE_VIEW_MERGING parameter and Oracle Database Performance Tuning Guide for information on view merging.

MISCELLANEOUS:

--

ANALYZE ANY

Analyze any table, cluster, or index in any schema.

AUDIT ANY

Audit any object in any schema using AUDIT schema_objects statements.

CHANGE NOTIFICATION

Create a registration on queries and receive database change notifications in response to DML or DDL changes to the objects associated with the registered queries. Please refer to Oracle Database Application Developer's Guide - Fundamentals for more information on database change notification.

COMMENT ANY TABLE

Comment on any table, view, or column in any schema.

EXEMPT ACCESS POLICY

Bypass fine-grained access control.

Caution: This is a very powerful system privilege, as it lets the grantee bypass application-driven security policies. Database administrators should use caution when granting this privilege.

FORCE ANY TRANSACTION

Force the commit or rollback of any in-doubt distributed transaction in the local database.

Induce the failure of a distributed transaction.

FORCE TRANSACTION

Force the commit or rollback of the grantee's in-doubt distributed transactions in the local database.

GRANT ANY OBJECT PRIVILEGE

Grant any object privilege that the object owner is permitted to to grant.

Revoke any object privilege that was granted by the object owner or by some other user with the GRANT ANY OBJECT PRIVILEGE privilege.

GRANT ANY PRIVILEGE

Grant any system privilege.

RESUMABLE

Enable resumable space allocation.

SELECT ANY DICTIONARY

Query any data dictionary object in the SYS schema. This privilege lets you selectively override the default FALSE setting of the O7_DICTIONARY_ACCESSIBILITY initialization parameter.

SELECT ANY TRANSACTION

Query the contents of the FLASHBACK_TRANSACTION_QUERY view.

Caution: This is a very powerful system privilege, as it lets the grantee view all data in the database, including past data. This privilege should be granted only to users who need to use the Oracle Flashback Transaction Query feature.

SYSDBA

Perform STARTUP and SHUTDOWN operations.

ALTER DATABASE: open, mount, back up, or change character set.

CREATE DATABASE.

ARCHIVELOG and RECOVERY.

CREATE SPFILE.

Includes the RESTRICTED SESSION privilege.

SYSOPER

Perform STARTUP and SHUTDOWN operations.

ALTER DATABASE: open, mount, or back up.

ARCHIVELOG and RECOVERY.

CREATE SPFILE.

Includes the RESTRICTED SESSION privilege.

CONNECT, RESOURCE, and DBA

These roles are provided for compatibility with previous versions of Oracle Database. You can determine the privileges encompassed by these roles by querying the DBA_SYS_PRIVS data dictionary view.

Note: Oracle recommends that you design your own roles for database security rather than relying on these roles. These roles may not be created automatically by future versions of Oracle Database.

See Also: Oracle Database Reference for a description of the DBA_SYS_PRIVS view

DELETE_CATALOG_ROLE EXECUTE_CATALOG_ROLE SELECT_CATALOG_ROLE

These roles are provided for accessing data dictionary views and packages.

See Also: Oracle Database Administrator's Guide for more information on these roles

EXP_FULL_DATABASE

IMP_FULL_DATABASE

These roles are provided for convenience in using the import and export utilities.

See Also: Oracle Database Utilities for more information on these roles

AQ_USER_ROLE

AQ_ADMINISTRATOR_ROLE

You need these roles to use Oracle Advanced Queuing.

See Also: Oracle Streams Advanced Queuing User's Guide and Reference for more information on these roles

SNMPAGENT

This role is used by the Enterprise Manager Intelligent Agent.

See Also: Oracle Enterprise Manager Administrator's Guide

RECOVERY_CATALOG_OWNER

You need this role to create a user who owns a recovery catalog.

See Also: Oracle Database Backup and Recovery Advanced User's Guide for more information on recovery catalogs


Table 18-2 Oracle Database Predefined Roles

Predefined Role Purpose

HS_ADMIN_ROLE

A DBA using Oracle Database heterogeneous services needs this role to access appropriate tables in the data dictionary.

See Also: Oracle Database Heterogeneous Connectivity Administrator's Guide for more information

SCHEDULER_ADMIN

This role allows the grantee to execute the procedures of the DBMS_SCHEDULER package. It includes all of the job scheduler system privileges and is included in the DBA role.

See Also: Oracle Database Administrator's Guide for more information on the DBMS_SCHEDULER package


Table 18-3 Object Privileges Available for Particular Objects

Object Privilege Table View Sequence Procedure, Function, Package (Note 1) Material-ized View Directory Library User- defined Type Operator Indextype

ALTER (Note 2)

X

--

X

--

--

--

--

--

--

--

DELETE

X

X

--

--

X

(Note 3)

--

--

--

--

--

EXECUTE

--

--

--

X

(Note 2)

--

--

X

(Note 2)

X

(Note 2)

X

(Note 2)

X

(Note 2)

DEBUG

X

X

--

X

--

--

--

X

--

--

FLASHBACK

X

X

--

--

X

--

--

--

--

--

INDEX

X

--

--

--

--

--

--

--

--

--

INSERT

X

X

--

--

X

(Note 3)

--

--

--

--

--

ON COMMIT REFRESH

X

--

--

--

--

--

--

--

--

--

QUERY REWRITE

X

--

--

--

--

--

--

--

--

--

READ

--

--

--

--

--

X

--

--

--

--

REFERENCES

X

X

--

--

--

--

--

--

--

--

SELECT

X

X

X

--

X

--

--

--

--

--

UNDER

--

X

--

--

--

--

--

X

--

--

UPDATE

X

X

--

--

X (Note 3)

--

--

--

--

--

WRITE

--

--

--

--

--

X

--

--

--

--


Note 1: Oracle Database treats a Java class, source, or resource as if it were a procedure for purposes of granting object privileges.

Note 2: Job scheduler objects are created using the DBMS_SCHEDULER package. After these objects are created, you can grant the EXECUTE object privilege on job scheduler classes and programs. You can grant ALTER privilege on job scheduler jobs, programs, and schedules.

Note 3: The DELETE, INSERT, and UPDATE privileges can be granted only to updatable materialized views.

Table 18-4 Object Privileges and the Operations They Authorize

Object Privilege Operations Authorized

TABLE PRIVILEGES

The following table privileges authorize operations on a table. Any one of following object privileges allows the grantee to lock the table in any lock mode with the LOCK TABLE statement.

Note: For external tables, the only valid object privileges are ALTER and SELECT.

ALTER

Change the table definition with the ALTER TABLE statement.

DELETE

Remove rows from the table with the DELETE statement.

Note: You must grant the SELECT privilege on the table along with the DELETE privilege if the table is on a remote database.

DEBUG

Access, through a debugger:

  • PL/SQL code in the body of any triggers defined on the table

  • Information on SQL statements that reference the table directly

INDEX

Create an index on the table with the CREATE INDEX statement.

INSERT

Add new rows to the table with the INSERT statement.

REFERENCES

Create a constraint that refers to the table. You cannot grant this privilege to a role.

SELECT

Query the table with the SELECT statement.

UPDATE

Change data in the table with the UPDATE statement.

Note: You must grant the SELECT privilege on the table along with the UPDATE privilege if the table is on a remote database.

VIEW PRIVILEGES

The following view privileges authorize operations on a view. Any one of the following object privileges allows the grantee to lock the view in any lock mode with the LOCK TABLE statement.

To grant a privilege on a view, you must have that privilege with the GRANT OPTION on all of the base tables of the view.

DEBUG

Access, through a debugger:

  • PL/SQL code in the body of any triggers defined on the view

  • Information on SQL statements that reference the view directly

DELETE

Remove rows from the view with the DELETE statement.

INSERT

Add new rows to the view with the INSERT statement.

REFERENCES

Define foreign key constraints on the view.

SELECT

Query the view with the SELECT statement.

UNDER

Create a subview under this view. You can grant this object privilege only if you have the UNDER ANY VIEW privilege WITH GRANT OPTION on the immediate superview of this view.

UPDATE

Change data in the view with the UPDATE statement.

SEQUENCE PRIVILEGES

The following sequence privileges authorize operations on a sequence.

ALTER

Change the sequence definition with the ALTER SEQUENCE statement.

SELECT

Examine and increment values of the sequence with the CURRVAL and NEXTVAL pseudocolumns.

PROCEDURE, FUNCTION, PACKAGE PRIVILEGES

The following procedure, function, and package privileges authorize operations on procedures, functions, and packages. These privileges also apply to Java sources, classes, and resources, which Oracle Database treats as though they were procedures for purposes of granting object privileges.

DEBUG

Access, through a debugger, all public and nonpublic variables, methods, and types defined on the object.

Place a breakpoint or stop at a line or instruction boundary within the procedure, function, or package. This privilege grants access to the declarations in the method or package specification and body.

EXECUTE

Execute the procedure or function directly, or access any program object declared in the specification of a package, or compile the object implicitly during a call to a currently invalid or uncompiled function or procedure. This privilege does not allow the grantee to explicitly compile using ALTER PROCEDURE or ALTER FUNCTION. For explicit compilation you need the appropriate ALTER system privilege.

Access, through a debugger, public variables, types, and methods defined on the procedure, function, or package. This privilege grants access to the declarations in the method or package specification only.

Note: Users do not need this privilege to execute a procedure, function, or package indirectly.

See Also: Oracle Database Concepts and Oracle Database Application Developer's Guide - Fundamentals

MATERIALIZED VIEW PRIVILEGES

The following materialized view privileges authorize operations on a materialized view.

ON COMMIT REFRESH

Create a refresh-on-commit materialized view on the specified table.

QUERY REWRITE

Create a materialized view for query rewrite using the specified table.

SELECT

Query the materialized view with the SELECT statement.

SYNONYM PRIVILEGES

Synonym privileges are the same as the privileges for the base object. Granting a privilege on a synonym is equivalent to granting the privilege on the base object. Similarly, granting a privilege on a base object is equivalent to granting the privilege on all synonyms for the object. If you grant to a user a privilege on a synonym, then the user can use either the synonym name or the base object name in the SQL statement that exercises the privilege.

DIRECTORY PRIVILEGES

The following directory privileges provide secured access to the files stored in the operating system directory to which the directory object serves as a pointer. The directory object contains the full path name of the operating system directory where the files reside. Because the files are actually stored outside the database, Oracle Database server processes also need to have appropriate file permissions on the file system server. Granting object privileges on the directory database object to individual database users, rather than on the operating system, allows the database to enforce security during file operations.

READ

Read files in the directory.

WRITE

Write files in the directory. This privilege is useful only in connection with external tables. It allows the grantee to determine whether the external table agent can write a log file or a bad file to the directory.

Restriction: This privilege does not allow the grantee to write to a BFILE.

LIBRARY PRIVILEGE

The following library privilege authorizes operations on a library.

EXECUTE

Use and reference the specified object and invoke its methods.

OBJECT TYPE PRIVILEGES

The following object type privileges authorize operations on a database object type.

DEBUG

Access, through a debugger, all public and nonpublic variables, methods, and types defined on the object type.

Place a breakpoint or stop at a line or instruction boundary within the type body.

EXECUTE

Use and reference the specified object and invoke its methods.

Access, through a debugger, public variables, types, and methods defined on the object type.

UNDER

Create a subtype under this type. You can grant this object privilege only if you have the UNDER ANY TYPE privilege WITH GRANT OPTION on the immediate supertype of this type.

INDEXTYPE PRIVILEGE

The following indextype privilege authorizes operations on indextypes.

EXECUTE

Reference an indextype.

OPERATOR PRIVILEGE

The following operator privilege authorizes operations on user-defined operators.

EXECUTE

Reference an operator.


Examples

Granting a System Privilege to a User: Example To grant the CREATE SESSION system privilege to the sample user hr, allowing hr to log on to Oracle Database, issue the following statement:

GRANT CREATE SESSION 
   TO hr; 

Granting System Privileges to a Role: Example The following statement grants appropriate system privileges to a data warehouse manager role, which was created in the "Creating a Role: Example":

GRANT
     CREATE ANY MATERIALIZED VIEW
   , ALTER ANY MATERIALIZED VIEW
   , DROP ANY MATERIALIZED VIEW
   , QUERY REWRITE
   , GLOBAL QUERY REWRITE
   TO dw_manager
   WITH ADMIN OPTION;

The dw_manager privilege domain now contains the system privileges related to materialized views.

Granting a Role with the Admin Option: Example To grant the dw_manager role with the ADMIN OPTION to the sample user sh, issue the following statement:

GRANT dw_manager 
   TO sh 
   WITH ADMIN OPTION; 

User sh can now perform the following operations with the dw_manager role:

  • Enable the role and exercise any privileges in the privilege domain of the role, including the CREATE MATERIALIZED VIEW system privilege

  • Grant and revoke the role to and from other users

  • Drop the role

Granting Object Privileges to a Role: Example The following example grants the SELECT object privileges to a data warehouse user role, which was created in the "Creating a Role: Example":

GRANT SELECT ON sh.sales TO warehouse_user;

Granting a Role to a Role: Example The following statement grants the warehouse_user role to the dw_manager role. Both roles were created in the "Creating a Role: Example":

GRANT warehouse_user TO dw_manager; 

The dw_manager role now contains all of the privileges in the domain of the warehouse_user role.

Granting an Object Privilege on a Directory: Example To grant READ on directory bfile_dir to user hr, with the GRANT OPTION, issue the following statement:

GRANT READ ON DIRECTORY bfile_dir TO hr
   WITH GRANT OPTION;

Granting Object Privileges on a Table to a User: Example To grant all privileges on the table oe.bonuses, which was created in "Merging into a Table: Example", to the user hr with the GRANT OPTION, issue the following statement:

GRANT ALL ON bonuses TO hr 
   WITH GRANT OPTION; 

The user hr can subsequently perform the following operations:

  • Exercise any privilege on the bonuses table

  • Grant any privilege on the bonuses table to another user or role

Granting Object Privileges on a View: Example To grant SELECT and UPDATE privileges on the view emp_view, which was created in "Creating a View: Example", to all users, issue the following statement:

GRANT SELECT, UPDATE 
   ON emp_view TO PUBLIC; 

All users can subsequently query and update the view of employee details.

Granting Object Privileges to a Sequence in Another Schema: Example To grant SELECT privilege on the customers_seq sequence in the schema oe to the user hr, issue the following statement:

GRANT SELECT 
   ON oe.customers_seq TO hr; 

The user hr can subsequently generate the next value of the sequence with the following statement:

SELECT oe.customers_seq.NEXTVAL 
   FROM DUAL; 

Granting Multiple Object Privileges on Individual Columns: Example To grant to user oe the REFERENCES privilege on the employee_id column and the UPDATE privilege on the employee_id, salary, and commission_pct columns of the employees table in the schema hr, issue the following statement:

GRANT REFERENCES (employee_id), 
      UPDATE (employee_id, salary, commission_pct) 
   ON hr.employees
   TO oe; 

The user oe can subsequently update values of the employee_id, salary, and commission_pct columns. User oe can also define referential integrity constraints that refer to the employee_id column. However, because the GRANT statement lists only these columns, oe cannot perform operations on any of the other columns of the employees table.

For example, oe can create a table with a constraint:

CREATE TABLE dependent 
   (dependno   NUMBER, 
    dependname VARCHAR2(10), 
    employee   NUMBER 
   CONSTRAINT in_emp REFERENCES hr.employees(employee_id) );

The constraint in_emp ensures that all dependents in the dependent table correspond to an employee in the employees table in the schema hr.

반응형

'Database > ORACLE' 카테고리의 다른 글

rman Tool  (0) 2010.02.01
WS1-2-ch18. Data Pump (expdp/impdp) overview  (0) 2010.02.01
`BIN$+......==$0` 알수 없는 테이블..  (0) 2010.01.14
sqlplus 환경 설정  (0) 2010.01.08
Partition Table  (0) 2009.12.29
반응형

유닉스도 여러종류가 있는데 어떤 유닉스인가요? hp,sun,ibm...등등..

.profile에 넣어서는 오라클이 자동실행이 되질 않습니다....

sun unix기준으로 자동으로 오라클이 올라오게 하려면...


sun solaris 부팅 시 oracle DB를 auto startup하도록 하는 데 관련된 화일들이다.

/etc/inittab : o/s의 초기화 과정을 조절하는 화일
/etc/rc2 : 부팅 run-level 2 에서 사용되는 스크립트
/etc/rc0 : 부팅 run-level 0 에서 사용되는 스크립트
/etc/rc2.d/S99dbstart : /etc/init.d/dbstart 에 대한 symbolic link
/etc/rc0.d/K01dbshut : /etc/init.d/dbshut 에 대한 symbolic link
/var/opt/oracle/oratab : 시스템에 설치된 오라클 인스턴스에 대한 정보.

(참고)
/etc/init.d/dbstart, dbshut 화일은 super user(root)로 생성하시고,
symbolic link도 super user로 만드시기 바랍니다.
이 화일들은 super user가 owner가 되도록 하고, super user(root)만이
실행 가능하도록 해야 합니다.


1. 먼저 vi /etc/inittab 화일을 열어보십시오.

ap::sysinit:/sbin/autopush -f /etc/iu.ap
fs::sysinit:/sbin/rcS >/dev/console 2>&1 is:3:initdefault:
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/console 2>&1
s0:0:wait:/sbin/rc0 >/dev/console 2>&1 s1:1:wait:/usr/sbin/shutdown -y -iS -g0 >/dev/console 2>&1 s2:23:wait:/sbin/rc2 >/dev/console 2>&1 s3:3:wait:/sbin/rc3 >/dev/console 2>&1 s5:5:wait:/sbin/rc5 >/dev/console 2>&1 s6:6:wait:/sbin/rc6 >/dev/console 2>&1 fw:0:wait:/sbin/uadmin 2 0 >/dev/console 2>&1 of:5:wait:/sbin/uadmin 2 6 >/dev/console 2>&1 rb:6:wait:/sbin/uadmin 2 1 >/dev/console 2>&1 sc:234:respawn:/usr/lib/saf/sac -t 300
co:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` console login: " -T
sun
-d /dev/console -l console -m ldterm,ttcompat

s1부터 s6까지 os file들에 대해 위와 같이 device redirection이 연결되어
있으면 됩니다.

------------------------------------------------------------------------
s2:23:wait:/sbin/rc2 >/dev/console 2>&1
위와 같이 설정하면 run-level 2일 경우 /sbin/rc2 스크립트가 실행된다.
/sbin/rc2 는 /etc/rc2.d 디렉토리에 들어있는 스크립트를 실행한다.
만약 스크립트가 S 로 시작하면 /sbin/rc2 는 이 스크립트에 startup 파라미
터를 부여하고 여기서 지정된 프로세스를 실행시킨다.
따라서 /etc/rc2.d/S99dbstart 화일을 사용하여 dbstart를 실행한다.

shutdown 과정도 거의 비슷하다. /etc/inittab 에 다음과 같은 라인을 보자.

s0:0:wait:/sbin/rc0 >/dev/console 2>&1
이것은 /sbin/rc0 를 실행시키는데 /sbin/rc0 는 /etc/rc0.d 디렉토리에
들어있는 스크립트를 실행시킨다.
스크립트 이름이 K 로 시작하면 이것은 stop 파라미터를 갖고 실행되어서 이
스크립트에 지정된 프로세스를 정지시킨다.
따라서 /etc/rc0.d/K01dbshut 스크립트는 stop 파라미터를 갖고 실행되며
이 스크립트는 $ORACLE_HOME/bin/dbshut 스크립트를 실행시켜서 오라클을
shutdown 시킨다.
------------------------------------------------------------------------


2. 그 다음에 vi /etc/rc2 화일을 한번 열어보세요.

이 스크립트 화일은 run-level 2에서 사용되는 스크립트입니다.
특별히 수정할 내용은 없으나, 이 화일이 존재하는지 확인해 보십시오.

PATH=/usr/sbin:/usr/bin
set `/usr/bin/who -r`
if [ x$9 = "xS" -o x$9 = "x1" ]
then
echo 'The system is coming up. Please wait.'
BOOT=yes
...


3. 그 다음에 vi /etc/rc0 화일을 한번 열어보세요.

이 스크립트 화일은 run-level 0에서 사용되는 스크립트입니다.
특별히 수정할 내용은 없으나, 이 화일이 존재하는지 확인해 보십시오.

PATH=/usr/sbin:/usr/bin

echo 'The system is coming down. Please wait.'

# make sure /usr is mounted before proceeding since init scripts
# and this shell depend on things on /usr file system
/sbin/mount /usr > /dev/null 2>&1

# The following segment is for historical purposes.
# There should be nothing in /etc/shutdown.d.
if [ -d /etc/shutdown.d ]
then
for f in /etc/shutdown.d/*
{
if [ -s $f ]
then
/sbin/sh ${f}
fi
}
fi
...


4. /etc/init.d/dbstart 와 /etc/init.d/dbshut 스크립트를 만들어야 합니다.
그 내용은 각각 다음과 같이 한 줄로 작성합니다.

/etc/init.d/dbstart 화일은 다음과 같이 만듭니다.
su - -c <$ORACLE_HOME>/bin/dbstart
/etc/init.d/dbshut 화일은 다음과 같이 만듭니다.
su - -c <$ORACLE_HOME>/bin/dbshut



5. /etc/rc2.d/S99dbstart 화일을 /etc/init.d/dbstart에 대한 link로 생성합니다.

ln -s /etc/init.d/dbstart /etc/rc2.d/S99dbstart


6. /etc/rc0.d/K01dbshut 화일을 /etc/init.d/dbshut에 대한 link로 생성합니다.

ln -s /etc/init.d/dbshut /etc/rc0.d/K01dbshut


7. /var/opt/oracle/oratab 화일을 엽니다.

oratab 화일은 일반 텍스트 화일로서 시스템에 설치된 오라클 인스턴스에 대한
정보를 가지고 있는데 보통 3개의 필드로 이루어져 있으며,
첫번재 필드는 ORACLE_SID, 두번째 필드는 ORACLE_HOME, 세번째 필드는 Y 또는
N으로 구성되어 있습니다. 해당 인스턴스를 auto startup 시키려면 세번째
필드가 반드시 Y로 세팅되어 있어야 합니다.

아래에 예를 참조하세요.

ORA805:/oracle4/ora8/app/oracle/product/8.0.5:Y
ORA815:/oracle4/ora8i/app/oracle/product/8.1.5:Y

(주)
만약, <$ORACLE_HOME>/bin/dbstart 수행에 오류가 있으면 기존의 dbstart 화
일을 다른 path에 rename하고, 아래 내용만 가지고 <$ORACLE_HOME>/bin/ 아래
에 dbstart 화일을 다음과 같이 만든다.

svrmgrl connect internal
startup
exit
EOF


Example
-------
none


Reference doc-uments
-------------------
none



블루틴참조


반응형

+ Recent posts