执行perl xttdriver.pl报错Can't locate Getopt/Long.pm in @INC
环境:AIX 6.1 + Oracle 10.2.0.4
现象:在做xtts测试时,源环境使用Oracle自带的perl执行xttdriver.pl报错如下:
$ $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可执行。
但在后续测试中发现系统自带的perl在执行过程中也是有很多类似错误,虽然最终完成,但担心有其他隐患,和有经验的同事进一步沟通,得知之前成功的xtts项目都是采用oracle自带的perl,某些版本报这个错误是需要额外设置环境变量。
具体依据下面的MOS文档,需要设置PER5LIB环境变量:
- perl xttdriver.pl fails: Can't locate Getopt/Long.pm in @INC (文档 ID 1912400.1)
临时设置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进行测试。
2018-11-18修正说明:最终发现这个不算是问题,因为实际上源端我使用系统自带的perl也并没有任何报错,实际报错是目标端perl在进行增量恢复时有报错,具体是"Can't locate strict.pm in @INC...",虽然看起来和上文很像,但模块名称有区别,而从MOS文档Migrate database to Exadata with DBMS_FILE_TRANSFER (文档 ID 1902618.1)中可以看到这个错误实际是可以忽略的,原话是:
It is safe to ignore the "Can't locate strict.pm in @INC..." messages. We believe those are the result of the Perl pragma 'use strict' in the asmcmdcore.
执行perl xttdriver.pl报错Can't locate Getopt/Long.pm in @INC的更多相关文章
- linux安装软件报错: Can't locate ExtUtils/Embed.pm in @INC...
安装snmp服务, 中间报错: Can't locate ExtUtils/Embed.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/l ...
- linux centos环境下,perl使用DBD::Oracle遇到报错Can't locate DBD/Oracle.pm in @INC 的解决办法
前言 接手前辈的项目,没有接触.安装.使用过perl和DBD::Oracle,也没有相关的文档记录,茫茫然不知所措~~.一开始发现这个问题,就想着迅速解决,就直接在google上搜报错信息,搜索的过程 ...
- pt-diskstats 报错 Can't locate Time/HiRes.pm in @INC
调用 pt-diskstats 时报错如下Can't locate Time/HiRes.pm in @INC [root@localhost ~]# pt-diskstats Can't locat ...
- 【mybatis】mybatis执行一个update方法,返回值为1,但是数据库中数据并未更新,粘贴sql语句直接在数据库执行,等待好久报错:Lock wait timeout exceeded; try restarting transaction
今天使用mybatis和jpa的过程中,发现这样一个问题: mybatis执行一个update方法,返回值为1,但是数据库中数据并未更新,粘贴sql语句直接在数据库执行,等待好久报错:Lock wai ...
- vue-electron 使用sqlite3数据库,执行npm run build 报错 .NET Framework 2.0 SDK,Microsoft Visual Studio 2005[C:\temp\wechat\node_modules\sqlite3\build\binding.sln]
问题描述 vue-electron 使用sqlite3数据库,执行npm run build 报错如下: .NET Framework 2.0 SDK,Microsoft Visual Studio ...
- 执行命令npm publish报错:403 Forbidden - PUT https://registry.npmjs.org/kunmomotest2 - You cannot publish over the previously published versions: 0.0.1.
前言 执行命令npm publish报错:403 Forbidden - PUT https://registry.npmjs.org/kunmomotest2 - You cannot publis ...
- Django中修改DATABASES后,执行python manage.py ****报错!UnicodeEncodeError
Django中修改DATABASES后,执行python manage.py ****报错!UnicodeEncodeError: 'latin-1' codec can't encode chara ...
- k8s 执行 ingress yaml 文件报错: error when creating "ingress-myapp.yaml": Internal error occurred: failed calling webhook
k8s 执行 ingress yaml 文件报错:错误如下: [root@k8s-master01 baremetal]# kubectl apply -f ingress-test.yaml Err ...
- 单点登录(十一)-----遇到问题-----cas启用mongodb验证方式报错--Unable to locate Spring NamespaceHandler for XML schema na
cas启用mongodb验证方式报错--Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.sp ...
随机推荐
- 关于JAVA项目中的常用的异常处理情况
Java异常处理的几个原则如下. 1)不要丢弃异常,捕获异常后需要进行相关处理.如果用户觉得不能很好地处理该异常,就让它继续传播,传到别的地方去处理,或者把一个低级的异常转换成应 ...
- flannel
Docker跨主机容器间网络通信实现的工具有Pipework.Flannel.Weave.Open vSwitch(虚拟交换机).Calico实现跨主机容器间的通信.其中Pipework.Weave. ...
- React Native开源项目如何运行(转载)
学习任何技术,最快捷的方法就是学习完基础语法,然后模仿开源项目进行学习,React Native也不例外.React Native推出了1年多了, 开源项目太多了,我们以其中一个举例子.给大家演示下如 ...
- 内部排序->选择排序->堆排序
文字描述 堆排序中,待排序数据同样可以用完全二叉树表示, 完全二叉树的所有非终端结点的值均不大于(或小于)其左.右孩子结点的值.由此,若序列{k1, k2, …, kn}是堆,则堆顶元素(或完全二叉树 ...
- java读取配置文件的信息
1. 首先,工程结构如下: 注:a. 蓝色标注的两个文件是和com包平级的,都在src下.EnnNotificationPushProxy.ini是这个工程的配置文件,log4j.properties ...
- 【SQL】如何使用SQL like 方法和SQL [charlist] 通配符(SQL like的拓展)
1.like 相关用法 '%a' //以a结尾的数据 'a%' //以a开头的数据 '%a%' //含有a的数据 ‘_a_’ //三位且中间字母是a的 '_a' //两位 ...
- python-面向对象-04_面向对象封装案例
面向对象封装案例 目标 封装 小明爱跑步 存放家具 01. 封装 封装 是面向对象编程的一大特点 面向对象编程的 第一步 —— 将 属性 和 方法 封装 到一个抽象的 类 中 外界 使用 类 创建 对 ...
- Linux上跑MySQL优化技巧
1.禁止操作系统更新文件的atime属性 atime是Linux/UNIX系统下的一个文件属性,每当读取文件时,操作系统都会将读操作时间回写到磁盘上.对于读写频繁的数据库文件来说,记录文件的访问时间一 ...
- Python3学习之路~6.8 多态
多态性(polymorphisn)是允许你将父对象设置成为和一个或更多的他的子对象相等的技术,赋值之后,父对象就可以根据当前赋值给它的子对象的特性以不同的方式运作.简单的说,就是一句话:允许将子类类型 ...
- Object 转 json 工具类
/** * 把数据对象转换成json字符串 DTO对象形如:{"id" : idValue, "name" : nameValue, ...} * 数组对象形如 ...