oracle10.0.1.0导入数据时发生这样的错误:
REM Maxinst started Tue Jul 15 01:03:09 GMT 2008 for schema MAXIMO
REM Maxinst connected to database jdbc:oracle:thin:@localhost:1521:maxdemo
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24-MI.SS'
;
call ctx_ddl.drop_preference('global_lexer')
;
call ctx_ddl.drop_preference('default_lexer')
;
call ctx_ddl.drop_preference('english_lexer')
;
call ctx_ddl.drop_preference('chinese_lexer')
;
call ctx_ddl.drop_preference('japanese_lexer')
;
call ctx_ddl.drop_preference('korean_lexer')
;
call ctx_ddl.drop_preference('german_lexer')
;
call ctx_ddl.drop_preference('dutch_lexer')
;
call ctx_ddl.drop_preference('swedish_lexer')
;
call ctx_ddl.drop_preference('french_lexer')
;
call ctx_ddl.drop_preference('italian_lexer')
;
call ctx_ddl.drop_preference('spanish_lexer')
;
call ctx_ddl.drop_preference('portu_lexer')
;
call ctx_ddl.create_preference('default_lexer','basic_lexer')
;
call ctx_ddl.create_preference('english_lexer','basic_lexer')
;
call ctx_ddl.create_preference('chinese_lexer','chinese_lexer')
;
call ctx_ddl.create_preference('japanese_lexer','japanese_lexer')
;
call ctx_ddl.create_preference('korean_lexer','korean_lexer')
;
REM ORA-20000: Oracle Text 错误:
DRG-10703: 无效的框架对象korean_lexer
ORA-06512: 在 "CTXSYS.DRUE", line 160
ORA-06512: 在 "CTXSYS.CTX_DDL", line 26REM Maxinst completed with errors Tue Jul 15 01:03:09 GMT 2008请各位高手看看是何原因

