ASE 15.7 new feature : In-row LOB

We are trying to implement In-row LOB in our environment. We already have a POC for this feature. But all the testings’ are done on a non-replicated environment. I want to know if this is already in use in production replicated environment. And any issues faced with replication.

We are trying to implement In-row LOB in our environment. We already have a POC for this feature. But all the testings’ are done on a non-replicated environment. I want to know if this is already in use in production replicated environment. And any issues faced with replication.

Similar Messages

  • Can both in-row and off-row LOBs be used in a where clause?

    We are preparing to upgrade ASE from version 15.5 to 16.0.  One of the features that is very appealing has to do with the changes made concerning the handling of LOBs.  In particular, the ability to use a LOB column in search arguments (where clause) is something our developers have longed for since the retirement of the full-text search option.  So, in version 16.0, can any column with a datatype of text be used as a search argument? Are there any restrictions.
    Thanks in advance.

    Hi Kevin,
    The in-row LOB feature is mainly designed to save space when a text column has many short values, which is a particularly bad problem when the server uses a large page size (like 16K) as ASE would use a full 16K to store even a single bye "Y".  I don't think the feature made any change in how text can be used in search arguments.  i.e. you can still use LIKE and IS [NOT] NULL, but not others.
    Example:
    1> create table t (x text in row (8))
    2> go
    1> insert t values ("abc")
    2> insert t values ("abcdefghijkl")
    3> go
    (2 rows affected)
    1> select * from t where x like "%c%"
    2> go
    x                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
    abc                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    abcdefghijkl                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
    (2 rows affected)
    1> select * from t where x !> "c"
    2> go
    Msg 257, Level 16, State 1:
    Server 'redhead', Line 1:
    Implicit conversion from datatype 'TEXT' to 'VARCHAR' is not allowed.  Use the
    CONVERT function to run this query.
    Msg 306, Level 16, State 5:
    Server 'redhead', Line 1:
    TEXT, IMAGE and UNITEXT datatypes may not be used in a WHERE clause, except with
    the LIKE expression and IS [NOT] NULL predicate on columns.

  • (V9I) ORACLE9I NEW FEATURE : LOGMINER 의 기능과 사용방법

    제품 : ORACLE SERVER
    작성날짜 : 2002-11-13
    (V9I) ORACLE9I NEW FEATURE : LOGMINER 의 기능과 사용방법
    ==========================================
    Purpose
    Oracle 9i LogMiner 의 새로운 기능과 사용방법에 대해 알아보도록 한다.
    (8I LogMiner의 일반적인 개념과 기능은 BUL. 12033 참조)
    Explanation
    LogMiner 는 8I 에서부터 새롭게 제공하는 기능으로 Oracle 8 이상의 Redo
    log file 또는 Archive log file 분석을 위해 이용된다.
    9I 에서는 기존 8I 에서 제공하던 기능을 모두 포함하고 그 외 새로운 점은
    LogMiner 분석을 위해 dictionary 정보를 Flat file(output)로 생성이 가능하
    였으나 9I 에서부터는 Flat file 과 함께 On line redo log 를 이용하여
    dictionary 정보를 저장할 수 있게 되었고, Block corruption이 발생하였을
    경우 해당 부분만 skip할 수 있는 기능이 추가되었다.
    9I 에서의 New feature 를 정리하면 다음과 같다.
    1. 9I New feature
    1) DDL 지원 단, 9I 이상의 Redo/Archive log file만 분석 가능
         : V$LOGMNR_CONTENTS 의 OPERATION column에서 DDL 확인
    2) LogMiner 분석을 위해 생성한 dictioanry 정보를 online redo 에 저장 가능
         : 반드시 Archive log mode 로 운영 중이어야 한다.
         : DBMS_LOGMNR_D.BUILD를 사용하여 dictionary file 생성
         : 기존 Flat file 또는 Redo log 에 생성 가능
         : 예) Flat file
              - SQL> EXECUTE dbms_logmnr_d.build
                   (DICTIONARY_FILENAME => 'dictionary.ora'
                   ,DICTIONARY_LOCATION => '/oracle/database'
                   ,OPTIONS => DBMS_LOGMNR_D.STORE_IN_FLAT_FILE);
         예) Redo log
              - SQL> EXECUTE dbms_logmnr_d.build
                   (OPTIONS => DBMS_LOGMNR_D.STORE_IN_REDO_LOGS);
    3) Redo log block corruption 이 발생하였을 경우 corruption 된 부분을 skip하고 분석
         : 8I 에서 log corruption 발생 시 LogMiner 가 종료되고 분석 위해 다시 시도
         : 9I 에서는 DBMS_LOGMNR.START_LOGMNR 의 SKIP_CORRUPTION option 으로 skip 가능
    4) Commit 된 transaction 에 대해서만 display
         : DBMS_LOGMNR.START_LOGMNR 의 COMMITTED_DATA_ONLY option
    5) Index clustered 와 연관된 DML 지원 (8I 제공 안 됨)
    6) Chained and Migrated rows 분석
    2. 제약 사항(9I LogMiner 에서 지원하지 않는 사항)
    1) LONG and LOB data type
    2) Object types
    3) Nested tables
    4) Object Refs
    5) IOT(Index-Organized Table)
    3. LogMiner Views
    1) V$LOGMNR_CONTENTS - 현재 분석되고 있는 redo log file의 내용
    2) V$LOGMNR_DICTIONARY - 사용 중인 dictionary file
    3) V$LOGMNR_LOGS - 분석되고 있는 redo log file
    4) V$LOGMNR_PARAMETERS - LogMiner에 Setting된 현재의 parameter의 값
    4. LogMiner 를 이용하기 위한 Setup
    1) LogMiner 를 위한 dictionary 생성(flatfile or on line redo log)
    2) Archive log file or Redo log file 등록
    3) Redo log 분석 시작
    4) Redo log 내용 조회
    5) LogMiner 종료
    5. LogMiner Example
    1) flatfile이 생성될 location을 확인
    SQL> show parameter utl
    NAME TYPE VALUE
    utl_file_dir string /home/ora920/product/9.2.0/smlee
    2) dictionary 정보를 저장할 flatfile 정의 -> dictionary.ora 로 지정
    SQL> execute dbms_logmnr_d.build -
    (dictionary_filename => 'dictionary.ora', -
    dictionary_location => '/home/ora920/product/9.2.0/smlee', -
    options => dbms_logmnr_d.store_in_flat_file);PL/SQL procedure successfully completed.
    3) logfile을 switch 하고 current logfile name과 current time을 기억한다.
    SQL> alter system switch logfile;
    System altered.
    SQL> select member from v$logfile, v$log
    2 where v$logfile.group# = v$log.group#
    3 and v$log.status='CURRENT';
    MEMBER
    /home/ora920/oradata/ORA920/redo02.log
    SQL> select current_timestamp from dual;
    CURRENT_TIMESTAMP
    13-NOV-02 10.37.14.887671 AM +09:00
    4) test를 위해 table emp30 을 생성하고 update -> drop 수행
    SQL> create table emp30 as
    2 select employee_id, last_name, salary from hr.employees
    3 where department_id=30;
    Table created.
    SQL> alter table emp30 add (new_salary number(8,2));
    Table altered.
    SQL> update emp30 set new_salary = salary * 1.5;
    6 rows updated.
    SQL> rollback;
    Rollback complete.
    SQL> update emp30 set new_salary = salary * 1.2;
    6 rows updated.
    SQL> commit;
    Commit complete.
    SQL> drop table emp30;
    select
    Table dropped.
    SQL> select current_timestamp from dual;
    CURRENT_TIMESTAMP
    13-NOV-02 10.39.20.390685 AM +09:00
    5) logminer start (다른 session을 열어 작업)
    SQL> connect /as sysdba
    Connected.
    SQL> execute dbms_logmnr.add_logfile ( -
    logfilename => -
    '/home/ora920/oradata/ORA920/redo02.log', -
    options => dbms_logmnr.new)PL/SQL procedure successfully completed.
    SQL> execute dbms_logmnr.start_logmnr( -
    dictfilename => '/home/ora920/product/9.2.0/smlee/dictionary.ora', -
    starttime => to_date('13-NOV-02 10:37:44','DD_MON_RR HH24:MI:SS'), -
    endtime => to_date('13-NOV-02 10:39:20','DD_MON_RR HH24:MI:SS'), -
    options => dbms_logmnr.ddl_dict_tracking + dbms_logmnr.committed_data_only)PL/SQL procedure successfully completed.
    6) v$logmnr_contents view를 조회
    SQL> select timestamp, username, operation, sql_redo
    2 from v$logmnr_contents
    3 where username='HR'
    4 and (seg_name = 'EMP30' or seg_name is null);
    TIMESTAMP                USERNAME           OPERATION           SQL_REDO           
    13-NOV-02 10:38:20          HR               START               set transaction read write;
    13-NOV-02 10:38:20          HR               DDL               CREATE TABLE emp30 AS
                                                      SELECT EMPLOYEE_ID, LAST_NAME,
                                                      SALARY FROM HR.EMPLOYEES
                                                      WHERE DEPARTMENT_ID=30;
    13-NOV-02 10:38:20          HR                COMMIT
    commit;
    13-NOV-02 10:38:50          HR               DDL               ALTER TABLE emp30 ADD
                                                      (new_salary NUMBER(8,2));
    13-NOV-02 10:39:02          HR               UPDATE          UPDATE "HR"."EMP30" set
                                                      "NEW_SALARY" = '16500' WHERE
                                                      "NEW_SALARY" IS NULL AND ROWID
                                                      ='AAABnFAAEAALkUAAA';
    13-NOV-02 10:39:02-10     HR               DDL               DROP TABLE emp30;
    7) logminer 를 종료한다.
    SQL> execute dbms_logmnr.end_logmnr
    PL/SQL procedure successfully completed.
    Reference Documents
    Note. 148616.1

  • 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.

  • (V7.3)RDBMS 7.3 Enterprise Edition NEW FEATURE에 대한 Q&A

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-13
    (V7.3)RDBMS 7.3 Enterprise Edition NEW FEATURE에 대한 Q&A
    =========================================================
    1. Q) Oracle 7 Release 7.3의 new feature들을 간단하게 알고 싶습니다.
    A) 다음과 같이 요약하여 설명드리겠습니다.
    New features of 7.3.3 are :Direct load to cluster
    Can use backup from before RESETLOGS
    New features of 7.3 are :histograms
    hash joins
    star join enhancement
    standby databases
    parallel union-all
    dynamic init.ora configuration
    direct path export
    compiled triggers
    fast create index
    multiple LRU latches
    updatable join views
    LSQL cursor variable enhancement
    replication enhancement
    ops processor affinity
    Net 2 load balancing
    XA scaling/recovery
    thread safe pro*c/oci
    DB verify
    new pl/sql packages
    new pl/sql features
    bitmap indexes
    2. Q) Oracle 7 Release 7.2와 7.3의 새로운 Parallel feature에는 어떤 것이
    있습니까?
    A) Oracle 7 parallel query 에 의한 parallel operation에는 다음과 같은 내
    용이 있습니다.
    > Parallel Data Loading : conventional and direct-path, to the same
    table or multiple tables concurrently.
    > Parallel Query : table scans, sorts, joins, aggregates, duplicate
    elimination, UNION and UNION ALL(7.3)
    > Parallel Subqueries : in INSERT, UPDATE, DELETE statements.
    > Parallel Execution : of application code(user-defined SQL functions)
    > Parallel Joins :
    nested loop,
    sort-merge,
    star join optimization(creation of cartesian products plus the
    nested loop join),
    hash joins(7.3).
    > Parallel Anti-Joins : NOT IN(7.3).
    > Parallel Summarization(CREATE TABLE AS SELECT) :
    query and insertion of rows into a rollup table.
    > Parallel Index Creation(CREATE INDEX) :
    table scans, sorts, index fragment construction.
    3. Q) Release 7.2와 7.3에서 추가된 optimization 기능에는 어떤 내용이 있습
    니까?
    A) 다음과 같은 기능들이 있습니다.
    1> Direct Database Reads
    Parallel query 프로세스들은 필터링이나, 소팅, 조인과 같은 작업을 수행하
    기 위해서는 아주 큰 테이블을 scanning해야 합니다. Direct Database Reads는
    read efficiency와 성능의 향상을 위해 contiguous memory read를 가능하게 해
    줍니다. 또한, concurrent OLTP와 같은 작업을 수행시 따르는 경합을 없애기 위
    해 버퍼 캐쉬를 bypass합니다.
    2> Direct Database Writes
    Parallel query 프로세스들은 intermediate sort runs, summarization
    (CREATE TABLE AS SELECT), index creation(CREATE INDEX)과 같은 작업의 수행
    결과를 디스크에 종종 기록해야 합니다.
    Direct Database Writes는 write efficiency와 성능의 향상을 위해 direct
    contiguous memory로 하여금 contiguous disk writes를 가능하게 해줍니다.
    또한, concurrent OLTP 작업과 DBWR 프로세스에 의한 경합을 없애기 위해 버
    퍼 캐쉬를 bypass합니다.
    결론적으로, Direct Database Reads와 Writes는 concurrent OLTP와 DSS 작
    업에 따르는 복잡한 부하를 조절하면서 Oracle 7 서버를 분리된 형태로, 또한 최
    적의 튜닝을 가능하게 해줍니다.
    3> Asynchronous I/O
    Oracle 7은 이미 sorts, summarization, index creation, direct-path
    loading 에 대한 asynchronous write 기능을 제공하고 있습니다.
    Release 7.3부터는 보다 나은 성능의 향상을 위해 asynchronous read-ahead
    기능을 제공하여 최대한 processing과 I/O의 병행성을 증가시켜 줍니다.
    4> Parallel Table Creation
    CREATE TABLE ... AS SELECT ...와 같은 구문을 제공하여 상세한 데이타를
    갖는 큰 테이블의 조회된 결과를 저장하기 위해 임시 테이블을 생성합니다.
    이 기능은 보통 intermediate operation의 결과를 저장하기 위해 drill-down
    분석을 할 때 사용됩니다.
    5> Support for the Star Query Optimization
    Oracle 7은 수행 속도의 향상을 위해 star 스키마가 존재하고, star query
    optimization을 invoke합니다. Star query는 먼저 여러 개의 작은 테이블을
    join하고, 그런 후에, 그 결과를 하나의 큰 테이블로 join합니다.
    6> Intelligent Function Shipping
    Release 7.3부터 parallel query를 처리하는 coordinator 프로세스는
    non-shared memory machine(cluster 또는 MPP) 내의 노드들을 처리하기 위해
    디스크나 데이타들 간의 유사성에 대해 인식하게 될 것입니다.
    이 사실에 근거하여, coordinator는 data들이 machine의 shared
    interconnect를 통해 전달될 필요가 없다는 점에서, 특정 node-disk pair로 수
    행되고 있는 프로세스들에게 parallel query operation을 지정할 수 있습니다.
    이 기능은 연관된 cost나 overhead없이 'shared nothing' 소프트웨어 아키텍
    쳐의 잇점을 제공하면서 효율성과 성능, 확장성을 개선할 수 있습니다.
    7> Histograms
    Release 7.3부터 Oracle optimizer는 테이블의 컬럼 내에 있는 데이타 값의
    분포에 관한 더 많은 정보를 이용할 수 있습니다. Value와 상대적 빈도수를 나타
    내는 histogram은 optimizer에게 index의 상대적 'selectivity'에 관한 정보와
    어떤 index를 사용해야할 것인가에 관한 더 좋은 아이디어를 제공해 줄 것입니다.
    적절한 선택을 한다면, query의 수행시간을 몇 분, 심지어 몇 시간씩이나 단축
    시킬 수가 있습니다.
    8> Parallel Hash Joins
    Release 7.3부터 Oracle 7은 join 처리시간의 단축을 위하여 hash join을 제
    공합니다. 해슁 테크닉을 사용하면 join을 하기 위해 데이타를 소트하지 않아도
    되며, 기존에 존재하는 인덱스를 사용하지 않으면서 'on-the-fly' 라는 개념을 제
    공합니다.
    따라서, star schema 데이타베이스에 전형적으로 적용되는 small-to-large
    테이블 join의 수행 속도를 향상시킬 것입니다.
    9> Parallel UNION and UNION ALL
    Release 7.3부터 Oracle 7은 UNION과 UNION ALL과 같은 set operator를 사
    용하여 완전히 parallel하게 query를 수행할 수 있습니다. 이러한 operator를 사
    용하면, 큰 테이블들을 여러 개의 작은 테이블의 집합으로 나누어 처리하기가 훨
    씬 쉬워질 것입니다.
    4. Q) Release 7.3에는 어떤 제품들이 있습니까?
    A) Oracle 7 서버 Release 7.3.3에 대한 제품 리스트는 다음과 같습니다.
    단, 모든 플랫폼들이 리스트된 모든 제품들을 지원하지는 않습니다.
    [ Product ] [ Revision ]
    Advanced replication option 7.3.3.0.0
    Parallel Query Option 7.3.3.0.0
    Parallel Server Option 7.3.3.0.0
    Oracle 7 Server 7.3.3.0.0
    Distributed Database Option 7.3.3.0.0
    Oracle*XA 7.3.3.0.0
    Oracle Spatial Data Option 7.3.3.0.0
    PL/SQL 2.3.3.0.0
    ICX 7.3.3.0.0
    OWSUTL 7.3.3.0.0
    Slax 7.3.3.0.0
    Context Option 2.0.4.0.0
    Pro*C 2.2.3.0.0
    Pro*PL/I 1.6.27.0.0
    Pro*Ada 1.8.3.0.0
    Pro*COBOL 1.8.3.0.0
    Pro*Pascal 1.6.27.0.0
    Pro*FORTRAN 1.8.3.0.0
    PRO*CORE 1.8.3.0.0
    Sqllib 1.8.3.0.0
    Codegen 7.3.3.0.0
    Oracle CORE 2.3.7.2.0
    SQL*Module Ada 1.1.5.0.0
    SQL*Module C 1.1.5.0.0
    Oracle CORE 3.5.3.0.0
    NLSRTL 2.3.6.1.0
    Oracle Server Manager 2.3.3.0.0
    Oracle Toolkit II(Dependencies of svrmgr) DRUID 1.1.7.0.0
    Multi-Media APIs(MM) 2.0.5.4.0
    OACORE 2.1.3.0.0
    Oracle*Help 2.1.1.0.0
    Oracle 7 Enterprise Backup Utility 2.1.0.0.2
    NLSRTL 3.2.3.0.0
    SQL*Plus 3.3.3.0.0
    Oracle Trace Daemon 7.3.3.0.0
    Oracle MultiProtocol Interchange 2.3.3.0.0
    Oracle DECnet Protocol Adapter 2.3.3.0.0
    Oracle LU6.2 Protocol Adapter 2.3.3.0.0
    Oracle Names 2.0.3.0.0
    Advanced Networking Option 2.3.3.0.0
    Oracle TCP/IP Protocol Adapter 2.3.3.0.0
    Oracle Remote Operations 1.3.3.0.0
    Oracle Named Pipes Protocol Adapter 2.3.3.0.0
    Oracle Intelligent Agent 7.3.3.0.0
    SQL*Net APPC 2.3.3.0.0
    SQL*Net/DCE 2.3.3.0.0
    Oracle OSI/TLI Protocol Adapter 2.3.3.0.0
    Oracle SPX/IPX Protocol Adapter 2.3.3.0.0
    NIS Naming Adapter 2.3.3.0.0
    NDS Naming Adapter 2.3.3.0.0
    Oracle Installer 4.0.1

    P.S. I have checked the CD rom itself by doing the installation in our classroom on a Windows XP Pro machine and it loaded like a charm. I have been emailing and calling Compaq customer support on this issue, and I've done everything they've suggested, including a Quick Format of the hard drive. I am still getting the same results. I have been able to load a small program (Palm Desktop) on the Compaq without a problem, so I don't think it's the CD drive that's the problem, either. Thanks for any help you can give me!!! Deborah

  • A potential bug on the new feature (12c) of Identity Column?

    Hi,
    I am testing a newly introduced feature of Identity Column in Oracle 12c. I used EclipseLink (JPA) to access the database.
    I may have found a potential bug with this feature. I am getting "ORA-30667: cannot drop NOT NULL constraint on a DEFAULT ON NULL column" when I try to insert a row. My code doesn't explicitly drop "NOT NULL" constraint.
    When I delete all the tables under the user and re-define the user and the tables, the error disappear.
    Here are the details:
    Error:
    DatabaseException Internal Exception: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-30667: cannot drop NOT NULL constraint on a DEFAULT ON NULL column Error Code: 604 Call: INSERT INTO MyTable (ID, SOMEID, SOMEDATE) VALUES (?, ?, ?) bind => [null, 100100147, 2013-11-29 Query: InsertObjectQuery(cus.entity.MyTable@1a9ea5b)
    Table definition:
    CREATE TABLE MyTable (id NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY PRIMARY KEY,
          someId INT NOT NULL,
          someDate DATE NOT NULL,
          PARTITION BY range(someDate)
          interval(numtodsinterval(1,'year'))
          SUBPARTITION BY HASH ( someId)
          SUBPARTITIONS 20
           PARTITION p0 VALUES LESS THAN (TO_DATE('01-12-2013', 'DD-MM-YYYY'))
    Could anyone tell me if there might be a bug associated with the new feature or if there was something wrong with my code?
    I would be appreciated if anyone can help.

    "here is a reproducible test case in the SCOTT schema - if it reproduces for you open an SR with Oracle"
    Yes. I have just followed the instruction you posted and managed to re-produce the same error I reported earlier. Here are the details of the script output following your posted instruction:
    table MYTABLE dropped.
    purge recyclebin
    table MYTABLE created.
    1 rows inserted.
    table MYTABLE dropped.
    OBJECT_NAME                                                                                                                      ORIGINAL_NAME                                                                                                                    OPERATION TYPE                      TS_NAME                        CREATETIME          DROPTIME               DROPSCN PARTITION_NAME                                                                                                                   CAN_UNDROP CAN_PURGE    RELATED BASE_OBJECT PURGE_OBJECT      SPACE
    BIN$6NCDTxmXTb2QBpUWF0kGqw==$0                                                                                                   SYS_C0010655                                                                                                                     DROP      INDEX                     USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030808                                                                                                                                  NO         YES            98789       98789        98812          8
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:30:56 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98790       98789        98789          0
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98833       98789        98789       1024
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98833       98789        98789       1024
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98833       98789        98789       1024
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98833       98789        98789       1024
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98833       98789        98789       1024
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98833       98789        98789       1024
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98833       98789        98789       1024
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98833       98789        98789       1024
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                                  NO         NO             98833       98789        98789       1024
    BIN$Ka0sgN7XRBeCsjyXTQ76cA==$0                                                                                                   MYTABLE                                                                                                                          DROP      Table Composite Partition USERS                          2013-12-01:10:31:37 2013-12-01:10:32:17    4030812                                                                                                                          &

  • 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.

  • INVOKER'S RIGHT ( ORACLE 8I NEW FEATURE )

    제품 : PL/SQL
    작성날짜 : 2000-05-31
    INVOKER'S RIGHT ( ORACLE 8I NEW FEATURE )
    ==============================================
         AUTHID와 SQL_NAME_RESOLVE에 대해 CURRENT_USER, DEFINER를 지정
         8.1 현재 버젼에서는 AUTHID = CURRENT_USER 일때는 SQL_NAME_RESOLVE =
    CURRENT_USER, AUTHID = DEFINERE 일때는 SQL_NAME_RESOLVE = DEFINER만
    가능
         - AUTHID , SQL_NAME_RESOLVE = DEFINER
              scott 이라는 user에 다음과 같은 stored procedure를 정의했을때
              foo 라는 user에서는 scott.emp 나 scott.empcount 에 대한
              select priviledge, insert priveledge가 없어도 name_count에
              대한 execute priveledge를 가지고 있으면 실행 가능하다.
              그 이유는 name_count를 invoke 시킨 user가 foo라고 할 지라도
              내부적으로는 scott의 priveledge를 가지고 name_count라는
              procedure가 실행 되기 때문이다.
              create or replace procedure name_count
              authid definer as
              n number;
              begin
              select count(*) into n from scott.emp;
              insert into empcount values(n);
              end;
         - AUTHID , SQL_NAME_RESOLVE = CURRENT_USER     
              scott이라는 user에서 다음과 같은 stored procedure를 정의했을
    때 foo 라는 user에서 name_count에 대한 execute priveledge를
              가지고 있다고 할 지라도 scott.emp 에 대한 select priveledge를
              가지고 있지 못하면 name_count를 실행 할 수 없다. 또한
              empcount table은 scott.empcount가 아니라, foo.empcount 테이블
    을 뜻하는데, 그 이유는 authid 와 sql_name_resolve가
    current_user로 지정이 되어 있기 때문이다.
              foo 라는 user에 scott.emp 테이블에 대한 select priviledge를
              grant 해 주고, empcount 테이블을 만든후 실행 시키면
              scott.emp의 row 갯수를 foo.empcount 테이블에 insert 시키게
              된다.
              create or replace procedure name_count
              authid current_user as
              n number;
              begin
              select count(*) into n from scott.emp;
              insert into empcount values(n);
              end;

    Seems that you are right ... iSQLPlus is not referenced in the Oracle8i documentation and was probably not available until Oracle9i
    However, it is certainly possible to install only the iSQLPlus capability of 9i (and probably10g) and configure the tnsnames.ora for the iSQLPlus installation to communicate with an 8i database.
    This is partially discussed here http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch3.htm#1005835
    Works ... as long as the use is willing to accept the lesser capability of Oracle8i ...

  • FUNCTION-BASED INDEX ( ORACLE 8I NEW FEATURE )

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-16
    FUNCTION-BASED INDEX ( ORACLE 8I NEW FEATURE )
    ==============================================
    SCOPE
    10g Standard Edition(10.1.0) 이상 부터 Function-based Index 기능이 지원된다.
    Explanation
    1. 개요
         Function-based index는, 함수(function)이나 수식(expression)으로 계산
    된 결과에 대해 인덱스를 생성하여 사용할 수 있는 기능을 제공한다.
         질의 수행 시 해당 함수나     수식을 처리하여     결과를 가져 오는 것이 아니라,
         인덱스 형태로 존재하는 미리 계산되어 있는 결과를 가지고 처리하므로
         성능 향상을 기할 수 있다.
    2. 제약사항
    1) aggregate function 에 대한 function-based index 생성 불가.
    (예 : sum(...) )
    2) LOB, REF, nested table 컬럼에 대한 function-based index 생성 불가.
    3. 주요 특징
         1) cost-based optimizer에 의해 사용됨.
         2) B*Tree / bitmap index로 생성 가능.
         3) 산술식 (arithmetic expression), PLSQL function, SQL built-in
    function 등에 적용 가능.
         4) 함수나 수식으로 처리된 결과에 대한 range scan 가능
         5) NLS SORT 지원
         6) SELECT/DELETE를 할 때마다 함수나 수식의 결과를 계산하는 것이 아니라
         INSERT/UPDATE 시 계산된 값을 인덱스에 저장.
         7) 질의 속도 향상
         8) object column이나 REF column에 대해서는 해당 object에 정의된
         method에 대해 function-based index 생성 가능.
    4. 생성 방법
         CREATE [UNIQUE | BITMAP ] INDEX <index_name>
         ON <tablename> (<index-expression-list>)
         <index-expression-list> -> { <column_name> | <column_expression> }
         예) CREATE INDEX EMP_NAME_INDEX ON EMP (UPPER(ENAME));
         CREATE INDEX EMP_SAL_INDEX ON EMP( SAL + COMM, empno);
         * Function-based index를 생성하기 위해서는 QUERY REWRITE 권한이
         부여 되어 있어야만 한다.
         예) GRANT QUERY REWRITE TO SCOTT;
    5. Function-Based Index 사용을 위한 사전 작업
         1) Function-based index는 cost based optimizer에서만 사용 가능하므로,
         테이블에 대해 미리 analyze 해 주는 것이 바람직하다.
         그리고 init 파일에서 OPTIMIZER_MODE 를 FIRST_ROWS 나 ALL_ROWS 등으
    로 지정하거나 HINT 등을 사용하여 cost based optimizer가 사용되도록
    한다.
         2) init 파일에서 COMPATIBLE 파라미터 값을 8.1 이상으로 설정되어 있어야
    한다.
         ( 예 : COMPATIBLE = 8.1.6 )
         3) session/instance level 에서 QUERY_REWRITE_ENABLED 값이 TRUE 지정
    되어 있어야 한다.
         ( 예 : ALTER SESSION SET QUERY_REWRITE_ENABLED = TRUE; )
    6. 예제
         1) init 파라미터에서 다음과 같이 지정
         compatible = 8.1.6 (반드시 8.1이상이어야 한다)
         query_rewrite_enabled = true
         query_rewrite_integrity = trusted
         2) SCOTT 유저에서 function_based_index 생성
         create index idx_emp_lower_ename
         on emp
         ( lower(ename) ) ;
         3) EMP table analyze
         analyze table emp compute statistics ;
         4) PLAN_TABLE 생성
         @ ?/rdbms/admin/utlxplan.sql
         5) Cost based optimizer 선택
         alter session set optimizer_mode = FIRST_ROWS ;
         6) Query 실행
         explain plan set statement_id='qry1' FOR
         select empno, ename
         from emp
         where lower(ename) = 'ford' ;
         7) PLAN 분석
         SELECT LPAD(' ',2*level-2)||operation||' '||options||' '||object_name query_plan
         FROM plan_table
         WHERE statement_id='qry1'
         CONNECT BY prior id = parent_id
         START WITH id = 0 order by id ;
         -> 결과
         QUERY_PLAN
         SELECT STATEMENT
         TABLE ACCESS BY INDEX ROWID EMP
         INDEX RANGE SCAN IDX_EMP_LOWER_ENAME
    7. 결론
    Function-based index는 적절하게 사용될 경우 성능상의 많은 이점을 가져
    온다. Oracle8i Designing and Tuning for Performance에서도 가능한 한
    Function-based index를 사용하는 것을 권장하고 있으며, LOWER(), UPPER()
    등의 함수를 사용하여 불가피하게 FULL TABLE SCAN을 하는 경우에 대해서도
    효과적으로 처리해 줄 수 있는 방안이라 할 수 있다.
    Reference Documents
    -------------------

    Partha:
    From the Oracle8i Administrators Guide:
    "Table owners should have EXECUTE privileges on the functions used in function-based indexes.
    For the creation of a function-based index in your own schema, you must be
    granted the CREATE INDEX and QUERY REWRITE system privileges. To create
    the index in another schema or on another schemas tables, you must have the
    CREATE ANY INDEX and GLOBAL QUERY REWRITE privileges."
    Hope this helps.
    Peter

  • (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

  • 10G NEW FEATURE-HOW TO FLUSH THE BUFFER CACHE

    제품 : ORACLE SERVER
    작성날짜 : 2004-05-25
    10G NEW FEATURE-HOW TO FLUSH THE BUFFER CACHE
    ===============================================
    PURPOSE
    이 자료는 Oracle 10g new feature 로 manual 하게
    buffer cache 를 flush 할 수 있는 기능에 대하여 알아보도록 한다.
    Explanation
    Oracle 10g 에서 new feature 로 소개된 내용으로 SGA 내 buffer cache 의
    모든 data 를 command 수행으로 clear 할 수 있다.
    이 작업을 위해서는 "alter system" privileges 가 있어야 한다.
    Buffer cache flush 를 위한 command 는 다음과 같다.
    주의) 이 작업은 database performance 에 영향을 줄 수 있으므로 주의하여 사용하여야 한다.
    SQL > alter system flush buffer_cache;
    Example
    x$bh 를 query 하여 buffer cache 내 존재하는 정보를 확인한다.
    x$bh view 는 buffer cache headers 정보를 확인할 수 있는 view 이다.
    우선 test 로 table 을 생성하고 insert 를 수행하고
    x$bh 에서 barfil column(Relative file number of block) 과 file# 를 조회한다.
    1) Test table 생성
    SQL> Create table Test_buffer (a number)
    2 tablespace USERS;
    Table created.
    2) Test table 에 insert
    SQL> begin
    2 for i in 1..1000
    3 loop
    4 insert into test_buffer values (i);
    5 end loop;
    6 commit;
    7 end;
    8 /
    PL/SQL procedure successfully completed.
    3) Object_id 확인
    SQL> select OBJECT_id from dba_objects
    2 where object_name='TEST_BUFFER';
    OBJECT_ID
    42817
    4) x$bh 에서 buffer cache 내에 올라와 있는 DBARFIL(file number of block) 를 조회한다.
    SQL> select ts#,file#,dbarfil,dbablk,class,state,mode_held,obj
    2 from x$bh where obj= 42817;
    TS# FILE# DBARFIL DBABLK CLASS STATE MODE_HELD J
    9 23 23 1297 8 1 0 7
    9 23 23 1298 9 1 0 7
    9 23 23 1299 4 1 0 7
    9 23 23 1300 1 1 0 7
    9 23 23 1301 1 1 0 7
    9 23 23 1302 1 1 0 7
    9 23 23 1303 1 1 0 7
    9 23 23 1304 1 1 0 7
    8 rows selected.
    5) 다음과 같이 buffer cache 를 flush 하고 위 query 를 재수행한다.
    SQL > alter system flush buffer_cache ;
    SQL> select ts#,file#,dbarfil,dbablk,class,state,mode_held,obj
    2 from x$bh where obj= 42817;
    6) x$bh 에서 state column 이 0 인지 확인한다.
    0 은 free buffer 를 의미한다. flush 이후에 state 가 0 인지 확인함으로써
    flushing 이 command 를 통해 manual 하게 수행되었음을 확인할 수 있다.
    Reference Documents
    <NOTE. 251326.1>

    I am also having the same issue. Can this be addressed or does BEA provide 'almost'
    working code for the bargin price of $80k/cpu?
    "Prashanth " <[email protected]> wrote:
    >
    Hi ALL,
    I am using wl:cache tag for caching purpose. My reqmnt is such that I
    have to
    flush the cache based on user activity.
    I have tried all the combinations, but could not achieve the desired
    result.
    Can somebody guide me on how can we flush the cache??
    TIA, Prashanth Bhat.

  • NEW FEATURE:AUTOTRACE IN SQL*PLUS 3.3(EXECUTION PLAN)

    제품 : SQL*PLUS
    작성날짜 : 2003-10-07
    NEW FEATURE:AUTOTRACE IN SQL*PLUS 3.3
    ======================================
    Autotrace는 SQL*Plus 3.3부터 지원하는 New feature로서 기존에는 init.ora에
    SQL_TRACE=TRUE를 setting 후 얻어진 trace file을 TKPROF란 utility를
    이용하여 SQL 문의 수행 경로, 각종 통계 정보를 얻었다.
    그러나, SQL*Plus 3.3부터는 이것을 간단히 처리할 수 있는 방법을 제공한다.
    1. SQL*Plus를 실행하여 scott user로 접속한 후, plan table을 생성한다.
    #sqlplus scott/tiger
    SQL>@$ORACLE_HOME/rdbms/admin/utlxplan
    2. 다음에 sys user에서 PLUSTRACE란 ROLE을 만든다.
    SVRMGR>connect internal;
    SVRMGR>create role plustrace;
    SVRMGR>grant select on v_$sesstat to plustrace;
    SVRMGR>grant select on v_$statname to plustrace;
    SVRMGR>grant select on v_$session to plustrace;
    SVRMGR>grant plustrace to dba with admin option;
    SVRMGR>grant plustrace to scott;
    비고) 위의 grant 문은 client에 SQL*Plus 3.3이 install되어 있는 경우
    C:ORAWIN95\PLUS33\PLUSTRCE.SQL이라는 script에 기록되어 있다.
    다음과 같이 실행해 주면 된다.
    1> connect sys/manager
    2> @$ORACLE_HOME/sqlplus/admin/plustrce.sql
    3> grant plustrace to scott;
    3. 다음에는 scott user로 connect하여 작업한다.
    #sqlplus scott/tiger
    SQL>set autotrace on
    SQL>select * from emp;
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE
    1 0 TABLE ACCESS (FULL) OF 'EMP'
    Statistics
    389 recursive calls
    5 db block gets
    53 consistent gets
    12 physical reads
    0 redo size
    1049 bytes sent via SQL*Net to client
    239 bytes received via SQL*Net from client
    4 SQL*Net round-trips to/from client
    0 sorts (memory)
    0 sorts (disk)
    13 rows processed
    4. 참고로 set autotrace에는 여러가지 option을 부여해 작업할 수도 있다.
    예)set autotrace on => Explain plan and statistics.
    set autotrace on explain => Explain plan only.
    set autotrace traceonly => select된 결과는 빼고 trace만 display
    시킴.
    set autotrace on statistics=> sql statement execution statistics.
    5. 서버 버젼과 상관없다.
    Server가 7.2 version 이하일지라도 clinet에 SQL*Plus 3.3이 install되어
    있으면 client에서 sqlplus 3.3을 구동시켜 server에 접속하여 위와 같이
    작업하면 무리없이 작업이 가능하다.
    Reference Documents
    <Note:43214.1>

    Hi Roman,
    I don't have an Oracle 9.2 database readily available, but it works fine on 10g XE. Please note 3.1 is not certified with 9i:
    http://www.oracle.com/technetwork/developer-tools/sql-developer/certification-096745.html
    Regards,
    Gary
    SQL Developer Team

  • AUTONOMOUS TRANSACTION(8I NEW FEATURE)에 대한 소개

    제품 : ORACLE SERVER
    작성날짜 : 2003-10-14
    AUTONOMOUS TRANSACTION(8I NEW FEATURE)에 대한 소개
    ==================================================
    autonomous transaction은 child transaction이라고도 불리우며 Oracle
    8i부터 제공되는 새로운 기능이며 현재까지는 pl/sql을 통해서만 구현이
    가능하지만 앞으로는 OCI까지 확장될 예정이다.
    pl/sql routine의 declare section 중 어떠한 곳에서라도 아래의 progma
    (compiler directive)를 지시함으로써 autonomous로 구분이 가능하다.
    pragma AUTONOMOUS_TRANSACTION;
    'pragma'는
    1) top-level anonymous blocks
    2) local, standalone or packaged functions and procedures
    3) methods of object types
    4) database triggers의 declare section 어디에서나 나타낼 수 있슴.
    아래의 경우에는 사용이 불가능.
    1) outside of a declase section
    2) nested block의 declare section
    3) package specification
    4) package body 중 procedure나 function definition 외부
    5) type body중 method definition의 외부
    autonomous transaction(tx) 내에서 명시적으로 rollback이나 commit을
    하여야 한다. 만일 이를 위반하였을 경우 main transcation 및 child
    transaction 모두 error 발생과 함께 rollback이 되게 된다.
    main transaction이 수행 중이고 child transaction이 아래의 상태의 경우 :
    1) autonomous transcation으로 선언된 code unit의 declare section에서
    기술된 statement가 수행 중인 동안 parent tx는 active로 남아있게 된다.
    2) "begin" 이후의 첫 executable step을 만나게 되면 parent transaction은
    유보되고 새로운 tx(child tx)가 시작된다.
    3) 이 code unit은 normal하게 수행이 되나 tx context는 새로운 transaction로
    설정된다.
    4) autonomous code unit에서 commit 이나 rollback 이 수행되면 이
    autonomous tx은 종료된다. 이 때까지 parent(main) tx는 계속 유보상태로
    남아 있으며 autonomous unit에서 계속되는 operation이 있다면 새로운 tx이
    시작된다.
    5) autonomous code unit에서 exit를 하게 되면 transaction context는
    parent로 전환이 된다.
    transaction context의 변경은 session parameter에 영향을 주지 않는다.
    따라서 parent transaction 에서 적용된 session parameter는 그대로 child
    tx에서도 영향을 미치게 된다.
    parent tx와 child tx는 서로 독립적이므로 lock 역시 공유하지 못한다.
    만일 parent tx에서 점유된 lock을 child에서 소유하고자 한다면 dead lock
    현상이 발생할 것이다. 이런 경우 ORA-60 이 발생되고 child tx는 자동적으로
    rollback 된다.
    <주의>
    ORACLE 8.1.6 README에서는 분산 transaction에서 autonomous tx 사용 시
    dead lock 발생 시 distributed lock timeout을 정상적으로 하지 못한다는
    주의사항이 소개되고 있슴.
    [예제]
    create table test_lobs (c1 number,c2 clob);
    create table msg (msg varchar2(120));
    create or replace function getlen (p1 in clob,
    p2 in number) return number as
    pragma AUTONOMOUS_TRANSACTION;
    len number;
    buf varchar2(120);
    tlen number;
    begin
    len := dbms_lob.getlength(p1);
    if len != 0 then
    dbms_lob.read(p1,len,1,buf);
    dbms_output.put_line('Value: '||buf);
    insert into msg values (buf);
    commit;
    end if;
    select dbms_lob.getlength(c2) into tlen
    from test_lobs where c1=p2;
    dbms_output.put_line('Length selected from table is '||tlen);
    return len;
    end;
    insert into test_lobs values (1,'Hello');
    insert into test_lobs values (2,'The quick brown fox');
    commit;
    declare
    cl1 clob;
    cl2 clob;
    ret number;
    begin
    select c2 into cl1 from test_lobs where c1 = 1 for update;
    select c2 into cl2 from test_lobs where c1 = 2;
    ret := getlen(cl1,1);
    dbms_output.put_line('Length of first row is '||ret);
    ret := getlen(cl2,2);
    dbms_output.put_line('Length of second row is '||ret);
    dbms_lob.writeappend(cl1,6,' there');
    ret := getlen(cl1,1);
    dbms_output.put_line('Length of first row is now '||ret);
    end;
    gives:
    Value: Hello
    Length selected from table is 5
    Length of first row is 5
    Value: The quick brown fox
    Length selected from table is 19
    Length of second row is 19
    Value: Hello there
    Length selected from table is 5
    Length of first row is now 11
    Selecting from the msg table gives 3 rows as follows:
    Hello
    The quick brown fox
    Hello there

  • Suggest a new feature. ^-^

    Hi all:
    I hope ORACLE has such a new feature, to reduce the client codes. We usually do that: Inserting a record to a table, if some columns have existed, then update it, else insert this new record. I assume this statement is:
    INSERT INTO MYTABLE (A,B,C) VALUES (1, 2, 3) UPDATE EXISTS (A, B)
    It's mean that if A and B is duplicated (exists a row that A=1 and B=2), then UPDATE column C value of these rows to 3 implicitly.
    let me know your ideas about it. thanks!!!
    Bob.yang

    Maybe on missed on this ...
    Use this forum for feedback about OTN programs, Web site content, and systems -product-related questions cannot be answered here.
    and another one gone
    Adith

