Oracle Managed File Feature

What is Oralce Managed File Feature?
Sai***Baba

Study the link
http://download.oracle.com/docs/cd/B14117_01/server.101/b10739/omf.htm
Regards
Singh

Similar Messages

  • How to transfer files using Oracle Managed File Transfer from Oracle EBS 12.1.3

    Hello,
    I'm looking for ideas to securely transfer files bi-directional between Oracle EBS 12.1.3 to IIS using Oracle Managed File Transfer and SOA.  Any help is greatly appreciated.
    Thanks

    Hi Hussain,
    In the Note 466649.1
    Edited
    I have installed R12.1.1
    Datafiles on installed on local file system /u01/EBS_DATa/*dbf, *.ctl, *.log
    doing non RAC to RAC conversion with ASM option,
    I am using ASM with RAC and created ASM disks (DATA, FRA, CRS) on Shared SAN disks between node1 and node2 which are DATA for CRD (control, redo and Data) files, FRA for archive files, CRS for cluster files while doing RAC instalation,
    now how i move my CRD on local file system /u01/EBS_DATa/*dbf, *.ctl, *.log to shared ASM disk DATA ???????
    Please describe with step wise,
    Thanks in advance.
    Regards,
    Vara
    Edited by: user13409653 on Jan 3, 2012 12:25 AM
    Edited by: user13409653 on Jan 3, 2012 5:10 AM

  • (9I) OMF(ORACLE MANAGED FILES) 개념과 사용 예제

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-01
    (9I) OMF(ORACLE MANAGED FILES) 개념과 사용 예제
    ==============================================
    PURPOSE
    Space Management와 관련된 Oracle 9i의 새로운 기능은 크게 다음 세 가지이다.
    - Oracle Managed Files, Delete Datafiles, Default Temporary Tablespace.
    이를 이용하면 개발 중인 혹은 운영 중인 데이터베이스에 대해 DBA의 수고를 덜게
    할 수 있다.
    Oracle 9i의 새 기능인 OMF에 대하여 개념과 사용 예제를 알아보기로 한다.
    Explanation
    DBA가 테이블스페이스를 생성할 때, 혹은 기존의 테이블스페이스에 새로운 데이터
    화일을 추가할 때, 실제 OS 화일명(디렉토리 포함)과 크기를 주면 자동으로 해당
    화일이 생성된다. 9i의 Oracle Managed Files(OMF) 기능을 이용하면 OS 화일명을
    줄 필요도 없다. 즉, 데이터베이스 차원에서 유일한 화일명을 생성하고, 그 이름의
    데이터 화일을 생성하는 것이다. 또한 OMF를 이용해 만들어진 데이터 화일의 경우,
    나중에 그 데이터 화일이 속한 테이블스페이스를 삭제하면 데이터 화일까지 자동
    으로 삭제가 된다. DBA가 필요없는 데이터 화일을 찾아서 OS 상에서 일일이 삭제
    해야만 하는 수고를 덜어주게 되는 것이다.
    1. Oracle Managed Files (OMF)
    Overview에서 기술했듯이 OMF를 이용하면 데이터베이스가 사용하는 OS 화일에 대해
    DBA가 일일이 관리해야 하는 번거로움을 덜 수 있다. OMF 화일은 Oracle 서버에 의해
    자동으로 생성(유일성을 보장하기 위한 Naming Structure 존재)되고 삭제된다.
    이 OMF를 이용할 수 있는 화일은 Control File, Online Redo Log File, Data File
    등이다.
    1) Benefits of Oracle Managed Files
    화일과 관련된 DBA 작업이 쉽다.
    유일한 화일명이 생성되기 때문에, DBA가 화일명을 잘못 사용할 염려가 없다.
    사용되지 않는 데이터 화일이 자동으로 삭제되기 때문에, 사용되지 않는 데이터
    화일에 의한 디스크 공간 낭비의 우려가 없다.
    테스트 데이터베이스, 개발용 데이터베이스 생성이 단순하다.
    SQL 스크립트에 OS의 화일명을 명시하지 않아도 되기 때문에 Portable Application
    개발이 용이하다.
    2) Oracle Managed File Configurations
    다음 두 가지의 초기 파라미터를 정의하면 된다.
    DB_CREATE_FILE_DEST : data file들이 위치하게 될 기본 디렉토리
    DB_CREATE_ONLINE_LOG_DEST_n : online redo log와 control file들이 위치하게
    될 기본 디렉토리 (n : 1과 5 사이의 정수 - for multiplexing)
    Note :
    위 두 파라미터는 ALTER SYSTEM/SESSION에 의해 동적으로 정의/변경될 수 있다.
    Note : DB_CREATE_FILE_DEST 파라미터는 정의되어 있지만 DB_CREATE_ONLINE_LOG_DEST_n
    파라미터가 정의되어 있지 않으면, 모든 화일들(Data Files, Control Files,
    Online Redo Logs)은 DB_CREATE_FILE_DEST 파라미터에 정의된 디렉토리에
    존재하게 된다.
    3) Oracle Managed File Name Structure
    OMF 화일은 Oracle Flexible Architecture(OFA)를 따르며 플랫폼에 의존적이다.
    아래는 Solaris 환경의 OMF Naming Structure의 예이다.
    Control Files : ora_%u.ctl
    Redo Log Files : ora_%g_%u.log
    Data Files : ora_%t_%u.dbf
    Temporary Data Files : ora_%t_%u.tmp
    Note :
    %u is an 8 character string that guarantees uniqueness.
    %t is the tablespace name, truncated if necessary.
    %g is the redo log file group number.
    ora_ identifies the file as an Oracle Managed File.
    Note : 위 Naming Structure를 따르지 않으면 OMF로 인식하지 않는다.
    즉, 위 Naming Structure를 따르는 화일을(OMF로 생성) 추후 이 structure
    를 따르지 않는 화일 이름으로 rename하게 되면 OMF 기능을 사용하지 못한다.
    별 다른 옵션 없이 DROP TABLESPACE를 수행하면 해당 데이터 화일의 OS
    화일이 자동으로 삭제되지는 않는다.
    4) Managing Control Files with OMF
    데이터베이스 생성 시 CONTROL_FILES 초기 파라미터를 정의하지 않으면
    DB_CREATE_ONLINE_LOG_DEST_n에 정의된 디렉토리에 Control File이 기본적으로
    생성된다(OMF). Control File 이름은 유일하게 생성되며 이 결과는 alert.log에
    기록이 된다. 데이터베이스 생성 후에는 CONTROL_FILES 초기 파라미터에 생성된
    Control File 이름을 정의해주어야 한다.
    5) Managing Online Redo Log Files with OMF
    Redo Log File specification 없이 아래와 같이 전체 Redo Log Group을 생성할
    수 있다.
    SQL> ALTER DATABASE ADD LOGFILE;
    Note : 이 경우 해당 redo log file은 DB_CREATE_ONLINE_LOG_DEST_n에 정의된
    디렉토리에 생성된다. 만일 이 파라미터 값이 정의되지 않았으면
    DB_CREATE_FILE_DEST 디렉토리에 생성된다.
    특정 Redo Log Group을 삭제할 때 관련 OMF 화일들은 OS 레벨에서 자동으로
    삭제된다.
    SQL> ALTER DATABASE DROP LOGFILE GROUP 3;
    Note : Archived Log File은 OMF일 수 없다.
    6) Managing Tablespaces with OMF
    아래와 같이 테이블스페이스를 생성하면 DB_CREATE_FILE_DEST에 정의된
    디렉토리에 크기가 100M인 데이터 화일이 자동으로 생성된다. 이 데이터 화일의
    이름은 Naming Structure에 의해 유일하게 만들어진다.
    (Autoextend On, Unlimited Restriction)
    SQL> CREATE TABLESPACE TBS1;
    데이터 화일의 기본 값 이외의 화일을 생성하려면 다음과 같이 하면 된다.
    SQL> CREATE TABLESPACE TBS1 DATAFILE SIZE 400M AUTOEXTEND OFF;
    기존 테이블스페이스에 데이터 화일을 추가하려면 다음과 같이 하면 된다.
    SQL> ALTER TABLESPACE TBS1 ADD DATAFILE;
    아래와 같이 테이블스페이스를 삭제하면 관련 데이터 화일(OMF)들도 OS 레벨에서
    삭제된다.
    SQL> DROP TABLESPACE TBS1;
    Note : DB_CREATE_FILE_DEST의 값은 다음과 같이 동적으로 변경할 수 있다.
    SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST = '/disk2/oradata/';
    세션 단위의 변경은 ALTER SESSION 구문을 사용하면 된다. 하지만 이와 같은
    변경이 이미 생성되어져 있는 데이터 화일의 위치를 바꾸는 것은 아니며,
    다만 새로 생성되는 데이터 화일에만 영향이 있다. OMF 기능을 사용하지 않으려면
    다음과 같이 하면 된다.
    SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST = '';
    Example
    테스트 1) OMF를 이용한 테이블스페이스 생성/삭제 및 이에 대한 확인
    As SYSTEM
    DB_CREATE_FILE_DEST 파라미터 값 정의
    SQL> alter session set db_create_file_dest='/d02/ora9i/oracle/dbs/ora9i/tbs_omf';
    - OMF를 이용한 테이블스페이스 생성 : 크기가 10M인 두 개의 데이터 화일 자동 생성
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 0
    SQL> create tablespace tbs_4 datafile size 10M, size 10M;
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 41024
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:10 ora_tbs_4_xbs141rr.dbf
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:10 ora_tbs_4_xbs142xv.dbf
    - 해당 테이블스페이스에 데이터 화일 추가
    SQL> alter tablespace tbs_4 add datafile size 10M;
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 61536
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:10 ora_tbs_4_xbs141rr.dbf
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:10 ora_tbs_4_xbs142xv.dbf
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:11 ora_tbs_4_xbs156ff.dbf
    - 해당 테이블스페이스 삭제 : 이 테이블스페이스의 모든 OMF 데이터 화일 자동 삭제
    SQL> drop tablespace tbs_4;
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 0
    테스트 2) OMF를 이용한 UNDO Tablespace 생성/삭제 및 이에 대한 확인
    As SYSTEM
    DB_CREATE_FILE_DEST 파라미터 값 정의
    SQL> alter session set db_create_file_dest='/d02/ora9i/oracle/dbs/ora9i/tbs_omf';
    - OMF를 이용한 UNDO 테이블스페이스 생성 : 크기가 10M인 데이터 화일 자동 생성
    SQL> create undo tablespace undotbs_1 datafile size 10M;
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 20512
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:12 ora_undotbs__xbs17brr.dbf
    - 해당 테이블스페이스에 데이터 화일 추가
    SQL> alter tablespace undotbs_1 add datafile size 10M;
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 41024
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:12 ora_undotbs__xbs17brr.dbf
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:13 ora_undotbs__xbs19hr8.dbf
    - 해당 테이블스페이스 삭제 : 이 테이블스페이스의 모든 OMF 데이터 화일 자동 삭제
    SQL> drop tablespace undotbs_1;
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 0
    테스트 3) OMF를 이용한 Temporary Tablespace 생성/삭제 및 이에 대한 확인
    As SYSTEM
    DB_CREATE_FILE_DEST 파라미터 값 정의
    SQL>alter session set db_create_file_dest ='/d02/ora9i/oracle/dbs/ora9i/tbs_omf';
    - OMF를 이용한 Locally Managed Temporary 테이블스페이스 생성 : 크기가 10M인
    데이터 화일 자동 생성
    SQL>create temporary tablespace omf_temp tempfile size 10M extent
    management local;
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 176
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:14 ora_omf_temp_xbs1cqrv.tmp
    - 해당 테이블스페이스에 temp file 추가
    SQL> alter tablespace omf_temp add tempfile size 10M;
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 352
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:14 ora_omf_temp_xbs1cqrv.tmp
    -rw-r----- 1 ora9i dba 10489856 Mar 12 17:15 ora_omf_temp_xbs1d9xp.tmp
    - 해당 테이블스페이스 삭제 : 이 테이블스페이스의 모든 OMF 데이터 화일 자동 삭제
    SQL> drop tablespace omf_temp;
    SQL> host ls -l /d02/ora9i/oracle/dbs/ora9i/tbs_omf
    total 0
    테스트 4) OMF를 이용한 Online Redo Log 생성/삭제 및 이에 대한 확인
    As SYSTEM
    DB_CREATE_ONLINE_LOG_DEST_n 파라미터 값 정의
    SQL> alter session set db_create_online_log_dest_1 =
    '/d02/ora9i/oracle/oradata/ora9i/redo_omf';
    - OMF를 이용한 새로운 Online Redo Log Group 생성 : 크기가 10M인 Online Redo
    Log File 자동 생성
    SQL> host ls -l /d02/ora9i/oracle/oradata/ora9i/redo_omf
    total 0
    SQL> select group#, member from v$logfile;
    GROUP# MEMBER
    3 /d02/ora9i/oracle/oradata/ora9i/redo03.log
    2 /d02/ora9i/oracle/oradata/ora9i/redo02.log
    1 /d02/ora9i/oracle/oradata/ora9i/redo01.log
    SQL> alter database add logfile size 10M;
    SQL> host ls -l /d02/ora9i/oracle/oradata/ora9i/redo_omf
    total 20512
    -rw-r----- 1 ora9i dba 10486272 Mar 12 17:15 ora_4_xbs1fv2r.log
    SQL> select group#, member from v$logfile;
    GROUP# MEMBER
    3 /d02/ora9i/oracle/oradata/ora9i/redo03.log
    2 /d02/ora9i/oracle/oradata/ora9i/redo02.log
    1 /d02/ora9i/oracle/oradata/ora9i/redo01.log
    4 /d02/ora9i/oracle/oradata/ora9i/redo_omf/ora_4_xbs1fv2r.log
    - 해당 Online Redo Log Group 삭제 : 이 Redo Log Group의 모든 OMF Redo Log
    Member 화일 자동 삭제
    SQL> alter database drop logfile group 4;
    SQL> host ls -l /d02/ora9i/oracle/oradata/ora9i/redo_omf
    total 0
    SQL> select group#, member from v$logfile;
    GROUP# MEMBER
    3 /d02/ora9i/oracle/oradata/ora9i/redo03.log
    2 /d02/ora9i/oracle/oradata/ora9i/redo02.log
    1 /d02/ora9i/oracle/oradata/ora9i/redo01.log
    Reference Document
    <Note:137482.1>

  • File locations / Oracle Managed Files / raw

    Hi,
    looking into installing 10g on a multidisk Linux box and I'm trying to understand the best way to lay out the box for best resilience, performance etc.
    What I'm trying to understand is whether I should use raw devices for datafiles, or Oracle Managed Files? I'm guessing for performance reasons that the ideal is to run the database server on a different drive from the OS (both of which use hardware RAID1) but can OMF sit on top of hardware RAID - what about raw device on top of hardware RAID?
    If we had RAM to play with (we do) would there be a significant performance gain in having the database server run from a ramdisk, or is it better to devote the RAM to, say, a larger SGA or PGA ?
    Thanks in advance,
    Andy

    I found it:
    ALTER DATABASE ADD LOGFILE SIZE 51200K;
    I had a little trouble finding it so if anyone needs it.

  • Disable Oracle Managed Files

    Hi all,
    I just have a question.
    In my DB I have db_create_file_dest as TRUE parameter (only that one).
    Can I set it as FALSE parameter with alter system set DB_CREATE_FILE_DEST='' scope=both clause without problem?
    I have a pshysical standby in that DB so, have I to change the parameter on Standby instance and rename the Oracle Managed Files labeled datafiles too?
    Thanks a lot.
    Regards!

    As you can see I have datafiles with different name and directory path in Primary and Standby instances so I'm afraid a possible switchover or failover does not work fine.
    This is the reason why I want to disable OMF in both instances and rename the OMF's datafiles in my Standby instance.And what docs are saying :
    Oracle recommends that when you set up Oracle Automatic Storage Management (ASM) and Oracle Managed Files (OMF) in a Data Guard configuration, set it up symmetrically on the primary and standby database. That is, if any database in the Data Guard configuration uses ASM, OMF, or both, then every database in the configuration should use ASM, OMF, or both, respectively. See the scenario in Section 13.5 for more information.http://docs.oracle.com/cd/B28359_01/server.111/b28294/standby.htm
    So, there is no issue of using OMF with dataguard, the only thing which you have to remember that it should be everything identical so that the two servers will be easiest to maintain.
    Regards
    Girish Sharma

  • Oracle Managed File

    Before we create a new database we can set the following parameters:
    db_create_file_dest='/uo1/oradata/'
    db_create_online_log_dest_1='/uo2/oradata/'
    db_create_online_log_dest_2='/uo3/oradata/'
    my question is where should i set them ?
    Is it in the init.ora file .
    Thanks in advance

    If you are creating a database manually, then set those parameters in your init.ora file. Else, if you are using DBCA wizard, click on "All Initiolization Parameter" button under "Memory" Tab" and set the value for those parameters.
    -Aqueel.

  • Question about how Oracle manages Redo Log Files

    Good morning,
    Assuming a configuration that consists of 2 redo log groups (Group A and B), each group consisting of 2 disks (Disks A1 & A2 for Group A and Disks B1 and B2 for group B). Further, let's assume that each redo log file resides by itself in a disk storage device and that the device is dedicated to it. Therefore in the above scenario, there are 4 disks, one for each redo log file and, each disk contains nothing else other than a redo log file. Furthermore, let's assume that the database is in ARCHIVELOG mode and that the archive files are stored on yet another different set of devices.
    sort of graphically:
        GROUP A             GROUP B
          A1                  B1
          A2                  B2The question is: When the disks that comprise Group A are filled and Oracle switches to the disks in Group B, can the disks in Group A be taken offline, maybe even physically removed from the system if necessary, without affecting the proper operation of the database ? Can the Archiver process be temporarily delayed until the disks (that were removed) are brought back online or is the DBA forced to wait until the Archiver process has finished creating a copy of the redo log file into the archive ?
    Thank you for your help,
    John.

    Hello,
    Dropping Log Groups
    To drop an online redo log group, you must have the ALTER DATABASE system privilege. Before dropping an online redo log group, consider the following restrictions and precautions:
    * An instance requires at least two groups of online redo log files, regardless of the number of members in the groups. (A group is one or more members.)
    * You can drop an online redo log group only if it is inactive. If you need to drop the current group, first force a log switch to occur.
    * Make sure an online redo log group is archived (if archiving is enabled) before dropping it. To see whether this has happened, use the V$LOG view.
    SELECT GROUP#, ARCHIVED, STATUS FROM V$LOG;
    GROUP# ARC STATUS
    1 YES ACTIVE
    2 NO CURRENT
    3 YES INACTIVE
    4 YES INACTIVE
    Drop an online redo log group with the SQL statement ALTER DATABASE with the DROP LOGFILE clause.
    The following statement drops redo log group number 3:
    ALTER DATABASE DROP LOGFILE GROUP 3;
    When an online redo log group is dropped from the database, and you are not using the Oracle Managed Files feature, the operating system files are not deleted from disk. Rather, the control files of the associated database are updated to drop the members of the group from the database structure. After dropping an online redo log group, make sure that the drop completed successfully, and then use the appropriate operating system command to delete the dropped online redo log files.
    When using Oracle-managed files, the cleanup of operating systems files is done automatically for you.
    Your Database wont be affected as you can operate with 2 redo log files in each group as The minimum number of redo log files required in a database is two because the LGWR (log writer) process writes to the redo log files in a circular manner. so the process will hang becuase you are having 2 only groups if you want to remove 1 add a third one and make it the current group then remove the one you want to be offline.
    Please refer to:
    http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/onlineredo.htm#7438
    Kind regards
    Mohamed
    Oracle DBA

  • DATABASE RESOURCE MANAGER ( ORACLE 8I NEW FEATURE )

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-16
    DATABASE RESOURCE MANAGER ( ORACLE 8I NEW FEATURE )
    ===================================================
    SCOPE
    8i~10g Standard Edition 에서는 Database Resource Manager 를 지원하지 않는다.
    Explanation
    Database Resource Manager란 OS에서 제공하는 자원 (예 : CPU 자원 )에 대해 DB
    차원에서 계획을 세워, 세부 관리를 할 수 있도록 해 주는 서비스이다.
    예를 들어 주간에 batch 작업을 처리하더라도, OLTP 업무에는 지장을 주지 않아야
    할 경우 batch 작업에 CPU 자원을 적게 할당해 주는 것이 바람직 하며, Resource
    Manager를 활용하여 CPU 자원을 batch 작업과 OLTP 업무에 서로 다르게 할당해 줄
    수 있다. ( Oracle 8.1.6 까지는 Resouurce Manager에서 CPU 자원에 대해서만
    관리만 가능하다 )
    1. 용어
    1) Resource Consumer Group
    사용자 session들의 집합. Resource에 대한 요구사항에 따라 나뉘어진 그룹.
    2) Resource Plan
         Consumer Group에 자원을 할당 해 주기 위한 resource plan directive들을
    포함.
    3) Resource Allocation Method
         Resource Manager에서 자원을 할당해 주는 방법/정책.
    4) Resource Plan Directive
         Resource Plan에 대해 자원을 할당해 주는 세부 내역.
    2. Resource Consumer Group
    * 기본 group
         [ 사용자가 삭제, 수정할 수 없는 group ]
         OTHER_GROUPS : active plan schema에 속하지 않는 consumer group의 모든
    session
         DEFAULT_CONSUMER_GROUP : consumer group을 지정하지 않은 모든
    session.(default)
         [ 기본적으로 제공되나 사용자가 삭제하거나 변경할 수 있는 group ]
         SYS_GROUP : SYSTEM_PLAN에 대한 high priority consumer group
    SYSTEM, SYS user에 할당한다.
         LOW_GROUP : SYSTEM_PLAN에 대한 low priority consumer group
    3. Resource Plan
         Consumer group에 속하는 session들은 해당 group에 대한 resource plan에
    따라 자원 할당이 결정되며, 자원 할당에 대한 세부 사항은 resource plan에
    대한 resource plan directive에서 지정된다.
         Resource plan은 subplan을 둘 수 있다.
    4. Resource Allocation Method
         Round-robin Method : Consumer group 내에서 session들에 대한 CPU 할당
         Emphasis Method : Consumer group에 할당되는 CPU
         Absolute Method : Parallel degree 한계 ( 예 : Parallel Query에서의
    degree )
    5. Resource Plan Directive
         Resource Plan Directive에 지정된 내용들은 resource plan에 따라
    consumer group에 자원을 할당할 때 반영된다.
    6. 구현 예제
         MYDB PLAN +-> MAILDB PLAN +-> POSTMAN GROUP (40% Level 1)
         | (30% Level 1) |
         | +-> USERS GROUP (80% Level 2)
         | |
         | +-> MAILMAINT GROUP (20% Level 2)
         | |
         | +-> OTHER GROUP (100% Level 3)
         |
         +-> BUGDB PLAN  +-> ONLINE GROUP (80% Level 1)
         (70% Level 1) |
         +-> BATCH GROUP (20% Level 1)
         |
         +-> BUGMAINT GROUP (100% Level 2)
         |
         +-> OTHER GROUP (100% Level 3)
         위 예에서 MYDB PLAN에는 2개의 subplan ( MAILDB PLAN, BUGDB PLAN )이
         있으며 각각 30%와 70%의 CPU 자원을 할당하였다.
         Level 1, Level 2, Level 3 는 우선순위 레벨을 의미하며, 하나의
         resource plan에서 동일한 level의 합이 100%를 넘지 못한다.
         ( Level 은 1부터 8까지 지정할 수 있으며 level 1이 가장 우선순위가
         높으며 level 8이 가장 우선순위가 낮다 )
         예를 들어 전체 CPU 자원의 70%를 할당 받은 BUGDB PLAN은 다시
         ONLINE GROUP과 BATCH GROUP을 두고 있는데, 이 둘의 Level이 모두 1이며
         두개의 percentage의 합이 100%이다. 하지만, 즉, level 1인 ONLINE GROUP
    에 90%를 할당하였다면, level 1인 BATCH GROUP에는 10% 이상을 할당할 수
    없다.
    Example
         * 구현을 위한 코드
         BEGIN
         /* PLAN schema 작업 영역 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
         /* BUGDB PLAN, MAILDB PLAN, MYDB PLAN 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'bugdb_plan',
         COMMENT => 'Resource plan/method for bug users sessions');
         DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'maildb_plan',
         COMMENT => 'Resource plan/method for mail users sessions');
         DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'mydb_plan',
         COMMENT => 'Resource plan/method for bug and mail users sessions');
         /* CONSUMER GROUP 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Bug_Online_group', COMMENT => 'Resource consumer group/method for
    online bug users sessions');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Bug_Batch_group', COMMENT => 'Resource consumer group/method for
    bug users sessions who run batch jobs');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Bug_Maintenance_group', COMMENT => 'Resource consumer group/method
    for users sessions who maintain the bug db');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Mail_users_group', COMMENT => 'Resource consumer group/method for
    mail users sessions');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Mail_Postman_group', COMMENT => 'Resource consumer group/method for
    mail postman');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Mail_Maintenance_group', COMMENT => 'Resource consumer group/method
    for users sessions who maintain the mail db');
         /* BUGDB PLAN에 대한 DIRECTIVE 생성 */     
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'bugdb_plan',
    GROUP_OR_SUBPLAN => 'Bug_Online_group',     COMMENT => 'online bug users
    sessions at level 1', CPU_P1 => 80, CPU_P2=> 0,
         PARALLEL_DEGREE_LIMIT_P1 => 8);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'bugdb_plan',
    GROUP_OR_SUBPLAN => 'Bug_Batch_group',      COMMENT => 'batch bug users
    sessions at level 1', CPU_P1 => 20, CPU_P2 => 0,
         PARALLEL_DEGREE_LIMIT_P1 => 2);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'bugdb_plan',
    GROUP_OR_SUBPLAN => 'Bug_Maintenance_group',COMMENT => 'bug
    maintenance users sessions at level 2', CPU_P1 => 0, CPU_P2 => 100,
         PARALLEL_DEGREE_LIMIT_P1 => 3);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'bugdb_plan',
    GROUP_OR_SUBPLAN => 'OTHER_GROUPS', COMMENT => 'all other users
    sessions at level 3', CPU_P1 => 0, CPU_P2 => 0, CPU_P3 =>
         100);
    (참고) CPU_P1 : cpu allocation for level 1
         /* MAILDB PLAN에 대한 DIRECTIVE 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'maildb_plan',
    GROUP_OR_SUBPLAN => 'Mail_Postman_group',COMMENT => 'mail postman at
    level 1', CPU_P1 => 40, CPU_P2 => 0, PARALLEL_DEGREE_LIMIT_P1 => 4);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'maildb_plan',
    GROUP_OR_SUBPLAN => 'Mail_users_group',     COMMENT => 'mail users
    sessions at level 2', CPU_P1 => 0, CPU_P2 => 80,
         PARALLEL_DEGREE_LIMIT_P1 => 4);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'maildb_plan',
    GROUP_OR_SUBPLAN => 'Mail_Maintenance_group',COMMENT => 'mail
    maintenance users sessions at level 2', CPU_P1 => 0, CPU_P2 => 20,
         PARALLEL_DEGREE_LIMIT_P1 => 2);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'maildb_plan',
    GROUP_OR_SUBPLAN => 'OTHER_GROUPS', COMMENT => 'all other users
    sessions at level 3', CPU_P1 => 0, CPU_P2 => 0, CPU_P3 =>
         100);
         /* MYDB PLAN에 대한 DIRECTIVE 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'mydb_plan',
    GROUP_OR_SUBPLAN => 'maildb_plan', COMMENT=> 'all mail users
    sessions at level 1', CPU_P1 => 30);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'mydb_plan',
    GROUP_OR_SUBPLAN => 'bugdb_plan', COMMENT => 'all bug users sessions
    at level 1', CPU_P1 => 70);
         /* PLAN schema 작업 내용을 저장 */
         DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
         DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
         end;
    7. CONSUMER GROUP에 사용자나 세션을 할당하는 방법
         먼저 인스턴스에서 사용할 TOP Level resource plan 을 지정한다.
    initSID.ora에 RESOURCE_MANAGER_PLAN = MRDB_PLAN 지정이나 아래와 같이
    session level에 ALTER SYSTEM command를 사용하여 지정한다.
         ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = MYDB_PLAN;
         그리고 SCOTT 계정에 BUG_ONLINE_GROUP과 BUB_BATCH_GROUP 에 속할 수 있는
    권한을 부여     
    DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP ('SCOTT',
    'BUG_ONLINE_GROUP', TRUE);
         DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP ('SCOTT',
    'BUG_BATCH_GROUP', TRUE);
         * DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP( user in
    varchar2, consumer_group in varchar2);
         예)
         DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP('SCOTT',
    'BUG_ONLINE_GROUP');
         SCOTT 계정을 BUG_BATCH_GROUP에 할당
         * DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_SESS (
                             session_id IN NUMBER,
                             session_serial IN NUMBER,
                             consumer_group IN VARCHAR2);
         예)
         DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_SESS( 11, 2,
    'BUG_ONLINE_GROUP');
         * DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_USER (
                             user IN VARCHAR2,
                             consumer_group IN VARCHAR2);
         예)
         DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_USER('SCOTT',
    'BUG_BATCH_GROUP');
    8. 관련된 Dictionary
    DBA_RSRC_PLANS : Resource plan과 status
    DBA_RSRC_PLAN_DIRECTIVES : Resource plan directives와 status
    DBA_RSRC_CONSUMER_GROUPS : Consumer group과 status
    DBA_RSRC_CONSUMER_GROUP_PRIVS : 사용자에게 부여된 Consumer group
    DBA_USERS : INITIAL_RSRC_CONSUMER_GROUP라는 새로운 column이 추가
    V$SESSION : RESOURCE_CONSUMER_GROUP라는 새로운 column이 추가
    V$RSRC_PLAN : 새로운 view로 active resource plan을 보여준다
    V$RSRC_CONSUMER_GROUP : 새로운 view로 consumer group의 active session
    을 보여준다.
    Reference Ducumment
    ---------------------

    user1 is the schema present in DB1
    user2 is the schema present in DB2. I just have a DB link
    as below:
    create database link link_to_DB2 connect to user2 identified by user2 using 'DB2';---Connects from user1 of DB1 to user2 of DB2.
    Requirement is as below:
    CPU for DB2 - 25%
    Out of above 25%, CPU for user2 - 70%
    CPU for user1 30% -- whenever it conncts using the link)
    Please help me out.

  • Oracle 10G New Feature........Part 1

    Dear all,
    from last couple of days i was very busy with my oracle 10g box,so i think this is right time to
    share some intresting feature on 10g and some internal stuff with all of you.
    Have a look :-
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Oracle 10g Memory and Storage Feature.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1.Automatic Memory Management.
    2.Online Segment Shrink
    3.Redolog Advisor, checkpointing
    4.Multiple Temporary tablespace.
    5.Automatic Workload Repository
    6.Active Session History
    7.Misc
    a)Rename Tablespace
    b)Bigfile tablespace
    c)flushing buffer cache
    8.ORACLE INTERNAL
    a)undocumented parameter (_log_blocks_during_backup)
    b)X$ view (x$messages view)
    c)Internal Structure of Controlfile
    1.Automatic memory management
    ================================
    This feature reduce the overhead of oracle DBA.previously mostly time we need to set diff oracle SGA parameter for
    better performance with the help of own experience,advice views and by monitoring the behaviour
    of oracle database.
    this was just time consuming activity.........
    Now this feature makes easy life for oracle DBA.
    Just set SGA_TARGET parameter and it automatically allocate memory to different SGA parameter.
    it focus on DB_CACHE_SIZE
    SHARED_POOL_SIZE
    LARGE_POOL
    JAVA_POOL
    and automatically set it as
    __db_cache_size
    __shared_pool_size
    __large_pool_size
    __java_pool_size
    check it in alert_log
    MMAN(memory manager) process is new in 10g and this is responsible for sga tuning task.
    it automatically increase and decrease the SGA parameters value as per the requirement.
    Benefit:- Maximum utlization of available SGA memory.
    2.Online Segment Shrink.
    ==========================
    hmmmmm again a new feature by oracle to reduce the downtime.Now oracle mainly focus on availablity
    thats why its always try to reduce the downtime by intrducing new feature.
    in previous version ,reducing High water mark of table was possible by
    Exp/imp
    or
    alter table move....cmd. but on these method tables was not available for normal use for long hrs if it has more data.
    but in 10g with just few command we can reduce the HWmark of table.
    this feature is available for ASSM tablespaces.
    1.alter table emp enable row movement.
    2.alter table emp shrink space.
    the second cmd have two phases
    first phase is to compact the segment and in this phase DML operations are allowed.
    second phase(shrink phase)oracle shrink the HWM of table, DML operation will be blocked at that time for short duration.
    So if want to shrink the HWM of table then we should use it with two diff command
    first compact the segment and then shrink it on non-peak hrs.
    alter table emp shrink space compact. (This cmd doesn't block the DML operation.)
    and alter table emp shrink space. (This cmd should be on non-peak hrs.)
    Benefit:- better full table scan.
    3.Redolog Advisor and checkpointing
    ================================================================
    now oracle will suggest the size of redo log file by V$INSTANCE_RECOVERY
    SELECT OPTIMAL_LOGFILE_SIZE
    FROM V$INSTANCE_RECOVERY
    this value is influence with the value of FAST_START_MTTR_TARGET .
    Checkpointing
    Automatic checkpointing will be enable after setting FAST_START_MTTR_TARGET to non-zero value.
    4.Multiple Temporary tablespace.
    ==================================
    Now we can manage multiple temp tablespace under one group.
    we can create a tablespace group implicitly when we include the TABLESPACE GROUP clause in the CREATE TEMPORARY TABLESPACE or ALTER TABLESPACE statement and the specified tablespace group does not currently exist.
    For example, if group1 is not exists,then the following statements create this groups with new tablespace
    CREATE TEMPORARY TABLESPACE temp1 TEMPFILE '/u02/oracle/data/temp01.dbf'
    SIZE 50M
    TABLESPACE GROUP group1;
    --Add Existing temp tablespace into group by
    alter tablespace temp2 tablespace group group1.
    --we can also assign the temp tablespace group on database level as default temp tablespace.
    ALTER DATABASE <db name> DEFAULT TEMPORARY TABLESPACE group1;
    benefit:- Better I/O
    One sql can use more then one temp tablespace
    5.AWR(Automatic Workload Repository):-
    ================================== AWR is built in Repository and Central point of Oracle 10g.Oracle self managing activities
    is fully dependent on AWR.by default after 1 hr, oracle capure all database uses information and store in AWR with the help of
    MMON process.we called it Memory monitor process.and all these information are kept upto 7 days(default) and after that it automatically purge.
    we can generate a AWR report by
    SQL> @?/rdbms/admin/awrrpt
    Just like statspack report but its a advance and diff version of statspack,it provide more information of Database as well as OS.
    it show report in Html and Text format.
    we can also take manually snapshot for AWR by
    BEGIN
    DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
    END;
    **The STATISTICS_LEVEL initialization parameter must be set to the TYPICAL or ALL to enable the Automatic Workload Repository.
    [oracle@RMSORA1 oracle]$ sqlplus / as sysdba
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Mar 17 10:37:22 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> @?/rdbms/admin/awrrpt
    Current Instance
    ~~~~~~~~~~~~~~~~
    DB Id DB Name Inst Num Instance
    4174002554 RMSORA 1 rmsora
    Specify the Report Type
    ~~~~~~~~~~~~~~~~~~~~~~~
    Would you like an HTML report, or a plain text report?
    Enter 'html' for an HTML report, or 'text' for plain text
    Defaults to 'html'
    Enter value for report_type: text
    Type Specified: text
    Instances in this Workload Repository schema
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    DB Id Inst Num DB Name Instance Host
    * 4174002554 1 RMSORA rmsora RMSORA1
    Using 4174002554 for database Id
    Using 1 for instance number
    Specify the number of days of snapshots to choose from
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Entering the number of days (n) will result in the most recent
    (n) days of snapshots being listed. Pressing <return> without
    specifying a number lists all completed snapshots.
    Listing the last 3 days of Completed Snapshots
    Snap
    Instance DB Name Snap Id Snap Started Level
    rmsora RMSORA 16186 16 Mar 2006 17:33 1
    16187 16 Mar 2006 18:00 1
    16206 17 Mar 2006 03:30 1
    16207 17 Mar 2006 04:00 1
    16208 17 Mar 2006 04:30 1
    16209 17 Mar 2006 05:00 1
    16210 17 Mar 2006 05:31 1
    16211 17 Mar 2006 06:00 1
    16212 17 Mar 2006 06:30 1
    16213 17 Mar 2006 07:00 1
    16214 17 Mar 2006 07:30 1
    16215 17 Mar 2006 08:01 1
    16216 17 Mar 2006 08:30 1
    16217 17 Mar 2006 09:00 1
    Specify the Begin and End Snapshot Ids
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Enter value for begin_snap: 16216
    Begin Snapshot Id specified: 16216
    Enter value for end_snap: 16217
    End Snapshot Id specified: 16217
    Specify the Report Name
    ~~~~~~~~~~~~~~~~~~~~~~~
    The default report file name is awrrpt_1_16216_16217.txt. To use this name,
    press <return> to continue, otherwise enter an alternative.
    Benefit:- Now DBA have more free time to play games.....................:-)
    Advance version of statspack
    more DB and OS information with self managing capabilty
    New Automatic alert and database advisor with the help of AWR.
    6.Active Session History:-
    ==========================
    V$active_session_history is view that contain the recent session history.
    the memory for ASH is comes from SGA and it can't more then 5% of Shared pool.
    So we can get latest and active session report from v$active_session_history view and also get histortical data of
    of session from DBA_HIST_ACTIVE_SESS_HISTORY.
    v$active_session_history include some imp column like:-
    ~SQL identifier of SQL statement
    ~Object number, file number, and block number
    ~Wait event identifier and parameters
    ~Session identifier and session serial number
    ~Module and action name
    ~Client identifier of the session
    7.Misc:-
    ========
    Rename Tablespace:-
    =================
    in 10g,we can even rename a tablespace by
    alter tablespace <tb_name> rename to <tb_name_new>;
    This command will update the controlfile,data dictionary and datafile header,but dbf filename will be same.
    **we can't rename system and sysaux tablespace.
    Bigfile tablespace:-
    ====================
    Bigfile tablespace contain only one datafile.
    A bigfile tablespace with 8K blocks can contain a 32 terabyte datafile.
    Bigfile tablespaces are supported only for locally managed tablespaces with automatic segment-space management.
    we can take the advantage of bigfile tablespace when we are using ASM or other logical volume with RAID.
    without ASM or RAID ,it gives poor response.
    syntax:-
    CREATE BIGFILE TABLESPACE bigtbs
    Flushing Buffer Cache:-
    ======================
    This option is same as flushing the shared pool,but only available with 10g.
    but i don't know, whats the use of this command in prod database......
    anyway we can check and try it on test server for tuning n testing some query etc....
    SQL> alter system flush buffer_cache;
    System altered.
    ++++++++++++++++++
    8.Oracle Internal
    ++++++++++++++++++
    Here is some stuff that is not related with 10g but have some intresting things.
    a)undocumented parameter "_log_blocks_during_backup"
    ++++++++++++++++++++++++
    as we know that oracle has generate more redo logs during hotbackup mode because
    oracle has to maintain the a complete copy of block into redolog due to split block.
    we can also change this behaviour by setting this parameter to False.
    If Oracle block size equals the operating system block size.thus reducing the amount of redo generated
    during a hot backup.
    WITHOUT ORACLE SUPPORT DON'T SET IT ON PROD DATABASE.THIS DOCUMENT IS JUST FOR INFORMATIONAL PURPOSE.
    b)some X$ views (X$messages)
    ++++++++++++++++
    if you are intresting in oracle internal architecture then x$ view is right place for getting some intresting things.
    X$messages :-it show all the actions that a background process do.
    select * from x$messages;
    like:-
    lock memory at startup MMAN
    Memory Management MMAN
    Handle sga_target resize MMAN
    Reset advisory pool when advisory turned ON MMAN
    Complete deferred initialization of components MMAN
    lock memory timeout action MMAN
    tune undo retention MMNL
    MMNL Periodic MQL Selector MMNL
    ASH Sampler (KEWA) MMNL
    MMON SWRF Raw Metrics Capture MMNL
    reload failed KSPD callbacks MMON
    SGA memory tuning MMON
    background recovery area alert action MMON
    Flashback Marker MMON
    tablespace alert monitor MMON
    Open/close flashback thread RVWR
    RVWR IO's RVWR
    kfcl instance recovery SMON
    c)Internal Structure of Controlfile
    ++++++++++++++++++++++++++++++++++++
    The contents of the current controlfile can be dumped in text form.
    Dump Level Dump Contains
    1 only the file header
    2 just the file header, the database info record, and checkpoint progress records
    3 all record types, but just the earliest and latest records for circular reuse record types
    4 as above, but includes the 4 most recent records for circular reuse record types
    5+ as above, but the number of circular reuse records included doubles with each level
    the session must be connected AS SYSDBA
    alter session set events 'immediate trace name controlf level 5';
    This dump show lots of intresting information.
    it also show rman recordes if we used this controlfile in rman backup.
    Thanks
    Kuljeet Pal Singh

    You can find each doc in html and pdf format on the Documentation Library<br>
    You can too download all the documentation in html format to have all on your own computer here (445.8MB)<br>
    <br>
    Nicolas.

  • (V9I) ORACLE 9I NEW FEATURE : RESUMABLE SPACE ALLOCATION

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-01
    (V9I) ORACLE 9I New Feature : Resumable Space Allocation
    =====================================================
    PURPOSE
    Oracle9i New Feature 인 Resumable Space Allocation 에 대해
    알아보도록 한다.
    Explanation
    Resumable Space Allocation 은 다음과 같은 새로운 Space allocation
    이 발생되어야 할 시점에 에러를 바로 발생하지 않고 어느정도의 Time 을 준뒤
    Admin에게 이를 알림으로써 수행중인 Transaction rollback 되지 않고 계속적으로
    진행할 수 있도록 하는 기능이다.
    Query 수행시 다음과 같은 원인으로 에러가 발생하면서 query 수행이 중지된다.
    1) Out of space condition
    2) Maximum number of extents reached condision
    3) Space quota exceeded condition
    그러나 9I 에서 Resumable Space Allocation Operations을 설정하게 되면
    alertSID.ora file에 suspend 되는 메세지와 함께 설정한 timeout 까지 hang 상태가
    발생된다. 만약 timeout 초과시엔 에러가 발생하면서 transaction은 rollback 된다.
    alertSID.ora 메세지예)
    Wed Mar 14 11:14:17 2001
    statement in resumable session 'User SCOTT(54), Session 9, Instance 1' was
    suspended due to
    ORA-01631: max # extents (5) reached in table SCOTT.TEST_RESUMABLE
    Example
    다음은 Resumable Space Allocation Operations 을 설정하기 위해서는 RESUMABLE 을
    ENABLE 시키고 또는 DBMS_RESUMABLE package를 이용한다.
    1) RESUMABLE system privilege 부여
    SQL> connect system/manager
    Connected.
    SQL> grant resumable to scott;
    Grant succeeded.
    2) session level에서 RESUMABLE enable 시키기
    SQL> alter session enable resumable;
    Session altered.
    This can be set automatically through an AFTER LOGON trigger.
    SQL> create or replace trigger logon_set_resumable
    2 after logon
    3 on scott.schema
    4 begin
    5 execute immediate 'alter session enable resumable timeout 1200';
    6 end;
    7 /
    Trigger created.
    3) 생성한 TEST_RESUMABLE table 에 insert 작업
    -> insert 시에 hang 현상 발생(transaction rollback은 이루어지지 않는다.)
    -> alert.log에 suspend message 확인
    -> 만약 설정한 timeout 초과시 에러 발생되면서 transaction rollback
    a. Displaying the DBA_RESUMABLE view(DBA_RESUMABLE view에서 suspend 확인)
    SQL> select user_id,SESSION_ID, STATUS, START_TIME, SUSPEND_TIME,
    2 SQL_TEXT, ERROR_NUMBER, ERROR_MSG
    3 from dba_resumable;
    USER_ID SESSION_ID STATUS START_TIME SUSPEND_TIME
    SQL_TEXT
    ERROR_NUMBER
    ERROR_MSG
    54 9 SUSPENDED 03/14/01 10:49:25 03/14/01 11:14:17
    insert into test_resumable select * from test_resumable
    1631
    ORA-01631: max # extents (5) reached in table SCOTT.TEST_RESUMABLE
    b. In alert.log file(alert.log에서 message 확인)
    Wed Mar 14 11:14:17 2001
    statement in resumable session 'User SCOTT(54), Session 9, Instance 1' was
    suspended due to
    ORA-01631: max # extents (5) reached in table SCOTT.TEST_RESUMABLE
    c. The statement may issue the following error when the timeout set for the
    session has expired(timeout 초과시 transaction rollback 되면서 에러 발생)
    SQL> insert into test_resumable values (1);
    insert into test_resumable values (1)
    ERROR at line 1:
    ORA-30032: the suspended (resumable) statement has timed out
    ORA-01536: space quota exceeded for tablespace 'EXAMPLE'
    4) The DBA now knows why the session hangs, and needs to find which action to
    take to alleviate the ora-1631 error(DBA는 timeout 이 발생하기 전에 에러 발생)
    SQL> connect system/manager
    Connected.
    SQL> alter table scott.test_resumable storage (maxextents 8);
    Table altered.
    SQL> select user_id,SESSION_ID, STATUS, START_TIME, RESUME_TIME,
    2 SQL_TEXT, ERROR_NUMBER, ERROR_MSG
    3 from dba_resumable;
    USER_ID SESSION_ID STATUS START_TIME RESUME_TIME
    SQL_TEXT
    ERROR_NUMBER
    ERROR_MSG
    54 9 NORMAL 03/14/01 10:49:25 03/14/01 11:24:02
    insert into test_resumable select * from test_resumable
    0
    5) If the session does not need to be in resumable state, the session can
    disable the resumable state(더이상 resumable 기능 사용하지 않을 경우 disable 시키기)
    SQL> alter session disable resumable;
    Session altered.
    SQL> select user_id,SESSION_ID, STATUS, START_TIME, RESUME_TIME,
    2 SQL_TEXT, ERROR_NUMBER, ERROR_MSG
    3 from dba_resumable;
    no rows selected
    Reference Document
    Note. 136941.1 Using RESUMABLE Session to Avoid Transaction Abort Due to Space Errors

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-01
    (V9I) ORACLE 9I New Feature : Resumable Space Allocation
    =====================================================
    PURPOSE
    Oracle9i New Feature 인 Resumable Space Allocation 에 대해
    알아보도록 한다.
    Explanation
    Resumable Space Allocation 은 다음과 같은 새로운 Space allocation
    이 발생되어야 할 시점에 에러를 바로 발생하지 않고 어느정도의 Time 을 준뒤
    Admin에게 이를 알림으로써 수행중인 Transaction rollback 되지 않고 계속적으로
    진행할 수 있도록 하는 기능이다.
    Query 수행시 다음과 같은 원인으로 에러가 발생하면서 query 수행이 중지된다.
    1) Out of space condition
    2) Maximum number of extents reached condision
    3) Space quota exceeded condition
    그러나 9I 에서 Resumable Space Allocation Operations을 설정하게 되면
    alertSID.ora file에 suspend 되는 메세지와 함께 설정한 timeout 까지 hang 상태가
    발생된다. 만약 timeout 초과시엔 에러가 발생하면서 transaction은 rollback 된다.
    alertSID.ora 메세지예)
    Wed Mar 14 11:14:17 2001
    statement in resumable session 'User SCOTT(54), Session 9, Instance 1' was
    suspended due to
    ORA-01631: max # extents (5) reached in table SCOTT.TEST_RESUMABLE
    Example
    다음은 Resumable Space Allocation Operations 을 설정하기 위해서는 RESUMABLE 을
    ENABLE 시키고 또는 DBMS_RESUMABLE package를 이용한다.
    1) RESUMABLE system privilege 부여
    SQL> connect system/manager
    Connected.
    SQL> grant resumable to scott;
    Grant succeeded.
    2) session level에서 RESUMABLE enable 시키기
    SQL> alter session enable resumable;
    Session altered.
    This can be set automatically through an AFTER LOGON trigger.
    SQL> create or replace trigger logon_set_resumable
    2 after logon
    3 on scott.schema
    4 begin
    5 execute immediate 'alter session enable resumable timeout 1200';
    6 end;
    7 /
    Trigger created.
    3) 생성한 TEST_RESUMABLE table 에 insert 작업
    -> insert 시에 hang 현상 발생(transaction rollback은 이루어지지 않는다.)
    -> alert.log에 suspend message 확인
    -> 만약 설정한 timeout 초과시 에러 발생되면서 transaction rollback
    a. Displaying the DBA_RESUMABLE view(DBA_RESUMABLE view에서 suspend 확인)
    SQL> select user_id,SESSION_ID, STATUS, START_TIME, SUSPEND_TIME,
    2 SQL_TEXT, ERROR_NUMBER, ERROR_MSG
    3 from dba_resumable;
    USER_ID SESSION_ID STATUS START_TIME SUSPEND_TIME
    SQL_TEXT
    ERROR_NUMBER
    ERROR_MSG
    54 9 SUSPENDED 03/14/01 10:49:25 03/14/01 11:14:17
    insert into test_resumable select * from test_resumable
    1631
    ORA-01631: max # extents (5) reached in table SCOTT.TEST_RESUMABLE
    b. In alert.log file(alert.log에서 message 확인)
    Wed Mar 14 11:14:17 2001
    statement in resumable session 'User SCOTT(54), Session 9, Instance 1' was
    suspended due to
    ORA-01631: max # extents (5) reached in table SCOTT.TEST_RESUMABLE
    c. The statement may issue the following error when the timeout set for the
    session has expired(timeout 초과시 transaction rollback 되면서 에러 발생)
    SQL> insert into test_resumable values (1);
    insert into test_resumable values (1)
    ERROR at line 1:
    ORA-30032: the suspended (resumable) statement has timed out
    ORA-01536: space quota exceeded for tablespace 'EXAMPLE'
    4) The DBA now knows why the session hangs, and needs to find which action to
    take to alleviate the ora-1631 error(DBA는 timeout 이 발생하기 전에 에러 발생)
    SQL> connect system/manager
    Connected.
    SQL> alter table scott.test_resumable storage (maxextents 8);
    Table altered.
    SQL> select user_id,SESSION_ID, STATUS, START_TIME, RESUME_TIME,
    2 SQL_TEXT, ERROR_NUMBER, ERROR_MSG
    3 from dba_resumable;
    USER_ID SESSION_ID STATUS START_TIME RESUME_TIME
    SQL_TEXT
    ERROR_NUMBER
    ERROR_MSG
    54 9 NORMAL 03/14/01 10:49:25 03/14/01 11:24:02
    insert into test_resumable select * from test_resumable
    0
    5) If the session does not need to be in resumable state, the session can
    disable the resumable state(더이상 resumable 기능 사용하지 않을 경우 disable 시키기)
    SQL> alter session disable resumable;
    Session altered.
    SQL> select user_id,SESSION_ID, STATUS, START_TIME, RESUME_TIME,
    2 SQL_TEXT, ERROR_NUMBER, ERROR_MSG
    3 from dba_resumable;
    no rows selected
    Reference Document
    Note. 136941.1 Using RESUMABLE Session to Avoid Transaction Abort Due to Space Errors

  • (V9I) ORACLE 9I NEW FEATURE : ORACLE FLASHBACK

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-01
    (V9I) ORACLE 9I New Feature : ORACLE FLASHBACK
    ==============================================
    PURPOSE
    Oracle9i 새로운 기능인 Flashback 의 등장으로 Commit 된 Transaction 에 대해
    특정 시점의 과거 DATA를 Query가 가능함으로써 Self-service repair 기능이 향상되었다.
    다음 Flashback query 기능과 Setup 방법 및 실제 Data Recovery 에 관한 내용에 대해 알아보도록 한다.
    Explanation
    Flashback : 새로운 기능인 Flahback 은 과거 시점의 consistent view 를 볼 수있는
    기능으로 system time or systme change number(SCN) 기반 read-only view이다.
    다음은 Flashback 기능을 사용하기 위해 미리 설정해야할 부분에 대해 알아보도록 한다.
    1) 반드시 Automatic Undo Management 에서만 가능
    (initSID.ora file이나 spfile에 다음 파라미터가 auto로 설정)
    UNDO_MANAGEMENT = AUTO
    2) Rentention interval 을 두어 해당 time 동안은 inactive rollback 이라 하더라도
    overwrite 되지 않도록 유지(초단위)
    SQL> ALTER SYSTEM SET undo_retention = 1200;
    UNDO_RETENTION 을 지정한 다음 실제 적용을 위해 5분정도 기다려야 한다.
    3) DBMS_FLASHBACK package를 이용하여 Flashback 기능을 enable 시킨다.
    SQL> call dbms_flashback.enable_at_time('9-NOV-01:11:00:00');
    Example1. Flashback setup 과 date/time 설정
    1) Undo tablespace 생성
    SQL> create undo tablespace UNDOTBS datafile
    '/database/901/V901/undotbs01.dbf' size 100M;
    2) intiSID or spfile 에 다음 파라미터 적용
    undo_management=auto
    undo_retention=1200
    undo_tablespace=UNDOTBS
    3) dbms_flashback exeucte 권한 grant
    SQL> connect / as sysdba
    Connected.
    SQL> grant execute on dbms_flashback to testuser;
    Grant succeeded.
    4) test table 생성
    SQL> connect testuser/testuser;
    Connected.
    SQL> create table emp_flash as select * from scott.emp;
    Table created.
    SQL> select count(*) from emp_flash;
    COUNT(*)
    15
    5) table 생성후 5분 정도 waiting -> table delete
    SQL> delete from emp_flash;
    15 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from emp_flash;
    COUNT(*)
    0
    6) flashback 활성화
    SQL> execute DBMS_FLASHBACK.ENABLE_AT_TIME(sysdate - 5/1440);
    PL/SQL procedure successfully completed.
    SQL> select count(*) from emp_flash;
    COUNT(*)
    15
    SQL> execute DBMS_FLASHBACK.DISABLE;
    PL/SQL procedure successfully completed.
    SQL> select count(*) from emp_flash;
    COUNT(*)
    0
    Example2. Flashback 으로 잃어버린 data recovery
    1) test user 생성
    SQL> connect testuser/testuser;
    Connected.
    SQL> create table emp_recover as select * from scott.emp;
    Table created.
    SQL> select count(*) from emp_recover;
    COUNT(*)
    15
    2) delete table
    SQL> VARIABLE SCN_SAVE NUMBER;
    SQL> EXECUTE :SCN_SAVE := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER;
    PL/SQL procedure successfully completed.
    SQL> PRINT SCN_SAVE
    SCN_SAVE
    6.4455E+12
    SQL> select count(*) from emp_recover;
    COUNT(*)
    15
    SQL> delete from emp_recover;
    15 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from emp_recover;
    COUNT(*)
    0
    3) flashback 이용한 data recover
    SQL> DECLARE
    2 CURSOR FLASH_RECOVER IS
    3 select * from emp_recover;
    4 emp_recover_rec emp_recover%ROWTYPE;
    5 begin
    6 DBMS_FLASHBACK.ENABLE_AT_SYSTEM_CHANGE_NUMBER(:SCN_SAVE);
    7 open FLASH_RECOVER;
    8 DBMS_FLASHBACK.DISABLE;
    9 loop
    10 FETCH FLASH_RECOVER INTO emp_recover_rec;
    11 EXIT WHEN FLASH_RECOVER%NOTFOUND;
    12 insert into emp_recover
    13 values
    14 (emp_recover_rec.empno,
    15 emp_recover_rec.ename,
    16 emp_recover_rec.job,
    17 emp_recover_rec.mgr,
    18 emp_recover_rec.hiredate,
    19 emp_recover_rec.sal,
    20 emp_recover_rec.comm,
    21 emp_recover_rec.deptno);
    22 end loop;
    23 CLOSE FLASH_RECOVER;
    24 commit;
    25 end;
    26 /
    PL/SQL procedure successfully completed.
    SQL> select count(*) from emp_recover;
    COUNT(*)
    15
    Reference Document
    Note. 174425.1
    Note. 143217.1
    Note. 179851.1

    I 'm sorry I can not offer the correct figure since I'm an easy-to-forget guy.
    Below is extracted from other's post. wish it helps.
    Oracle Security Server ---> 2 questions
    High Availability Technology ---> 4 questions
    LogMiner Enhancements -> 1 question
    Backup & Recovery Enhancements ---> 3 questions
    Data Guard ---> 3 questions
    Resource Manager Enhancements ---> 2 questions
    Online Operations Enhancements ---> 3 questions
    Segment Management (Part I) ---> 4 questions
    Segment Management (Part II) ---> 3 questions
    Performance Improvements ---> 4 questions
    Scalable Session Management ---> 2 questions
    Real Application Clusters ---> 2 questions
    File Management ---> 4 questions
    Tablespace Management ---> 4 questions
    Memory Management ---> 3 questions
    Enterprise Manager Enhancements ---> 2 questions
    by the way, I just found an enthusiast (roxylo
    ) posted a book about the 9i new features. It surely will help

  • Installing oracle management agent 12.1.0.2.0 in silent mode.

    version: 12.1.0.2.0
    platform: IBM Aix power systems 64bit
    I installed the oracle management service along with the oracle management agent that comes along with the the first installation. I deinstalled the first installed OMA and tried to install it again using the silent install mode with the response file.
    (oms host and the oma host are the same)
    among the 3 modes of silent install described in the installation guide, i used agent deploy method.
    Here are the steps i followed with the install
    1. this the status of my OMS
    <oracle>chh-aix-beta/oem12c/product/oms/bin> ./emctl status oms -details
    Oracle Enterprise Manager Cloud Control 12c Release 2
    Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
    Enter Enterprise Manager Root (SYSMAN) Password :
    Console Server Host        : chh-aix-beta
    HTTP Console Port          : 7788
    HTTPS Console Port         : 7799
    HTTP Upload Port           : 4889
    HTTPS Upload Port          : 1159
    EM Instance Home           : /oem12c/product/gc_inst/em/EMGC_OMS1
    OMS Log Directory Location : /oem12c/product/gc_inst/em/EMGC_OMS1/sysman/log
    OMS is not configured with SLB or virtual hostname
    Agent Upload is locked.
    OMS Console is unlocked.
    Active CA ID: 1
    Console URL: https://chh-aix-beta:7799/em
    Upload URL: https://chh-aix-beta:1159/empbs/upload
    WLS Domain Information
    Domain Name      : GCDomain
    Admin Server Host: chh-aix-beta
    Managed Server Information
    Managed Server Instance Name: EMGC_OMS1
    Managed Server Instance Host: chh-aix-beta
    WebTier is Up
    Oracle Management Server is Up2. I got the version and the platform info of the oms by doing the following
    <oracle>chh-aix-beta/oem12c/product/oms/bin> ./emcli get_supported_platforms
    Getting list of platforms ...
    Check the logs at /oem12c/product/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/agent.log
    About to access self-update code path to retrieve the platforms list..
    Getting Platforms list  ...
    Version = 12.1.0.2.0
    Platform = IBM AIX on POWER Systems (64-bit)
    Platforms list displayed successfully.3. I downloaded the management agent software by doing the following ()
    $<OMS_HOME>/bin/emcli get_agentimage -destination=/oem12102 -platform="IBM AIX on POWER Systems (64-bit) "  -version=12.1.0.2.04. I unzipped the management agent software.
    5. I edited the response file as follows. (i edited only the oms_host, em_upload_port, agent_registration_password, since they are the only ones that are mandatory)
    OMS_HOST=172.16.24.65
    EM_UPLOAD_PORT=1159
    AGENT_REGISTRATION_PASSWORD=cchorcl01
    #AGENT_INSTANCE_HOME=
    #AGENT_PORT=
    b_startAgent=true
    #ORACLE_HOSTNAME=
    #s_agentHomeName=
    EM_INSTALL_TYPE="AGENT"6. then i ran the AgentDeploy.sh script using the following.
    ./agentDeploy.sh -ignorePrereqs AGENT_BASE_DIR=/oem12c/base/agent RESPONSE_FILE=/oem12102/agent.rsp(I ignored the prereqs because, i was getting an error with the hostname and the hostname is correct)
    7. this the following output i am getting after running step 6.
    -e Validating the OMS_HOST & EM_UPLOAD_PORT
    Executing command : /oem12c/base/agent/core/12.1.0.2.0/jdk/bin/java -classpath /oem12c/base/agent/core/12.1.0.2.0/jlib/agentInstaller.jar:/oem12c/base/agent/core/12.1.0.2.0/oui/jlib/OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller /oem12c/base/agent/core/12.1.0.2.0 /oem12102 /oem12c/base/agent -prereq
    Validating oms host & port with url: http://172.16.24.65:1159/empbs/genwallet
    Validating oms host & port with url: https://172.16.24.65:1159/empbs/genwallet
    Return status:3
    Unzipping the agentcoreimage.zip to /oem12c/base/agent ....
    12.1.0.2.0_PluginsOneoffs_212.zip
    Executing command : /oem12102/unzip -o /oem12102/12.1.0.2.0_PluginsOneoffs_212.zip -d /oem12c/base/agent
    Executing command : /oem12c/base/agent/core/12.1.0.2.0/jdk/bin/java  -d64 -classpath /oem12c/base/agent/core/12.1.0.2.0/oui/jlib/OraInstaller.jar:/oem12c/base/agent/core/12.1.0.2.0/oui/jlib/xmlparserv2.jar:/oem12c/base/agent/core/12.1.0.2.0/oui/jlib/srvm.jar:/oem12c/base/agent/core/12.1.0.2.0/oui/jlib/emCfg.jar:/oem12c/base/agent/core/12.1.0.2.0/jlib/agentInstaller.jar:/oem12c/base/agent/core/12.1.0.2.0/oui/jlib/share.jar oracle.sysman.agent.installer.AgentInstaller /oem12c/base/agent/core/12.1.0.2.0 /oem12102 /oem12c/base/agent /oem12c/base/agent/agent_inst AGENT_BASE_DIR=/oem12c/base/agent -ignorePrereqs AGENT_BASE_DIR=/oem12c/base/agent RESPONSE_FILE=/oem12102/agent.rsp
    Cloning the agent home...
    Executing command: /oem12c/base/agent/core/12.1.0.2.0/oui/bin/runInstaller -ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/oem12c/base/agent/core/12.1.0.2.0 -responseFile /oem12102/agent.rsp  AGENT_BASE_DIR=/oem12c/base/agent AGENT_BASE_DIR=/oem12c/base/agent RESPONSE_FILE=/oem12102/agent.rsp -noconfig  ORACLE_HOME_NAME=agent12c3 -force b_noUpgrade=true AGENT_PORT=-1
    Clone Action Logs Location:/software/oracle/logs/cloneActions<timestamp>.log
    Cloning of agent home completed successfully
    Attaching sbin home...
    Executing command: /oem12c/base/agent/core/12.1.0.2.0/oui/bin/runInstaller -ignoreSysPrereqs -attachHome -waitForCompletion -nowait ORACLE_HOME=/oem12c/base/agent/sbin ORACLE_HOME_NAME=sbin12c3 -force
    Attach Home Logs Location:/oem12c/base/agent/core/12.1.0.2.0/cfgtoollogs/agentDeploy/AttachHome<timestamp>.log
    Attach home for sbin home completed successfully.
    Updating home dependencies...
    Executing command: /oem12c/base/agent/core/12.1.0.2.0/oui/bin/runInstaller -ignoreSysPrereqs -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={/oem12c/base/agent/sbin:/oem12c/base/agent/core/12.1.0.2.0,} -invPtrLoc /oem12c/base/agent/core/12.1.0.2.0/oraInst.loc -force
    Update Home Dependencies Location:/oem12c/base/agent/core/12.1.0.2.0/cfgtoollogs/agentDeploy/UpdateHomeDeps<timestamp>.log
    ERROR: Update home dependency failed.I am getting stuck at updating home dependencies. I dont know what that means. If you have faced similar problems while installing oracle management agent please do share your solution. if you need more info please let me know.

    All these commands are run on the host (hostname=chh-lpar20) where the agent is being installed, and these commands are run as root user.
    ifconfig -a
    en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
            inet 172.16.28.222 netmask 0xfffffc00 broadcast 172.16.31.255
             tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
    lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
            inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
            inet6 ::1%1/0
             tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1ping chh-lpar20
    PING chh-lpar20: (172.16.28.222): 56 data bytes
    64 bytes from 172.16.28.222: icmp_seq=0 ttl=255 time=0 ms
    64 bytes from 172.16.28.222: icmp_seq=1 ttl=255 time=0 msnslookup chh-lpar20
    Server:         172.16.29.213
    Address:        172.16.29.213#53
    ** server can't find chh-lpar20: NXDOMAINnslookup 172.16.28.222
    Server:         172.16.29.213
    Address:        172.16.29.213#53
    ** server can't find 222.28.16.172.in-addr.arpa: NXDOMAINto check the if the port 3872 and 1830-1849 are free I ran the follwoing command
    ./agentDeploy.sh -prereqOnly AGENT_BASE_DIR=/oem12102/base/agent
    this was the result i got inregards to the ports
    Check complete: Passed
    ========================================================
    Performing check for PortCheck
    Checking for port availability and hostname validity...
    Trying for host : chh-lpar20/172.16.28.222 and port : 3872
    Trying for host : chh-lpar20/192.168.12.23 and port : 3872
    Port= 3872 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1830
    Trying for host : chh-lpar20/192.168.12.23 and port : 1830
    Port= 1830 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1831
    Trying for host : chh-lpar20/192.168.12.23 and port : 1831
    Port= 1831 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1832
    Trying for host : chh-lpar20/192.168.12.23 and port : 1832
    Port= 1832 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1833
    Trying for host : chh-lpar20/192.168.12.23 and port : 1833
    Port= 1833 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1834
    Trying for host : chh-lpar20/192.168.12.23 and port : 1834
    Port= 1834 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1835
    Trying for host : chh-lpar20/192.168.12.23 and port : 1835
    Port= 1835 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1836
    Trying for host : chh-lpar20/192.168.12.23 and port : 1836
    Port= 1836 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1837
    Trying for host : chh-lpar20/192.168.12.23 and port : 1837
    Port= 1837 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1838
    Trying for host : chh-lpar20/192.168.12.23 and port : 1838
    Port= 1838 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1839
    Trying for host : chh-lpar20/192.168.12.23 and port : 1839
    Port= 1839 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1840
    Trying for host : chh-lpar20/192.168.12.23 and port : 1840
    Port= 1840 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1841
    Trying for host : chh-lpar20/192.168.12.23 and port : 1841
    Port= 1841 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1842
    Trying for host : chh-lpar20/192.168.12.23 and port : 1842
    Port= 1842 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1843
    Trying for host : chh-lpar20/192.168.12.23 and port : 1843
    Port= 1843 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1844
    Trying for host : chh-lpar20/192.168.12.23 and port : 1844
    Port= 1844 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1845
    Trying for host : chh-lpar20/192.168.12.23 and port : 1845
    Port= 1845 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1846
    Trying for host : chh-lpar20/192.168.12.23 and port : 1846
    Port= 1846 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1847
    Trying for host : chh-lpar20/192.168.12.23 and port : 1847
    Port= 1847 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1848
    Trying for host : chh-lpar20/192.168.12.23 and port : 1848
    Port= 1848 is busy.
    Trying for host : chh-lpar20/172.16.28.222 and port : 1849
    Trying for host : chh-lpar20/192.168.12.23 and port : 1849
    Port= 1849 is busy.
    Check complete. The overall result of this check is: Failed <<<<
    Check complete: Failed <<<<
    Problem: Either port is unavailable or hostname configuration is not valid.
    Recommendation: Make sure the port is available and the hostname configuration i
    s proper.I don't know what to make of the results I got for executing the nslookup command.

  • Install OEM 12c fails on "start oracle management service". win2008

    Windows Server 2008 R2 Enterprise SP1 x64
    Oracle Database 11g release 11.2.0.3.0
    I install OEM 12c(12.1.0.3) following this manual: Installing Enterprise Manager System
    before start i've installed WebLogic Server 10.3.6 and aplied 2 patches specified in this manual
    installation type is advanced, small, so i have created database from the appropriate template
    i also installed cygwin and started ssh-service
    the installation of OEM process fails on 73% "start oracle management service" with this message:
    INFO: oracle.sysman.top.oms:Starting OMS ...
    INFO: oracle.sysman.top.oms:Executing command: cmd /c set NEED_EXIT_CODE=1&&C:\Oracle\Middleware\oms\bin\emctl.bat start oms
    INFO: oracle.sysman.top.oms:Oracle Enterprise Manager Cloud Control 12c Release 3 
    INFO: oracle.sysman.top.oms:Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
    INFO: oracle.sysman.top.oms:Windows service OracleManagementServer_EMGC_OMS1_1 failed to be started
    INFO: oracle.sysman.top.oms:Oracle Management Server is Down
    INFO: oracle.sysman.top.oms:Please check C:/Oracle/gc_inst/em/EMGC_OMS1\sysman\log\emctl.log for error details
    SEVERE: oracle.sysman.top.oms:Starting of OMS failed.
    in C:/Oracle/gc_inst/em/EMGC_OMS1\sysman\log\emctl.log i got this:
    2013-09-06 12:24:27,012 [main] ERROR commands.BaseCommand logAndPrint.620 - Oracle Management Server Could Not Be Started
    Check EM Server log file for details: C:\Oracle\gc_inst\user_projects\domains\GCDomain\servers\EMGC_OMS1\logs\EMGC_OMS1.out
    2013-09-06 12:24:27,012 [main] INFO  commands.StartCommand startOMS.337 - startOMS finished with result: 1
    2013-09-06 12:24:30,974 [main] INFO  commands.StartCommand startOMS.371 - net start return code is 2
    2013-09-06 12:24:30,974 [main] ERROR commands.BaseCommand logAndPrint.620 - Windows service OracleManagementServer_EMGC_OMS1_1 failed to be started
    2013-09-06 12:24:34,094 [main] INFO  commands.BaseCommand printMessage.404 - statusOMS finished with result: 8
    2013-09-06 12:24:34,094 [main] ERROR commands.BaseCommand logAndPrint.620 - Please check C:/Oracle/gc_inst/em/EMGC_OMS1\sysman\log\emctl.log for error details
    and in C:\Oracle\gc_inst\user_projects\domains\GCDomain\servers\EMGC_OMS1\logs\EMGC_OMS1.out this:
    <06.09.2013 12:24:01 ICT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 23.25-b01 from Oracle Corporation>
    <06.09.2013 12:24:01 ICT> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch for 13349651 Thu May 24 10:18:28 IST 2012
    WebLogic Server Temporary Patch for BUG14482558 Fri Jan 11 11:20:16 IST 2013
    WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 >
    <06.09.2013 12:24:03 ICT> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
    Enter username to boot WebLogic server:Error: Failed to get value from Standard Input
    Enter password to boot WebLogic server:
    <06.09.2013 12:24:04 ICT> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason:
    There are 1 nested errors:
    weblogic.management.ManagementException: Booting as admin server, but servername, EMGC_OMS1, does not match the admin server name, EMGC_ADMINSERVER
         at weblogic.management.provider.internal.RuntimeAccessService.start(RuntimeAccessService.java:67)
         at weblogic.t3.srvr.ServerServicesManager.startService(ServerServicesManager.java:461)
         at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServicesManager.java:166)
         at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:881)
         at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:568)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:469)
         at weblogic.Server.main(Server.java:71)
    >
    <06.09.2013 12:24:04 ICT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
    wlst:
    wls:/offline>
    what I did wrong? how to start WLS server?

    Hi,
    First of all with EM 12.1.0.x any version you are not required to install wls separately, we have single installer for em and wls. Is there any specific reason you installer wls separately?
    Coming back to your issue: can you check
    %OMS_HOME%\BIN>emctl istart oms completes successfully.
    %OMS_HOME%\BIN>emctl istop oms completes successfully.
    Also open an SR with Oracle support and share the number. We should debug such issue through SR so that we can share logs and come find a root cause.

  • BLOCK CORRUPTION (ORA-1578) 처리 (ORACLE 8I NEW FEATURE)

    제품 : ORACLE SERVER
    작성날짜 : 2002-05-31
    BLOCK CORRUPTION (ORA-1578) 처리 (ORACLE 8I NEW FEATURE)
    ========================================================
    PURPOSE
    Block Corruption의 처리 방안에 대해 알아본다.
    Problem Description
    block corruption 시 10210, 10211,10231 의 event 를 사용해서
    해당 block 을 skip 할 수도 있지만 V8.1 이상에서는
    dbms_repair.fix_corrupt_blocks ,
    dbms_repair.skip_corrupt_block 를 이용하여
    corrupt가 발생한 block을 detect하고 skip, 또는 repair해주는 방안이
    제시되고 있다.
    Workaround
    Solution Description
    - 먼저 detecting 을 위해 db_block_checking =true 를 init.ora 에 set
    - dbms_repair 의 package 를 사용하는데 이 package 는 dbmsrpr.sql,
    prvtrpr.plb를 수행한다 .
    - sys 로 접속하여 package 를 실행한다.
    다음의 예제를 살펴보자
    T1 테이블에 corrupt 된 block 이 있다고 가정한다.
    SQL> desc t1
    Name Null? Type
    COL1 NOT NULL NUMBER(38)
    COL2 CHAR(512)
    SQL> analyze table t1 validate structure;
    analyze table t1 validate structure
    ERROR at line 1:
    ORA-01498: block check failure - see trace file
    이때 ANALYZE로 부터 발생된 trace file 에 corrupt 된 block 에 3 row 의
    (nrows = 3) data 가 있음을 알수 있다고 가정하자.
    DBMS_REPAIR.ADMIN_TABLES (repair and orphan key)
    ================================================
    ADMIN_TABLES 은 table 을 위한 repair table과,인덱스를 위한 orphan key
    tables을 제공한다.
    SQL> @adminCreate
    SQL> connect sys/change_on_install
    Connected.
    SQL>
    SQL> -- Repair Table
    SQL>
    SQL> declare
    2 begin
    3 -- Create repair table
    4 dbms_repair.admin_tables (
    5 -- table_name => 'REPAIR_TABLE',
    6 table_type => dbms_repair.repair_table,
    7 action => dbms_repair.create_action,
    8 tablespace => 'USERS'); -- default TS of SYS if not specified
    9 end;
    10 /
    PL/SQL procedure successfully completed.
    SQL> select owner, object_name, object_type
    2 from dba_objects
    3 where object_name like '%REPAIR_TABLE';
    OWNER OBJECT_NAME OBJECT_TYPE
    SYS DBA_REPAIR_TABLE VIEW
    SYS REPAIR_TABLE TABLE
    SQL>
    SQL> -- Orphan Key Table
    SQL>
    SQL> declare
    2 begin
    3 -- Create orphan key table
    4 dbms_repair.admin_tables (
    5 table_type => dbms_repair.orphan_table,
    6 action => dbms_repair.create_action,
    7 tablespace => 'USERS'); -- default TS of SYS if not specified
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> select owner, object_name, object_type
    2 from dba_objects
    3 where object_name like '%ORPHAN_KEY_TABLE';
    OWNER OBJECT_NAME OBJECT_TYPE
    SYS DBA_ORPHAN_KEY_TABLE VIEW
    SYS ORPHAN_KEY_TABLE TABLE
    DBMS_REPAIR.CHECK_OBJECT
    =========================
    CHECK_OBJECT procedure 는 기술된 object를 check 하고, repair 를 위한 정보를 수집하기 위함이다.
    SQL> @checkObject
    SQL> set serveroutput on
    SQL>
    SQL> declare
    2 rpr_count int;
    3 begin
    4 rpr_count := 0;
    5 dbms_repair.check_object (
    6 schema_name => 'SYSTEM',
    7 object_name => 'T1',
    8 repair_table_name => 'REPAIR_TABLE',
    9 corrupt_count => rpr_count);
    10 dbms_output.put_line('repair count: ' || to_char(rpr_count));
    11 end;
    12 /
    repair count: 1
    PL/SQL procedure successfully completed.
    SQL> desc repair_table
    Name Null? Type
    OBJECT_ID NOT NULL NUMBER
    TABLESPACE_ID NOT NULL NUMBER
    RELATIVE_FILE_ID NOT NULL NUMBER
    BLOCK_ID NOT NULL NUMBER
    CORRUPT_TYPE NOT NULL NUMBER
    SCHEMA_NAME NOT NULL VARCHAR2(30)
    OBJECT_NAME NOT NULL VARCHAR2(30)
    BASEOBJECT_NAME VARCHAR2(30)
    PARTITION_NAME VARCHAR2(30)
    CORRUPT_DESCRIPTION VARCHAR2(2000)
    REPAIR_DESCRIPTION VARCHAR2(200)
    MARKED_CORRUPT NOT NULL VARCHAR2(10)
    CHECK_TIMESTAMP NOT NULL DATE
    FIX_TIMESTAMP DATE
    REFORMAT_TIMESTAMP DATE
    SQL> select object_name, block_id, corrupt_type, marked_corrupt,
    2 corrupt_description, repair_description
    3 from repair_table;
    OBJECT_NAME BLOCK_ID CORRUPT_TYPE MARKED_COR
    CORRUPT_DESCRIPTION
    REPAIR_DESCRIPTION
    T1 3 1 FALSE
    kdbchk: row locked by non-existent transaction
    table=0 slot=0
    lockid=32 ktbbhitc=1
    mark block software corrupt
    Data Extraction
    ===============
    repair table에 의하면 file 6 ,block 3 에 corrupt 이 났음을 알수 있다
    그러나 아직 이 block 은 corrupt 로 mark 되어 있지 않으므로 필요 data 를
    추출하여야 한다.
    1. ALTER SYSTEM DUMP (nrows = 3) 에 의해 block안에 있는 row수를 결정한다.
    2. corrupt object를 select 하여 가능한 정보를 추출한다.
    SQL> -- The following query can be used to salvage data from a corrupt block.
    SQL> -- Creating a temporary table facilitates data insertion.
    SQL> create table temp_t1 as
    2 select * from system.t1
    3 where dbms_rowid.rowid_block_number(rowid) = 3
    4 and dbms_rowid.rowid_to_absolute_fno (rowid, 'SYSTEM','T1') = 6;
    Table created.
    SQL> select col1 from temp_t1;
    COL1
    2
    3
    DBMS_REPAIR.FIX_CORRUPT_BLOCKS (ORA-1578)
    ============================================
    FIX_CORRUPT_BLOCKS procedure는 repair table 의 정보를 이용하여 corrupt
    blocks 을 fix 한다
    그러나 아직 full table scan 시 여전히 error 가 발생한다
    SQL> declare
    2 fix_count int;
    3 begin
    4 fix_count := 0;
    5 dbms_repair.fix_corrupt_blocks (
    6 schema_name => 'SYSTEM',
    7 object_name => 'T1',
    8 object_type => dbms_repair.table_object,
    9 repair_table_name => 'REPAIR_TABLE',
    10 fix_count => fix_count);
    11 dbms_output.put_line('fix count: ' || to_char(fix_count));
    12 end;
    13 /
    fix count: 1
    PL/SQL procedure successfully completed.
    SQL> select object_name, block_id, marked_corrupt
    2 from repair_table;
    OBJECT_NAME BLOCK_ID MARKED_COR
    T1 3 TRUE
    SQL> select * from system.t1;
    select * from system.t1
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 6, block # 3)
    ORA-01110: data file 6: '/tmp/ts_corrupt.dbf'
    DBMS_REPAIR.DUMP_ORPHAN_KEYS
    ==============================
    DUMP_ORPHAN_KEYS는 corrupt data 에 해당하는 index 를 나타내 준다
    SQL> select index_name from dba_indexes
    2 where table_name in (select distinct object_name from repair_table);
    INDEX_NAME
    T1_PK
    SQL> @dumpOrphanKeys
    SQL> set serveroutput on
    SQL>
    SQL> declare
    2 key_count int;
    3 begin
    4 key_count := 0;
    5 dbms_repair.dump_orphan_keys (
    6 schema_name => 'SYSTEM',
    7 object_name => 'T1_PK',
    8 object_type => dbms_repair.index_object,
    9 repair_table_name => 'REPAIR_TABLE',
    10 orphan_table_name => 'ORPHAN_KEY_TABLE',
    11 key_count => key_count);
    12 dbms_output.put_line('orphan key count: ' || to_char(key_count));
    13 end;
    14 /
    orphan key count: 3
    PL/SQL procedure successfully completed.
    SQL> desc orphan_key_table
    Name Null? Type
    SCHEMA_NAME NOT NULL VARCHAR2(30)
    INDEX_NAME NOT NULL VARCHAR2(30)
    IPART_NAME VARCHAR2(30)
    INDEX_ID NOT NULL NUMBER
    TABLE_NAME NOT NULL VARCHAR2(30)
    PART_NAME VARCHAR2(30)
    TABLE_ID NOT NULL NUMBER
    KEYROWID NOT NULL ROWID
    KEY NOT NULL ROWID
    DUMP_TIMESTAMP NOT NULL DATE
    SQL> select index_name, count(*) from orphan_key_table
    2 group by index_name;
    INDEX_NAME COUNT(*)
    T1_PK 3
    Note: orphan key table의 index 는 다시 rebuild 되어야 한다.
    DBMS_REPAIR.SKIP_CORRUPT_BLOCKS
    ===============================
    SKIP_CORRUPT_BLOCKS 은 table 과 index 의 corrupt block 을 skip 하는 것을 enable/disable 을 실시한다.
    Suggestion: SKIP_CORRUPT_BLOCKS 가 enabled되면 orphan key table의 모든
    index 는 모두 rebuild 되어야 한다. ( all index associated with object
    if DUMP_ORPHAN_KEYS was omitted).
    SQL> @skipCorruptBlocks
    SQL> declare
    2 begin
    3 dbms_repair.skip_corrupt_blocks (
    4 schema_name => 'SYSTEM',
    5 object_name => 'T1',
    6 object_type => dbms_repair.table_object,
    7 flags => dbms_repair.skip_flag);
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> select table_name, skip_corrupt from dba_tables
    2 where table_name = 'T1';
    TABLE_NAME SKIP_COR
    T1 ENABLED
    SQL> -- rows in corrupt block skipped, no errors on full table scan
    SQL> select * from system.t1;
    COL1 COL2
    4 dddd
    5 eeee
    --> Notice the pk index has not yet been corrected.
    SQL> insert into system.t1 values (1,'aaaa');
    insert into system.t1 values (1,'aaaa')
    SQL> select * from system.t1 where col1 = 1;
    no rows selected
    DBMS_REPAIR.REBUILD_FREELISTS
    ===============================
    REBUILD_FREELISTS rebuilds freelists for the specified object.
    SQL> declare
    2 begin
    3 dbms_repair.rebuild_freelists (
    4 schema_name => 'SYSTEM',
    5 object_name => 'T1',
    6 object_type => dbms_repair.table_object);
    7 end;
    8 /
    PL/SQL procedure successfully completed.
    Rebuild Index
    =============
    Note: Every index identified in the orphan key table should be rebuilt to
    ensure consistent results.
    SQL> alter index system.t1_pk rebuild online;
    Index altered.
    SQL> insert into system.t1 values (1, 'aaaa');
    1 row created.
    SQL> select * from system.t1;
    COL1 COL2
    4 dddd
    5 eeee
    1 aaaa
    Reference Document
    ------------------

    Try look to alert<SID>.log file for full error report (you could paste it here).
    Also from alert log you could get real values for db_block_buffers and shared_pool_size parameters that used during instance startup.

  • MULTIPLE ARCHIVER PROCESSES FAQ ( ORACLE 8I NEW FEATURE )

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-19
    MULTIPLE ARCHIVER PROCESSES FAQ ( ORACLE 8I NEW FEATURE )
    =========================================================
    PURPOSE
    1. LOG_ARCHIVE_MAX_PROCESSES가 하는 역할
    2. LOG_ARCHIVE_MAX_PROCESSES 값은 동적으로 변경 가능한지 여부
    3. Archiver process의 갯수가 동적으로 바뀌는 메카니즘
    4. 어떤 archiver process가 online log를 archive시켰는지 판단 방법
    Explanation
    1. LOG_ARCHIVE_MAX_PROCESSES가 하는 역할
    Oracle 8i에는 다중 archive destination을 지원하며, 단일 archiver의
    부하를 줄여주기 위해 multiple archiver process를 사용할 수 있다.
    LOG_ARCHIVE_MAX_PROCESSES 파라미터로 구동시킬 최대 ARCH 프로세스의
    갯수를 지정하면 된다.
    만약 LOG_ARCHIVE_START 값이 TRUE로 지정되어 있다면 인스턴스 구동시
    init 파일에 지정된 LOG_ARCHIVE_MAX_PROCESSES에 지정된 값을 읽어
    들인다. 만약 LOG_ARCHIVE_START 값이 true인데 LOG_ARCHIVE_MAX_PROCESSES
    값이 별도로 지정되어 있지 않을 경우에는 arc0 프로세스만을 구동시킨다.
    LOG_ARCHIVE_MAX_PROCESSES 값이 별도로 지정되었을 경우 (1 - 10 범위),
    arc0, arc1 과 같은 추가 프로세스를 구동시킨다.
    하지만, 이 파라미터 값을 기본값 1이 아닌 다른 값으로 명시적으로 지정할
    필요는 없다. 왜냐하면, 시스템에서 몇개의 ARCn 프로세스가
    필요한지를 판단하여, 추가 ARCn 프로세스를 생성하기 때문이다.
    2. LOG_ARCHIVE_MAX_PROCESSES 값은 동적으로 변경 가능한지 여부
    alter system 명령에서 set LOG_ARCHIVE_MAX_PROCESSES=n 으로
    지정하여 동적으로 값을 변경할 수 있다. 이때 n은 1 부터 10사이의
    값이어야 한다. 하지만, LOG_ARCHIVE_START 값이 FALSE로 지정되어
    있을 경우에는, 명령을 실행시켜도 아무런 영향을 미치지
    못한다.
    3. Archiver process의 갯수가 동적으로 바뀌는 메카니즘
    만약 LOG_ARCHIVE_START 값이 TRUE로 지정되어 있다면, 오라클에서는
    구동시 하나의 archiver process (ARC0)를 구동시킨다. 이 파라미터
    값은 필요시 LATER SYSTEM 명령으로 지정된 갯수만큼의
    archive process를 구동시킬 수 있다.
    예)
    SVRMGRL>alter system set LOG_ARCHIVE_MAX_PROCESSES=4;
    위 명령을 실행 시키면 다음과 같은 절차에 따라 ARC1, ARC2, ARC3를
    추가한다.
    1) Shadow process는 primary archive process에게 프로세스 갯수를
    늘릴 것을 요청한다.
    2) Archiver process는 kcrrschd 함수를 호출한다. (kcrrschd:
    다중 arch process를 schedule)
    3) 만약 요청된 process의 갯수가 현재 사용중인 archiver process
    갯수보다 작은지 확인한다. 만약 새로 지정된 값이 적거나, ARCHIVING이
    DISABLE 된 상태라면 다른 조치를 취하지 않고 return 한다. 그렇지
    않다면 지원되는 최대 갯수인 10을 넘는지 확인하고 10을 넘을 경우에는
    프로세스의 갯수를 10으로 지정한다.
    4) Scheduler 함수는 kcrxs{} structure에 대한 latch를 확보한다.
    여기서 kcrxs{} structure는 ARCH Activation status를 나타낸다.
    5) Scheduler 함수는 지정된 process 갯수 만큼 loop를 돌면서
    schedule된 상태를 structure KCRRSCHED에 반영시킨다.
    6) 그리고 나서 latch를 release 시킨 후 kcrrsmp 함수를 ( kcrrsmp:
    다중 arch processs 구동 ) 호출한다.
    7) kcrrsmp 함수는 kcrrxs{} structure (ARCH 구동 상태)에 대한 latch를
    확보하여 code 실행을 serialize 시켜 이 함수가 동시에 실행되더라도
    한번에 하나씩 실행될 수 있도록 한다.
    8) pending 상태에 있는 archiver process를 스케쥴링 하고, dead process가
    있으면 clean up 시킨다.
    9) 그리고 나서 이 함수는 지정된 process 갯수 만큼 loop를 돌면서
    KCRRSCHED 상태를 KCRRSTART으로 바꾸어, archiver process들을
    구동 준비 상태로 만든다.
    10) latch를 release 시킨 후 ARCH 프로세스를 구동시킨다.
    11) kcrrsmp함수는 latch를 다시 획득한다. 각각의 archiver 프로세스는
    자기 자신을 activate 시킬 것을 통보 받는다. archiver process는
    자기 자신을 activate 시킨 후 alert file에 관련 사항을 기록한다.
    12) 호출을 하는 함수는 모든 archiver process가 자기 자신을
    activate 시키고, kcrrxs structure의 내용을 갱신할 때 까지
    sleep 상태에서 대기한다.
    13) 끝으로, 현재 archiver process의 갯수가 요청된 archiver process
    의 갯수와 일치 하면, latch를 release 시키고 break 한다. ( C
    에서의 break )
    alert. log 에는 위 과정이 다음과 같이 반영된다.
    sql: prodding the archiver
    ALTER SYSTEM SET log_archive_max_processes=4;
    Tue Jul 13 02:15:14 1999
    ARC0: changing ARC1 KCRRNOARCH->KCRRSCHED
    ARC0: changing ARC2 KCRRNOARCH->KCRRSCHED
    ARC0: changing ARC3 KCRRNOARCH->KCRRSCHED
    ARC0: STARTING ARCH PROCESSES
    ARC0: changing ARC1 KCRRSCHED->KCRRSTART
    ARC0: changing ARC2 KCRRSCHED->KCRRSTART
    ARC0: changing ARC3 KCRRSCHED->KCRRSTART
    ARC0: invoking ARC1
    Tue Jul 13 02:15:15 1999
    ARC1: changing ARC1 KCRRSTART->KCRRACTIVE
    Tue Jul 13 02:15:15 1999
    ARC0: Initializing ARC1
    ARC0: ARC1 invoked
    ARC0: invoking ARC2
    ARC1 started with pid=10
    ARC1: Archival started
    Tue Jul 13 02:15:15 1999
    ARC2: changing ARC2 KCRRSTART->KCRRACTIVE
    Tue Jul 13 02:15:15 1999
    ARC0: Initializing ARC2
    ARC2 와 ARC3도 동일한 절차를 따른다.
    흥미로운 사실은 프로세스의 갯수를 줄일 수도 있다는 것이다. 예를 들어
    다음과 같은 명령을 실행시킬 경우
    SVRMGRL>alter system set LOG_ARCHIVE_MAX_PROCESSES=2;
    다음과 같은 작업이 순서대로 실행된다.
    1) shadow process는 현재 active 상태인 archiver process와 접속을 한다.
    2) archiverprocess는 kcrrxmp 함수를 호출한다. ( kcrrxmp: 다중
    Arch process 정지 )
    3) kcrrxmp 함수는 kcrrxs{} structure에 (ARCH 구동 상태) 대한 latch를 획득하여 다른 프로세스에서 structure를 동시에 병경하지 않도록 한다.
    4) 새로 요청된 archiver process의 갯수가 현재 사용중인 archiver process
    의 갯수보다 작은지 확인한다.
    5) 만약 작다면, archiver process 목록 가운데, 가장 최근에 schedule
    되어, archival 작업에 schedule 차례가 금방 돌아 오지 않을 프로세스를
    찾아낸다.
    6) 각각의 프로세스에 대해 KCRRACTIVE 상태에서 KCRRSHUTDN로 상태를
    변경할 것을 요청한다.
    7) 상태가 바뀌면, OS에서 해당 프로세스를 종료시키도록 하고, 상태를
    KCRRDEAD로 바꾼다. 관련된 상태 정보가 정리되고 kcrrxs{} structure의
    내용이 갱신된다.
    6) ,7) 과정은 지정된 archiver process 갯수로 줄어들 때 까지
    반복된다.
    8) 새로운 archiver process의 갯수로 kcrrxs structure 내용이 갱신된다.
    9) latch를 release 시킨다.
    상태 변동은 다음과 같이 alert. log 파일에 반영된다.
    sql: prodding the archiver
    Tue Jul 13 00:34:20 1999
    ARC3: changing ARC0 KCRRACTIVE->KCRRSHUTDN
    ARC3: sending ARC0 shutdown message
    ARC3: changing ARC1 KCRRACTIVE->KCRRSHUTDN
    ARC3: sending ARC1 shutdown message
    ARC3: received prod
    Tue Jul 13 00:34:20 1999
    ALTER SYSTEM SET log_archive_max_processes=2;
    Tue Jul 13 00:34:20 1999
    ARCH shutting down
    ARC0: Archival stopped
    ARC0: changing ARC0 KCRRSHUTDN->KCRRDEAD
    Tue Jul 13 00:34:20 1999
    ARCH shutting down
    ARC1: Archival stopped
    ARC1: changing ARC1 KCRRSHUTDN->KCRRDEAD
    4. 어떤 archiver process가 online log를 archive시켰는지 판단 방법
    Archiver process는 round-robin 방식으로 archiving 작업을 수행하도록
    schedule 된다. 만약 다중 archiver process가 부하에 따라 activate 된
    경우는 여러가지 경우의 수가 있을 수 있다. Oracle 8i에서는 다중
    archive log dest를 지원하면서 archive log에 대한 duplexing을 지원
    하기 때문에, 어떤프로세스가 log file을 archive 시켰는지를 기록할 필요가
    있다.
    Oracle 8i에서 archival 작업은 성공할 때 마다 trace file에 archiver
    process 명을 기록한다.
    다음은 관련 trace file의 주요 내용이다.
    Instance name: v815
    Redo thread mounted by this instance: 1
    Oracle process number: 12
    Unix process pid: 3658, image: oracle@oracle8i (ARC3)
    *** Session ID:(12. 1) 1999. 07. 13. 02. 15. 15. 000
    *** 1999. 07. 13. 02. 15. 15. 000
    *** 1999. 07. 13. 02. 33. 06. 000
    ARC3: Begin archiving log# 1 seq# 38 thrd# 1
    ARC3: VALIDATE
    ARC3: PREPARE
    ARC3: INITIALIZE
    ARC3: SPOOL
    ARC3: Creating archive destination 1 : '/bigdisk/oracle8i/dbs/arch/1_38.
    dbf'
    ARC3: Archiving block 1 count 1 to : '/bigdisk/oracle8i/dbs/arch/1_38.
    dbf'
    ARC3: Closing archive destination 1 : /bigdisk/oracle8i/dbs/arch/1_38.
    dbf
    ARC3: FINISH
    ARC3: Archival success destination 1 : '/bigdisk/oracle8i/dbs/arch/1_38.
    dbf'
    ARC3: COMPLETE, all destinations archived
    ARC3: ArchivedLog entry added: /bigdisk/oracle8i/dbs/arch/1_38. dbf
    ARC3: ARCHIVED
    *** 1999. 07. 13. 02. 33. 06. 000
    ARC3: Completed archiving log# 1 seq# 38 thrd# 1
    이 정보를 가지고, archive process 3이 log sequence 38번을
    destination 1 :/bigdisk/oracle8i/dbs/arch 에 archive 시킨 것을 알 수 있다.
    Reference Ducumment
    <Note:73163.1>

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-19
    MULTIPLE ARCHIVER PROCESSES FAQ ( ORACLE 8I NEW FEATURE )
    =========================================================
    PURPOSE
    1. LOG_ARCHIVE_MAX_PROCESSES가 하는 역할
    2. LOG_ARCHIVE_MAX_PROCESSES 값은 동적으로 변경 가능한지 여부
    3. Archiver process의 갯수가 동적으로 바뀌는 메카니즘
    4. 어떤 archiver process가 online log를 archive시켰는지 판단 방법
    Explanation
    1. LOG_ARCHIVE_MAX_PROCESSES가 하는 역할
    Oracle 8i에는 다중 archive destination을 지원하며, 단일 archiver의
    부하를 줄여주기 위해 multiple archiver process를 사용할 수 있다.
    LOG_ARCHIVE_MAX_PROCESSES 파라미터로 구동시킬 최대 ARCH 프로세스의
    갯수를 지정하면 된다.
    만약 LOG_ARCHIVE_START 값이 TRUE로 지정되어 있다면 인스턴스 구동시
    init 파일에 지정된 LOG_ARCHIVE_MAX_PROCESSES에 지정된 값을 읽어
    들인다. 만약 LOG_ARCHIVE_START 값이 true인데 LOG_ARCHIVE_MAX_PROCESSES
    값이 별도로 지정되어 있지 않을 경우에는 arc0 프로세스만을 구동시킨다.
    LOG_ARCHIVE_MAX_PROCESSES 값이 별도로 지정되었을 경우 (1 - 10 범위),
    arc0, arc1 과 같은 추가 프로세스를 구동시킨다.
    하지만, 이 파라미터 값을 기본값 1이 아닌 다른 값으로 명시적으로 지정할
    필요는 없다. 왜냐하면, 시스템에서 몇개의 ARCn 프로세스가
    필요한지를 판단하여, 추가 ARCn 프로세스를 생성하기 때문이다.
    2. LOG_ARCHIVE_MAX_PROCESSES 값은 동적으로 변경 가능한지 여부
    alter system 명령에서 set LOG_ARCHIVE_MAX_PROCESSES=n 으로
    지정하여 동적으로 값을 변경할 수 있다. 이때 n은 1 부터 10사이의
    값이어야 한다. 하지만, LOG_ARCHIVE_START 값이 FALSE로 지정되어
    있을 경우에는, 명령을 실행시켜도 아무런 영향을 미치지
    못한다.
    3. Archiver process의 갯수가 동적으로 바뀌는 메카니즘
    만약 LOG_ARCHIVE_START 값이 TRUE로 지정되어 있다면, 오라클에서는
    구동시 하나의 archiver process (ARC0)를 구동시킨다. 이 파라미터
    값은 필요시 LATER SYSTEM 명령으로 지정된 갯수만큼의
    archive process를 구동시킬 수 있다.
    예)
    SVRMGRL>alter system set LOG_ARCHIVE_MAX_PROCESSES=4;
    위 명령을 실행 시키면 다음과 같은 절차에 따라 ARC1, ARC2, ARC3를
    추가한다.
    1) Shadow process는 primary archive process에게 프로세스 갯수를
    늘릴 것을 요청한다.
    2) Archiver process는 kcrrschd 함수를 호출한다. (kcrrschd:
    다중 arch process를 schedule)
    3) 만약 요청된 process의 갯수가 현재 사용중인 archiver process
    갯수보다 작은지 확인한다. 만약 새로 지정된 값이 적거나, ARCHIVING이
    DISABLE 된 상태라면 다른 조치를 취하지 않고 return 한다. 그렇지
    않다면 지원되는 최대 갯수인 10을 넘는지 확인하고 10을 넘을 경우에는
    프로세스의 갯수를 10으로 지정한다.
    4) Scheduler 함수는 kcrxs{} structure에 대한 latch를 확보한다.
    여기서 kcrxs{} structure는 ARCH Activation status를 나타낸다.
    5) Scheduler 함수는 지정된 process 갯수 만큼 loop를 돌면서
    schedule된 상태를 structure KCRRSCHED에 반영시킨다.
    6) 그리고 나서 latch를 release 시킨 후 kcrrsmp 함수를 ( kcrrsmp:
    다중 arch processs 구동 ) 호출한다.
    7) kcrrsmp 함수는 kcrrxs{} structure (ARCH 구동 상태)에 대한 latch를
    확보하여 code 실행을 serialize 시켜 이 함수가 동시에 실행되더라도
    한번에 하나씩 실행될 수 있도록 한다.
    8) pending 상태에 있는 archiver process를 스케쥴링 하고, dead process가
    있으면 clean up 시킨다.
    9) 그리고 나서 이 함수는 지정된 process 갯수 만큼 loop를 돌면서
    KCRRSCHED 상태를 KCRRSTART으로 바꾸어, archiver process들을
    구동 준비 상태로 만든다.
    10) latch를 release 시킨 후 ARCH 프로세스를 구동시킨다.
    11) kcrrsmp함수는 latch를 다시 획득한다. 각각의 archiver 프로세스는
    자기 자신을 activate 시킬 것을 통보 받는다. archiver process는
    자기 자신을 activate 시킨 후 alert file에 관련 사항을 기록한다.
    12) 호출을 하는 함수는 모든 archiver process가 자기 자신을
    activate 시키고, kcrrxs structure의 내용을 갱신할 때 까지
    sleep 상태에서 대기한다.
    13) 끝으로, 현재 archiver process의 갯수가 요청된 archiver process
    의 갯수와 일치 하면, latch를 release 시키고 break 한다. ( C
    에서의 break )
    alert. log 에는 위 과정이 다음과 같이 반영된다.
    sql: prodding the archiver
    ALTER SYSTEM SET log_archive_max_processes=4;
    Tue Jul 13 02:15:14 1999
    ARC0: changing ARC1 KCRRNOARCH->KCRRSCHED
    ARC0: changing ARC2 KCRRNOARCH->KCRRSCHED
    ARC0: changing ARC3 KCRRNOARCH->KCRRSCHED
    ARC0: STARTING ARCH PROCESSES
    ARC0: changing ARC1 KCRRSCHED->KCRRSTART
    ARC0: changing ARC2 KCRRSCHED->KCRRSTART
    ARC0: changing ARC3 KCRRSCHED->KCRRSTART
    ARC0: invoking ARC1
    Tue Jul 13 02:15:15 1999
    ARC1: changing ARC1 KCRRSTART->KCRRACTIVE
    Tue Jul 13 02:15:15 1999
    ARC0: Initializing ARC1
    ARC0: ARC1 invoked
    ARC0: invoking ARC2
    ARC1 started with pid=10
    ARC1: Archival started
    Tue Jul 13 02:15:15 1999
    ARC2: changing ARC2 KCRRSTART->KCRRACTIVE
    Tue Jul 13 02:15:15 1999
    ARC0: Initializing ARC2
    ARC2 와 ARC3도 동일한 절차를 따른다.
    흥미로운 사실은 프로세스의 갯수를 줄일 수도 있다는 것이다. 예를 들어
    다음과 같은 명령을 실행시킬 경우
    SVRMGRL>alter system set LOG_ARCHIVE_MAX_PROCESSES=2;
    다음과 같은 작업이 순서대로 실행된다.
    1) shadow process는 현재 active 상태인 archiver process와 접속을 한다.
    2) archiverprocess는 kcrrxmp 함수를 호출한다. ( kcrrxmp: 다중
    Arch process 정지 )
    3) kcrrxmp 함수는 kcrrxs{} structure에 (ARCH 구동 상태) 대한 latch를 획득하여 다른 프로세스에서 structure를 동시에 병경하지 않도록 한다.
    4) 새로 요청된 archiver process의 갯수가 현재 사용중인 archiver process
    의 갯수보다 작은지 확인한다.
    5) 만약 작다면, archiver process 목록 가운데, 가장 최근에 schedule
    되어, archival 작업에 schedule 차례가 금방 돌아 오지 않을 프로세스를
    찾아낸다.
    6) 각각의 프로세스에 대해 KCRRACTIVE 상태에서 KCRRSHUTDN로 상태를
    변경할 것을 요청한다.
    7) 상태가 바뀌면, OS에서 해당 프로세스를 종료시키도록 하고, 상태를
    KCRRDEAD로 바꾼다. 관련된 상태 정보가 정리되고 kcrrxs{} structure의
    내용이 갱신된다.
    6) ,7) 과정은 지정된 archiver process 갯수로 줄어들 때 까지
    반복된다.
    8) 새로운 archiver process의 갯수로 kcrrxs structure 내용이 갱신된다.
    9) latch를 release 시킨다.
    상태 변동은 다음과 같이 alert. log 파일에 반영된다.
    sql: prodding the archiver
    Tue Jul 13 00:34:20 1999
    ARC3: changing ARC0 KCRRACTIVE->KCRRSHUTDN
    ARC3: sending ARC0 shutdown message
    ARC3: changing ARC1 KCRRACTIVE->KCRRSHUTDN
    ARC3: sending ARC1 shutdown message
    ARC3: received prod
    Tue Jul 13 00:34:20 1999
    ALTER SYSTEM SET log_archive_max_processes=2;
    Tue Jul 13 00:34:20 1999
    ARCH shutting down
    ARC0: Archival stopped
    ARC0: changing ARC0 KCRRSHUTDN->KCRRDEAD
    Tue Jul 13 00:34:20 1999
    ARCH shutting down
    ARC1: Archival stopped
    ARC1: changing ARC1 KCRRSHUTDN->KCRRDEAD
    4. 어떤 archiver process가 online log를 archive시켰는지 판단 방법
    Archiver process는 round-robin 방식으로 archiving 작업을 수행하도록
    schedule 된다. 만약 다중 archiver process가 부하에 따라 activate 된
    경우는 여러가지 경우의 수가 있을 수 있다. Oracle 8i에서는 다중
    archive log dest를 지원하면서 archive log에 대한 duplexing을 지원
    하기 때문에, 어떤프로세스가 log file을 archive 시켰는지를 기록할 필요가
    있다.
    Oracle 8i에서 archival 작업은 성공할 때 마다 trace file에 archiver
    process 명을 기록한다.
    다음은 관련 trace file의 주요 내용이다.
    Instance name: v815
    Redo thread mounted by this instance: 1
    Oracle process number: 12
    Unix process pid: 3658, image: oracle@oracle8i (ARC3)
    *** Session ID:(12. 1) 1999. 07. 13. 02. 15. 15. 000
    *** 1999. 07. 13. 02. 15. 15. 000
    *** 1999. 07. 13. 02. 33. 06. 000
    ARC3: Begin archiving log# 1 seq# 38 thrd# 1
    ARC3: VALIDATE
    ARC3: PREPARE
    ARC3: INITIALIZE
    ARC3: SPOOL
    ARC3: Creating archive destination 1 : '/bigdisk/oracle8i/dbs/arch/1_38.
    dbf'
    ARC3: Archiving block 1 count 1 to : '/bigdisk/oracle8i/dbs/arch/1_38.
    dbf'
    ARC3: Closing archive destination 1 : /bigdisk/oracle8i/dbs/arch/1_38.
    dbf
    ARC3: FINISH
    ARC3: Archival success destination 1 : '/bigdisk/oracle8i/dbs/arch/1_38.
    dbf'
    ARC3: COMPLETE, all destinations archived
    ARC3: ArchivedLog entry added: /bigdisk/oracle8i/dbs/arch/1_38. dbf
    ARC3: ARCHIVED
    *** 1999. 07. 13. 02. 33. 06. 000
    ARC3: Completed archiving log# 1 seq# 38 thrd# 1
    이 정보를 가지고, archive process 3이 log sequence 38번을
    destination 1 :/bigdisk/oracle8i/dbs/arch 에 archive 시킨 것을 알 수 있다.
    Reference Ducumment
    <Note:73163.1>