解决方案 »

  1.   

    不是,是装maximo时,需要导入数据库初始化文件
      

  2.   

    DRG-10703: invalid framework object string 
    Cause: you specified an invalid object type
    Action: use a valid framework objectmetalink的解释是:10gR2把KOREAN_LEXER 给废弃了。估计oracle的人抵制高丽棒子。呵呵
    所以,你引用它时报错。你在oracle 10.1.xxx版本应该不会出错。
      

  3.   

    官方解决办法:
    For 10.2.0.1 and 10.2.0.2 version there is a script to assist with migration from korean_lexer to korean_morph_lexer. Download the patch for Bug 5005469 to get the script.
    10.2.0.3 patchset and higher versions supplies ctx/sample/script/drkorean.sql script for this purpose. (Script is not installed when the Companion CD was not installed prior applying 10.2.0.3 or 10.2.0.4 patchset). To migrate all KOREAN_LEXER preferences to KOREAN_MORPH_LEXER preferences, including those sub lexers, use SQL*Plus to connect to the database as SYSDBA, and run drkorean.sql using the following command: $ sqlplus "/ as sysdba" @$ORACLE_HOME/ctx/sample/script/drkorean.sql 
      

  4.   

    请问这个5005469的补丁去哪里找,还有,$ORACLE_HOME/ctx/sample/script/drkorean.sql,这个文件找不到呀, ctxg下面没有sample这个上目录,请指教.
      

  5.   

    你是10.2.0.3的补丁盘吗?如果不是就没有sample了。上面说的很清楚啊。仔细看上面的回复。各种版本的方法都有。 
      

  6.   

    set serveroutput on size 20000
    set linesize 120
    set feedback off;alter session set current_schema = ctxsys;declare   type idx_rec is record(
        idx_owner        varchar2(30),
        idx_name         varchar2(30),
        idx_id           number(38),
        idx_option       varchar2(40));  type idx_rec_sub is record(
        idx_owner        varchar2(30),
        idx_name         varchar2(30),
        idx_id           number(38),
        idx_table_owner  varchar2(30),
        idx_table        varchar2(30),
        idx_lang_col     varchar2(256),
        idx_text_name    varchar2(256),
        idx_option       varchar2(40));  type ixv_rec is record(
        abb2  varchar2(4),
        lang  varchar2(30),
        lalt  varchar2(30));
     
      type idx_tab is table of idx_rec index by binary_integer;
      type idx_tab_sub is table of idx_rec_sub index by binary_integer;
      type ixv_tab is table of ixv_rec index by binary_integer;  cursor get_idx is
       select u.name idx_owner, idx_name, idx_id, idx_option, idx_type
          from dr$index_object, dr$index, sys.user$ u
         where idx_owner# = u.user#  and
               idx_id = ixo_idx_id and
               ixo_cla_id = 6 and ixo_obj_id = 3
          order by idx_owner, idx_name;  cursor get_ipart(idxid binary_integer) is
        select ixp_name from dr$index_partition
          where ixp_idx_id =idxid;  cursor get_idx_sub is
       select unique u1.name idx_owner, idx_name, idx_id, 
                     u2.name idx_table_owner, o.name idx_table,
                     idx_language_column, idx_text_name, idx_option 
          from dr$index, sys.user$ u1, dr$index_value, sys.user$ u2,sys.obj$ o
         where u1.user# = idx_owner# and
               idx_id = ixv_idx_id and
               u2.user# = idx_table_owner# and
               o.obj# = idx_table# and
                substr(substr(ixv_value,instr(ixv_value,':')+1,
                         instr(ixv_value, ':', -1) - instr(ixv_value,':') - 1),
                  1,30) = 'KOREAN_LEXER' and
                ixv_oat_id = 60601
          order by idx_owner, idx_name;   cursor get_ixv(idxid binary_integer) is
        select ixv_value from dr$index_value 
          where ixv_idx_id = idxid and
                ixv_oat_id = 60601;  ia       sys.ODCIIndexInfo;
      cnt      binary_integer := 0;
      cnt_sub  binary_integer := 0;
      itab     idx_tab;
      itab_sub idx_tab_sub;
      k_val    ixv_tab;
      o_val    ixv_tab;
      stm      varchar2(32000);
      colpos1 number;
      colpos2 number;
      labbr   varchar2(4);
      abb2    varchar2(4);
      lang    varchar2(30);
      slobj   varchar2(30);
      lalt    varchar2(30);
      k_cnt   binary_integer := 0;
      o_cnt   binary_integer := 0;
      k_df    boolean := FALSE;
      stm_alter varchar2(32000);begin  -- get all the indexes that has KOREAN_Lexer
      dbms_output.put_line(
          'List of indexes that use KOREAN_LEXER as top level lexer:'); 
      
      for irec in get_idx loop
        dbms_output.put_line(dbms_assert.enquote_name(irec.idx_owner)||'.'||
                             dbms_assert.enquote_name(irec.idx_name));
        if (irec.idx_type = 2) then 
          dbms_output.put(dbms_assert.enquote_name(irec.idx_owner)||'.'||
                          dbms_assert.enquote_name(irec.idx_name));
          dbms_output.put_line(
              ' is CTXRULE index, it cannot be migrated properly.');
        else
          cnt := cnt+1;
          itab(cnt).idx_owner := irec.idx_owner;
          itab(cnt).idx_name  := irec.idx_name;
          itab(cnt).idx_id    := irec.idx_id;
          itab(cnt).idx_option := irec.idx_option;
        end if;
      end loop;  -- get all the indexes that has korean_lexer as sub_lexer
      dbms_output.put_line(
           'List of indexes that use KOREAN_LEXER as a sub lexer:'); 
      for irec_sub in get_idx_sub loop
        cnt_sub := cnt_sub +1;
        itab_sub(cnt_sub).idx_owner := irec_sub.idx_owner;
        itab_sub(cnt_sub).idx_name  := irec_sub.idx_name;
        itab_sub(cnt_sub).idx_id    := irec_sub.idx_id;
        itab_sub(cnt_sub).idx_table_owner := irec_sub.idx_table_owner;
        itab_sub(cnt_sub).idx_table       := irec_sub.idx_table;
        itab_sub(cnt_sub).idx_lang_col    := irec_sub.idx_language_column;
        itab_sub(cnt_sub).idx_text_name   := irec_sub.idx_text_name;
        itab_sub(cnt_sub).idx_option      := irec_sub.idx_option;
        dbms_output.put_line(dbms_assert.enquote_name(itab_sub(cnt_sub).idx_owner)
                             ||'.'||
                             dbms_assert.enquote_name(itab_sub(cnt_sub).idx_name));
      end loop;
      

  7.   


    --接上面的sql  -- update all KOREAN_LEXER to KOREAN_MORPH_LEXER  dbms_output.put_line('Migrate KOREAN_LEXER to KOREAN_MORPH_LEXER');
      DELETE FROM dr$preference_value
        WHERE prv_pre_id IN
          (SELECT pre_id
             FROM dr$preference
             WHERE pre_cla_id = 6
               AND pre_obj_id = 3);  UPDATE dr$preference
        SET pre_obj_id = 7
        WHERE pre_cla_id = 6
          AND pre_obj_id = 3;  UPDATE dr$index_object
        SET ixo_acnt = 0, ixo_obj_id = 7
        WHERE ixo_cla_id = 6
          AND ixo_obj_id = 3;  DELETE FROM dr$index_value
        WHERE EXISTS
         (SELECT oat_id FROM dr$object_attribute
          WHERE oat_id = ixv_oat_id AND oat_cla_id = 6
                and oat_obj_id =3);  DELETE FROM dr$index_value
        WHERE ixv_oat_id = 60602 and EXISTS
         (SELECT oat_id FROM dr$object_attribute
          WHERE oat_id = ixv_sub_oat_id AND oat_cla_id = 6
                AND oat_obj_id =3);  UPDATE dr$index_value 
        SET ixv_value = replace(ixv_value,'KOREAN_LEXER','KOREAN_MORPH_LEXER')
        WHERE ixv_oat_id = 60601;  UPDATE dr$index_object
        SET ixo_acnt = (select count(*) from
                        dr$index_value where
                       ixv_oat_id in (60601, 60602) and 
                       ixv_idx_id = ixo_idx_id)
        WHERE ixo_cla_id = 6
          AND ixo_obj_id = 6;  commit;  -- purge because we change the preferences
      for i in 1..cnt loop
        ia := sys.ODCIIndexInfo(itab(i).idx_owner, itab(i).idx_name,
                                null,null,null, null);
        -- this is dummy, just to start a transaction
        update dr$index  set idx_id = idx_id where idx_id = itab(i).idx_id;
        drixmd.PurgeKGL(itab(i).idx_id, ia);
        -- commit to release the kgl lock and pin
        commit;
      end loop;  -- rebuild all indexes that use korean_lexer
      dbms_output.put_line
         ('Rebuild all indexes that use korean lexer as top level lexer:'); 
      for i in 1..cnt loop
        
        dbms_output.put('rebuilding : ');
        dbms_output.put(dbms_assert.enquote_name(itab(i).idx_owner)||'.'||
                        dbms_assert.enquote_name(itab(i).idx_name));    if (itab(i).idx_option like '%P%') then
          -- local partitioned index
          for prec in get_ipart(itab(i).idx_id) loop
            stm_alter :=
              'alter index '||dbms_assert.enquote_name(itab(i).idx_owner)||'.'||
                              dbms_assert.enquote_name(itab(i).idx_name)||
              ' rebuild partition '||dbms_assert.enquote_name(prec.ixp_name); -- CUSTOMIZATION:  You can edit the memory size and parallel degree
    -- in the following two lines, then uncomment them.
    --   stm_alter := stm_alter||
    --      'parameters(''replace memory 50m'') parallel 2';        execute immediate stm_alter;
          end loop;
        -- non-partitioned index
        else 
          stm_alter :=
            'alter index '||dbms_assert.enquote_name(itab(i).idx_owner)||'.'||
                            dbms_assert.enquote_name(itab(i).idx_name)||
            ' rebuild';-- CUSTOMIZATION:  You can edit the memory size and parallel degree
    -- in the following two lines, then uncomment them.
    --   stm_alter := stm_alter||
    --      'parameters(''replace memory 50m'') parallel 2';      execute immediate stm_alter;
        end if;
        dbms_output.put_line(' finished.');
      end loop;  -- purge because we change the preferences
      for i in 1..cnt_sub loop
        -- this is dummy, just to start a transaction
        update dr$index  set idx_id = idx_id where idx_id = itab_sub(i).idx_id;
        ia := sys.ODCIIndexInfo(itab_sub(i).idx_owner,
                                itab_sub(i).idx_name,
                                null,null,null, null);
        drixmd.PurgeKGL(itab_sub(i).idx_id, ia);
        -- commit to release the kgl lock and pin
        commit;
      end loop;  -- update korean documents for indexes using korean_lexer as
      -- sub_lexer and sync
      dbms_output.put_line
         ('Reindex all documents that use KOREAN_LEXER as sub lexer');
      for i in 1..cnt_sub loop
        dbms_output.put(' reindexing : ');
        dbms_output.put(
          dbms_assert.enquote_name(itab_sub(i).idx_table_owner)||'.'||
          dbms_assert.enquote_name(itab_sub(i).idx_table));    stm := 'update '||dbms_assert.enquote_name(itab_sub(i).idx_table_owner)
                   ||'.'||dbms_assert.enquote_name(itab_sub(i).idx_table)||
               ' set '||dbms_assert.enquote_name(itab_sub(i).idx_text_name)||
               ' = '||dbms_assert.enquote_name(itab_sub(i).idx_text_name)||
               ' where upper('
                    ||dbms_assert.enquote_name(itab_sub(i).idx_lang_col)||') ';
        
        k_df := FALSE;
        k_cnt := 0;
        o_cnt := 0;
        for ixvrec in get_ixv(itab_sub(i).idx_id) loop
          colpos1 := instr(ixvrec.ixv_value, ':');
          colpos2 := instr(ixvrec.ixv_value, ':', colpos1 + 1);
          labbr   := substr(ixvrec.ixv_value, 1, colpos1 - 1);
          slobj   := substr(ixvrec.ixv_value, colpos1 + 1, colpos2 - colpos1 - 1); 
          lalt    := substr(ixvrec.ixv_value, colpos2 + 1);
          if (driutl.check_language(labbr, lang, abb2, TRUE)) then
            null;
          end if;      if (slobj = 'KOREAN_MORPH_LEXER') then 
            k_cnt := k_cnt +1; 
            k_val(k_cnt).lang := lang;
            k_val(k_cnt).abb2 := abb2;
            k_val(k_cnt).lalt := lalt;  
            if (lang='DEFAULT') then
              k_df := TRUE;
            end if;
          else
            o_cnt := o_cnt +1;
            o_val(o_cnt).lang := lang;
            o_val(o_cnt).abb2 := abb2;
            o_val(o_cnt).lalt := lalt;  
          end if;     end loop;     if (k_df = TRUE) then 
          -- korean lexer is the default sub lexer 
          stm := stm||'not in (''';
          for j in 1..o_cnt loop 
            if (j>1) then
              stm := stm||',''';
            end if;        if (o_val(j).lalt is not null) then
              stm := stm||o_val(j).lang||''','''||o_val(j).abb2||''','''||
                     o_val(j).lalt||'''';
            else
              stm := stm||o_val(j).lang||''','''||o_val(j).abb2||'''';
            end if;
          end loop;
          stm := stm||') or '||
                 dbms_assert.enquote_name(itab_sub(i).idx_lang_col)||' is null'; 
        else  -- non default
          -- korean lexer may be on more than one languages (unlikely)
          stm := stm||' in (''';
          for j in 1..k_cnt loop
            if (j>1) then
              stm := stm||',''';
            end if;        if (k_val(j).lalt is not null) then       
              stm := stm||k_val(j).lang||''','''||k_val(j).abb2||''','''||
                          k_val(j).lalt||''''; 
            else
              stm := stm||k_val(j).lang||''','''||k_val(j).abb2||''''; 
            end if;
          end loop;      stm := stm||')';
        end if;
           
        execute immediate stm;
        commit;    if (itab_sub(i).idx_option like '%P%') then
          for prec in get_ipart(itab_sub(i).idx_id) loop
            ctx_ddl.sync_index(
              idx_name =>
                dbms_assert.enquote_name(itab_sub(i).idx_owner)||'.'||
                dbms_assert.enquote_name(itab_sub(i).idx_name),-- CUSTOMIZATION : you can change the memory here by editing the 
    -- following line.
              memory => null,          part_name => dbms_assert.enquote_name(prec.ixp_name),-- CUSTOMIZATION: you can change the degree of parallelism by
    -- editing the following line.
              parallel_degree => 1);      end loop;
        else
          ctx_ddl.sync_index(
              idx_name =>
                dbms_assert.enquote_name(itab_sub(i).idx_owner)||'.'||
                dbms_assert.enquote_name(itab_sub(i).idx_name),-- CUSTOMIZATION : you can change the memory here by editing the 
    -- following line.
              memory => null,-- CUSTOMIZATION: you can change the degree of parallelism by
    -- editing the following line.
              parallel_degree => 1);    end if;
        dbms_output.put_line(' finished.');
      end loop;end;
    /
      

  8.   

    我生重新装了个9i就没有这个问题了,但10g的这个问题迟早要解决,好我先记下,先把maximo软件装好再回过头来研究10g的这个问题,多谢oracledbalgtu,在9i上又碰到个问题,请您及各位高手帮忙,另外开帖.
      

  9.   

    REM Maxinst started Tue Mar 29 06:52:29 GMT 2011 for schema MAXIMO
    REM Maxinst connected to database jdbc:oracle:thin:@localhost:1521:max60
    ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24-MI.SS'
    ;
    call ctx_ddl.drop_preference('global_lexer')
    ;
    call ctx_ddl.drop_preference('default_lexer')
    ;
    call ctx_ddl.drop_preference('english_lexer')
    ;
    call ctx_ddl.drop_preference('chinese_lexer')
    ;
    call ctx_ddl.drop_preference('japanese_lexer')
    ;
    call ctx_ddl.drop_preference('korean_lexer')
    ;
    call ctx_ddl.drop_preference('german_lexer')
    ;
    call ctx_ddl.drop_preference('dutch_lexer')
    ;
    call ctx_ddl.drop_preference('swedish_lexer')
    ;
    call ctx_ddl.drop_preference('french_lexer')
    ;
    call ctx_ddl.drop_preference('italian_lexer')
    ;
    call ctx_ddl.drop_preference('spanish_lexer')
    ;
    call ctx_ddl.drop_preference('portu_lexer')
    ;
    call ctx_ddl.create_preference('default_lexer','basic_lexer')
    ;
    call ctx_ddl.create_preference('english_lexer','basic_lexer')
    ;
    call ctx_ddl.create_preference('chinese_lexer','chinese_lexer')
    ;
    call ctx_ddl.create_preference('japanese_lexer','japanese_lexer')
    ;
    call ctx_ddl.create_preference('korean_lexer','korean_lexer')
    ;
    REM ORA-20000: Oracle Text 错误:
    DRG-10703: 无效的框架对象korean_lexer
    ORA-06512: 在 "CTXSYS.DRUE", line 160
    ORA-06512: 在 "CTXSYS.CTX_DDL", line 26REM Maxinst completed with errors Tue Mar 29 06:52:29 GMT 2011