Wednesday, April 4, 2018

Using EXCLUDE while importing


Using EXCLUDE while importing

  For PROD lower environment refresh Please use below updated import command

impdp odb/<password>@<Instance_nanme> directory=EXPORT_DIR2 dumpfile=<dump_file>.dmp logfile=<log_file>.log
schemas=odb EXCLUDE=INDEX:\"=\'I_PRODDOC_CONTENT\'\"

  Once all the objects get imported,run below sqls to crate the index manaully
##make sure you are connected as ODB user.

EXECUTE CTX_DDL.DROP_PREFERENCE('PRODDOC_DETAIL_FILTER');
EXECUTE CTX_DDL.CREATE_PREFERENCE('PRODDOC_DETAIL_FILTER','INSO_FILTER');
EXECUTE CTX_DDL.DROP_STOPLIST('PRODDOC_DETAIL_STOPLIST');
EXECUTE CTX_DDL.CREATE_STOPLIST('PRODDOC_DETAIL_STOPLIST');
DROP INDEX I_PRODDOC_CONTENT;
DROP INDEX I_PRODDOC_CONTENT FORCE;
CREATE INDEX I_PRODDOC_CONTENT ON "PRODDOC_DETAIL"(DOCUMENT_CONTENT)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('FILTER PRODDOC_DETAIL_FILTER STOPLIST PRODDOC_DETAIL_STOPLIST');
EXECUTE CTX_DDL.SYNC_INDEX('I_PRODDOC_CONTENT');



Note:
issue:
 If index creation throws error like below
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366

solutions:
follow below steps to fix it
Jetstar_ODB@PRODjjt > conn ctxsys/ctxsys
connected
Jetstar_CTXSYS@PRODjjt > $ORACLE_HOME/ctx/admin/defaults/drdefxx
Jetstar_CTXSYS@PRODjjt > @$ORACLE_HOME/ctx/admin/defaults/drdefgb.sql;
Creating lexer preference...

and create the index I_PRODDOC_CONTENT.

No comments:

Post a Comment