Maybe you are looking for

  • No Black Ink with a new cartridge and new printer and was working

    I put in all new cartridges and everything was working just fine. I printed two black copies and then went into Settings to change to a lighter shade. Now no black copies at all. I went back into Setting and changed it to a darker shade (4) and still

  • How can I duplicate my project in FCP X 10.1.1

    I have MAC Book Pro 2.8 GhZ intel core i7 with 16 GB Ram OS X 10.9.3 . Working on my Final Cut Pro X 10.1.1 but I can't seem to make a Duplicate on external HD to be shared on my iMac late 2013 model... It only copies it on the same HD.... I would li

  • Automator-iCal-Automator-Mail

    I am intend to perform an action that trigger an email from iCal event at regular intervals . I am trying to do as follow: in automator I've created a work flow in two actions, first New Mail Message; the second, Send Outgoing mail message. In iCal,

  • BPEL instance number in the XSL

    How can I reference the current BPEL instance number in an XSL? I figure it would handy to have the unique BPEL instance number for trouble shooting if there is a problem with the interface.

  • User Exit for XD02

    Hi , I am working on an User Exit. I need the User exit for XD02 transaction.This Exit should trigger in the below scenario. A check box should appear in XD02 transaction in Sales Area Data at the end after Agency bussiness tab. There should be a tab