运行csscan出现loading shared libraries错误

在一个11.2.0.2 for Linux X86-64环境中,运行csscan工具报错。

 

 

错误信息为:

[oracle@dbserver2 ~]$ cd $ORACLE_HOME/bin
[oracle@dbserver2 bin]$ csscan help=y
csscan: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory

检查metalink,在文档ID 742070.1中提到,导致这个问题的原因是没有正确的设置LD_LIBRARY_PATH环境变量,将$ORACLE_HOME/lib添加到这个环境变量中可以避免错误的产生:

[oracle@dbserver2 bin]$ env|grep LD_LIB
LD_LIBRARY_PATH=/etc/emc/rsa/cst/lib
[oracle@dbserver2 bin]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
[oracle@dbserver2 bin]$ csscan help=y

Character Set Scanner v2.2 : Release 11.2.0.2.0 - Production on Mon Jun 6 17:46:04 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

You can let Scanner prompt you for parameters by entering the CSSCAN       
command followed by your username/password:                                

  Example: CSSCAN \"SYSTEM/MANAGER AS SYSDBA\"                         

Or, you can control how Scanner runs by entering the CSSCAN command        
followed by various parameters. To specify parameters, you use keywords:   

  Example:                                                                 
    CSSCAN \"SYSTEM/MANAGER AS SYSDBA\" FULL=y TOCHAR=utf8 ARRAY=1024000 PROCESS=3 

Keyword    Default Prompt Description                                      
---------- ------- ------ -------------------------------------------------
USERID             yes    username/password                                
FULL       N       yes    scan entire database                             
USER               yes    owner of tables to be scanned                    
TABLE              yes    list of tables to scan                           
COLUMN             yes    list of columns to scan                           
EXCLUDE                   list of tables to exclude from scan              
TOCHAR             yes    new database character set name                  
FROMCHAR                  current database character set name              
TONCHAR                   new national character set name                  
FROMNCHAR                 current national character set name              
ARRAY      1024000 yes    size of array fetch buffer                       
PROCESS    1       yes    number of concurrent scan process                
MAXBLOCKS                 split table if block size exceed MAXBLOCKS       
CAPTURE    N              capture convertible data                         
SUPPRESS                  maximum number of exceptions logged for each table
FEEDBACK                  report progress every N rows                     
BOUNDARIES                list of column size boundaries for summary report
LASTRPT    N              generate report of the last database scan        
LOG        scan           base file name of report files                   
PARFILE                   parameter file name                              
PRESERVE   N              preserve existing scan results                   
LCSD       N       no     enable language and character set detection      
LCSDDATA   LOSSY   no     define the scope of the detection                
HELP       N              show help screen (this screen)                   
QUERY      N              select clause to scan subset of tables or columns
---------- ------- ------ -------------------------------------------------
Scanner terminated successfully.

采用这个方法确实解决了问题。不过奇怪的问题是,另外一台服务器采用相同方式安装的数据库,并不存在这个问题,而且这台服务器上的LD_LIBRARY_PATH的设置与出现问题的服务器完全一致:

[oracle@dbserver1 ~]$ cd $ORACLE_HOME/bin
[oracle@dbserver1 bin]$ csscan help=y

Character Set Scanner v2.2 : Release 11.2.0.2.0 - Production on Mon Sep 5 17:47:18 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

You can let Scanner prompt you for parameters by entering the CSSCAN       
command followed by your username/password:                                

  Example: CSSCAN \"SYSTEM/MANAGER AS SYSDBA\"                         

Or, you can control how Scanner runs by entering the CSSCAN command        
followed by various parameters. To specify parameters, you use keywords:   

  Example:                                                                 
    CSSCAN \"SYSTEM/MANAGER AS SYSDBA\" FULL=y TOCHAR=utf8 ARRAY=1024000 PROCESS=3 

Keyword    Default Prompt Description                                      
---------- ------- ------ -------------------------------------------------
USERID             yes    username/password                                
FULL       N       yes    scan entire database                             
USER               yes    owner of tables to be scanned                    
TABLE              yes    list of tables to scan                           
COLUMN             yes    list of columns to scan                           
EXCLUDE                   list of tables to exclude from scan              
TOCHAR             yes    new database character set name                  
FROMCHAR                  current database character set name              
TONCHAR                   new national character set name                  
FROMNCHAR                 current national character set name               
ARRAY      1024000 yes    size of array fetch buffer                       
PROCESS    1       yes    number of concurrent scan process                
MAXBLOCKS                 split table if block size exceed MAXBLOCKS       
CAPTURE    N              capture convertible data                         
SUPPRESS                  maximum number of exceptions logged for each table
FEEDBACK                  report progress every N rows                     
BOUNDARIES                list of column size boundaries for summary report
LASTRPT    N              generate report of the last database scan        
LOG        scan           base file name of report files                   
PARFILE                   parameter file name                              
PRESERVE   N              preserve existing scan results                   
LCSD       N       no     enable language and character set detection      
LCSDDATA   LOSSY   no     define the scope of the detection                
HELP       N              show help screen (this screen)                   
QUERY      N              select clause to scan subset of tables or columns
---------- ------- ------ -------------------------------------------------
Scanner terminated successfully.
[oracle@dbserver1 bin]$ env|grep LD_LIB
LD_LIBRARY_PATH=/etc/emc/rsa/cst/lib

虽然metalink给出的解决方法确实有效,但是导致这个问题的原因和可能是多个方面的,至少文档没有给出为什么同样配置同样版本的两个数据库,在一个上没有问题,而另一个上运行就出现错误。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/4227/viewspace-706711/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/4227/viewspace-706711/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值