Maybe you are looking for

  • Safari 6 on Mac Osx 10.7.4

    Hi I have update Safari version and now I have Safari 6 on Mac OsX 10.7.4. I am facing few issues. Please help me resolve these. 1) I cannot see google sitemaps on this. When I open Sitemaps in web master tools, page header and menu loads, but not th

  • No Internet Access on Private Network

    Hi, I have an and ESXi Host with few VM's and i require Internet Access on these servers. This is Mini lab i have created at home. I have My Home Broadband Router (192.168.0.1) acting as a DHCP server handing out DHCP addresses as usual. A Cisco 3750

  • Xi payload as attachments in http adapter

    hi, we have the requirement to send comma separated text file as attachemnt over http. is it possible to send and receive payload as attachments in http/s adapter in XI? if yes, how? regards, Rashmi

  • Mac Mini vs Sony KDL46W3000

    Similar issue to what I've seen with some other users with an interesting twist - TV has HDMI input so I've got a DVI to HDMI cable. Hook up the TV to the Mini and no picture. If I hook up a monitor open up displays and set the mouse on 'detect displ

  • Best practices in structuring a large Flash project?

    I'm building an educational site in Flash. A student works through a series of activities, either watching an animated video or answering a question. You can get a good idea of the basic functionality with this mockup: http://imgur.com/Mi4JyHN. After