执行perl xttdriver.pl报错Can't locate Getopt/Long.pm in
发布时间:2020-12-15 23:38:04 所属栏目:大数据 来源:网络整理
导读:环境: AIX 6.1 + Oracle 10.2.0.4 现象: 在做xtts测试时,源环境使用Oracle自带的perl执行xttdriver.pl报错如下: $ $ORACLE_HOME/perl/bin/perl xttdriver.plCan‘t locate Getopt/Long.pm in @INC (@INC contains: /project/aix5l64/main/APACHE/perl/bi
环境:AIX 6.1 + Oracle 10.2.0.4 $ $ORACLE_HOME/perl/bin/perl xttdriver.pl Can‘t locate Getopt/Long.pm in @INC (@INC contains: /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3/aix-thread-multi /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/5.8.3 /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3/aix-thread-multi /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl/5.8.3 /project/aix5l64/main/APACHE/perl/bin/AIX/Opt/lib/site_perl .) at xttdriver.pl line 126. BEGIN failed--compilation aborted at xttdriver.pl line 126. 而在目标环境Linux6.8 + Oracle 11.2.0.4 就正常,起初我没多想这个问题,以为是10g的自带perl版本过低不支持,第一轮测试使用了系统自带perl可执行。 具体依据下面的MOS文档,需要设置PER5LIB环境变量:
临时设置PERL5LIB环境变量: $ export PERL5LIB=$ORACLE_HOME/perl/lib 再次使用Oracle自带的perl执行xttdriver.pl不再报之前的错误,这里测试没加参数,就正常列出了xttdriver.pl的使用方法: $ $ORACLE_HOME/perl/bin/perl xttdriver.pl ============================================================ trace file is /tmp/Nov15_Thu_16_29_45_413//Nov15_Thu_16_29_45_413_.log ============================================================= -------------------------------------------------------------------- Parsing properties -------------------------------------------------------------------- -------------------------------------------------------------------- Done parsing properties -------------------------------------------------------------------- -------------------------------------------------------------------- Checking properties -------------------------------------------------------------------- -------------------------------------------------------------------- Done checking properties -------------------------------------------------------------------- This program prepares,backsup and rollsforward tablespaces for cross-platform transportable tablespaces. usage: xttdriver.pl {[--backup|-b] || [--bkpincr|-B] || [--bkpexport/E] [--resincrdmp|M] [--fixnewdf|W] [--convert/-c] || [--generate|-e] || [--incremental|-i] || [[--prepare|-p] || [--getfile|-G]] || [--restore|R] || [--recover|X] [--rollforward|-r [--rolltbs|-T <TBS1[,TBS2]>] || [--determinescn|-s] || [--orasid/O] || [--orahome|-o]] [--help|-h]} Additional options ------------------ [--debug|d] [--clearerrorfile|-C] [--xttdir|Dir <tmpdir>] [-F/--propfile] [-I/--propdir] -b : For 12c and above,generate transportable backups -B : For 12c and above,generate level 1 transportable backups -c : conversion of datafiles -M : create the dump file from the generated backup -e : generate impdp script: export over new link -i : incremental backup -p : prepare -G : get datafiles from source database using get_file,should not be used together with -p -r : roll forward datafiles -s : new from_scn values into xttplan.txt -R : For 12c restore the datafiles from the backups -X : For 12c recover the datafiles from the backups -T : roll forward specific tablespace(s) -h : this (help) message (Default) -d : provides more debug information,also rman is called with debug option so that tracing is better. -L : delete the ERROR FILE and proceed with the execution -D : Instead of defining environement variable,user can pass tmpdir through xttdir -O : Use this option to pass ORACLE_SID to override the environment variable -o : Use this option to pass ORACLE_HOME to override the environment variable -I : Use this option to mention the location from where the script will pick the properties file etc -F : Use this option to mention the location from where the script will pick the properties file. -W : Will try to reconstruct files on the destination after new datafiles have been added example: xttdriver.pl -p xttdriver.pl -i xttdriver.pl -r xttdriver.pl -s $ 既然如此,后续还是建议使用oracle自带的perl进行测试。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |