Oracle 10g及pro*c相关问题及解决方法

2008年08月21日 星期四 上午 11:21

最近一直在进行ORACLE 10g和PRO*C的学习。 
其中遇到了不少的问题: 
现列于此,已备他用。 
[注:我的linux版本是RHEL 5,Oracle版本是10g] 
1、在ORACLE 10g 安装准备的过程中:缺少libXp.so.6依赖 
上网搜过不少文章,但是都不是很好的解决 
我自己摸索出一个解决方法: 
在RHEL5的安装盘中找到libXp-1.0.0-8.i386.rpm,进行安装后,便可解决。 
2、在ORACLE 10g 安装过程中Xlib: connection to ":0.0" refused by server 
Xlib: connection to ":0.0" refused by server 
Xlib: No protocol specified 
Error: Can't open display: :0.0 
以root用户登陆,在shell中运行 
[root@brady ~]# xhost local:oracle 
non-network local connections being added to access control list 
然后oracle身份就可以运行X程序了。 
man xhost中有这样一段 
A complete name has the syntax ‘‘family:name’’ where the families are as follows: 
inet      Internet host (IPv4) 
inet6     Internet host (IPv6) 
dnet      DECnet host 
nis       Secure RPC network name 
krb       Kerberos V5 principal 
local     contains only one name, the empty string 
si        Server Interpreted 
其中local那个是用来解决同一台机器的不同用户访问X的问题的。 
3.proc: error while loading shared libraries: libclntsh.so.10.1: 
cannot open shared object file: No such file or directory
 
解决方法: 
在/etc/profile中添加 
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib; 
export LD_LIBRARY_PATH
 
然后可以用source /etc/profile 生效一下 
4、PCC-S-02201错误 
在用proc进行编译的时候(proc iname=test.pc) 出错 
错误信息有很多: 
PCC-S-02201, Encountered the symbol "<eof>;" when expecting one of the following.... 
发生 PCC-S-02201 错误时有两种解决办法: 
1)升级编译器 
2)设置 parse=none 

更正后的命令:proc iname=test.pc parse=none 
结果生成test.c文件 
5、error: sqlca.h: No such file or directory 
执行gcc -o test test.c时: 
test.c:152:19: error: sqlca.h: No such file or directory 
sqlca.h在$ORACLE_HOME/precomp/public/下 
更正后的命令:gcc -o test test.c -I $ORACLE_HOME/precomp/public 
6、undefined reference to `sqlcxt' 
执行5中的命令时出现错误如下: 
test.c:(.text+0x5e5): undefined reference to `sqlcxt' 
需要用到$ORACLE_HOME/lib/libclntsh.so 
故需加上 -L $ORACLE_HOME/lib -l clntsh 
更正后的命令为: 
gcc -o test test.c -I /home/oracle/oracle/product/10.2.0/db_1/precomp/public -L $ORACLE_HOME/lib -l clntsh 
OK!至此编译成功! 
但是这样写太麻烦 
7、error while loading shared libraries: $ORACLE_HOME/lib/libnnz10.so: 
cannot restore segment prot after reloc: Permission denied 

执行程序(./test)时提示错误: 
error while loading shared libraries: $ORACLE_HOME/lib/libnnz10.so: 
cannot restore segment prot after reloc: Permission denied 
相关的文章: 
Topic: 
Some Linux distributions with SELinux enabled may prevent IDL from running under the default security context. This TechTip is a workaround for CR#41937 
Discussion: 
Newer Linux distributions have enabled new kernel security extensions from the SELinux project at the NSA. These extensions allow finer-grained control over system security. However, SELinux also changes some default system behaviors, such as shared library loading, that can be problematic to third party programs.If you receive the error message "cannot restore segment prot after reloc: Permission denied" when launching IDL, then your SELinux configuration is preventing IDL from launching. 
To rectify this issue, you can either: 
(1)Change the default security context for IDL by issuing the command: 
chcon -t texrel_shlib_t /usr/local/rsi/idl_6.1/bin/bin.linux.x86/*.so 
(2)Disabling SELinux altogether by setting the line 
SELINUX=disabled 
in your /etc/sysconfig/selinux file. 
我使用的解决办法:chcon -t texrel_shlib_t $ORACLE_HOME/lib/*.so

racle 10g及pro*c相关问题及解决方法2010-10-29 10:01阅读(195)

分享

1、在ORACLE 10g 安装准备的过程中:缺少libXp.so.6依赖 
上网搜过不少文章,但是都不是很好的解决 
我自己摸索出一个解决方法: 
在RHEL5的安装盘中找到libXp-1.0.0-8.i386.rpm,进行安装后,便可解决。 
2、在ORACLE 10g 安装过程中Xlib: connection to ":0.0" refused by server 
Xlib: connection to ":0.0" refused by server 
Xlib: No protocol specified 
Error: Can't open display: :0.0 
以root用户登陆,在shell中运行 
[root@brady ~]# xhost local:oracle 
non-network local connections being added to access control list 
然后oracle身份就可以运行X程序了。 
man xhost中有这样一段 
A complete name has the syntax ‘‘family:name’’ where the families are as follows: 
inet      Internet host (IPv4) 
inet6     Internet host (IPv6) 
dnet      DECnet host 
nis       Secure RPC network name 
krb       Kerberos V5 principal 
local     contains only one name, the empty string 
si        Server Interpreted 
其中local那个是用来解决同一台机器的不同用户访问X的问题的。 
3.proc: error while loading shared libraries: libclntsh.so.10.1: 
cannot open shared object file: No such file or directory
 
解决方法: 
在/etc/profile中添加 
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib; 
export LD_LIBRARY_PATH
 
然后可以用source /etc/profile 生效一下 
4、PCC-S-02201错误 
在用proc进行编译的时候(proc iname=test.pc) 出错 
错误信息有很多: 
PCC-S-02201, Encountered the symbol "<eof>;" when expecting one of the following.... 
发生 PCC-S-02201 错误时有两种解决办法: 
1)升级编译器 
2)设置 parse=none 

更正后的命令:proc iname=test.pc parse=none 
结果生成test.c文件 
5、error: sqlca.h: No such file or directory 
执行gcc -o test test.c时: 
test.c:152:19: error: sqlca.h: No such file or directory 
sqlca.h在$ORACLE_HOME/precomp/public/下 
更正后的命令:gcc -o test test.c -I $ORACLE_HOME/precomp/public 
6、undefined reference to `sqlcxt' 
执行5中的命令时出现错误如下: 
test.c:(.text+0x5e5): undefined reference to `sqlcxt' 
需要用到$ORACLE_HOME/lib/libclntsh.so 
故需加上 -L $ORACLE_HOME/lib -l clntsh 
更正后的命令为: 
gcc -o test test.c -I /home/oracle/oracle/product/10.2.0/db_1/precomp/public -L $ORACLE_HOME/lib -l clntsh 
OK!至此编译成功! 
但是这样写太麻烦 
7、error while loading shared libraries: $ORACLE_HOME/lib/libnnz10.so
cannot restore segment prot after reloc: Permission denied 

执行程序(./test)时提示错误: 
error while loading shared libraries: $ORACLE_HOME/lib/libnnz10.so
cannot restore segment prot after reloc: Permission denied 
相关的文章: 
Topic: 
Some Linux distributions with SELinux enabled may prevent IDL from running under the default security context. This TechTip is a workaround for CR#41937 
Discussion: 
Newer Linux distributions have enabled new kernel security extensions from the SELinux project at the NSA. These extensions allow finer-grained control over system security. However, SELinux also changes some default system behaviors, such as shared library loading, that can be problematic to third party programs.If you receive the error message "cannot restore segment prot after reloc: Permission denied" when launching IDL, then your SELinux configuration is preventing IDL from launching. 
To rectify this issue, you can either: 
(1)Change the default security context for IDL by issuing the command: 
chcon -t texrel_shlib_t /usr/local/rsi/idl_6.1/bin/bin.linux.x86/*.so 
(2)Disabling SELinux altogether by setting the line 
SELINUX=disabled 
in your /etc/sysconfig/selinux file. 
我使用的解决办法:chcon -t texrel_shlib_t $ORACLE_HOME/lib/*.so

8.sqlplus: error while loading shared libraries: /u01/app/oracle/product/11.1.0/db_1/lib/libnnz11.so: cannot restore segment prot after reloc: Permission denied

出現這句error的原因是因為Linux選擇"Enforcing" mode

只要將"Enforcing" mode 轉為 "Permissive" mode

1.首先,要run as root

2.Type "getenforce"  ,hit [Enter]

====================== 
getenforce       (returns “Enforcing”)

3.Type "setenforce 0"

======================

getenforce       (returns “Permissive”)

如果想將 "Permissive" mode 轉為 "Enforcing" mode

可以打setenforce 1

======================

getenforce       (returns “Enforcing”)

原文地址:http://blog.csdn.net/cinience/article/details/6208315

[转]Oracle 10g及pro*c相关问题及解决方法(转)的更多相关文章

  1. 关于oracle监听程序的相关问题及解决方法

    1.查看监听程序是否启动 打开cmd窗口,cmd用管理员运行,否则无法执行启动与停止监听命令 lsnrctl status查看运行状态 lsnrctl stop停止监听 lsnrctl start启动 ...

  2. [转载]oracle 11g不能导出空表的多种解决方法

    原文地址:11g不能导出空表的多种解决方法">oracle 11g不能导出空表的多种解决方法作者:Anlin_Yang ORACLE 11g 用exp命令导出库文件备份时,发现只能导出 ...

  3. db2相关问题及解决方法

    DB2相关问题及解决方法: 一.DB2中的代码页(codepage)问题. DB2备份时发生过代码页错误的问题,修改代码页后备份正常,但创建数据库时又发生代码页的错误.这是DB2服务器使用的代码页配置 ...

  4. Oracle用户密码过期和用户被锁解决方法【转】

    [原因/触发因素] 确定是由于Oracle11g中默认在default概要文件中设置了“PASSWORD_LIFE_TIME=180天”所导致. [影响和风险] 影响 密码过期后,业务进程连接数据库异 ...

  5. Oracle 11gR2 用exp无法导出空表解决方法

    Oracle 11gR2 用exp无法导出空表解决方法 在11gR2中有个新特性,当表无数据时,不分配segment以节省空间.Oracle 当然在运行export导出时,空表则无法导出,可是还是有解 ...

  6. android6.0SDK 删除HttpClient的相关类的解决方法

    本文转载自博客:http://blog.csdn.net/yangqingqo/article/details/48214865 android6.0SDK中删除HttpClient的相关类的解决方法 ...

  7. oracle select in超过1000条报错解决方法

    本博客介绍oracle select in超过1000条数据的解决方法,java框架是采用mybatis的,这可以说是一种比较常见的错误:select * from A where id in(... ...

  8. [转]Navicat for oracle 提示 cannot load oci dll,193的解决方法 orcale 11g

    Navicat for oracle 提示 cannot load oci dll,193的解决方法   内网有一台windows server 2012,安装了Navicat 11.1.8 连接or ...

  9. Orabbix无法获取Oracle DB Size和DB Files Size的解决方法

    Orabbix无法获取Oracle DB Size和DB Files Size的解决方法 这几天在研究Orabbix时发现在Zabbix中无法获取DB Size和DB Files Size的大小,后来 ...

随机推荐

  1. Indian Scientists Design Device to Collect Solar Energy 印度科学家设计太阳能收集设备

      Indian scientists have designed a new device they hope will solve one of the biggest problems with ...

  2. Can brain stimulation aid memory and brain health?

    Can brain stimulation aid memory and brain health? Harvard Women’s Health Watch Image: Thinkstock Th ...

  3. SQL 表值函数

    表值函数返回的是一张表. 情况:把传入的字符串按指定分隔符转换成数组 理解:把字符串打散,逐个插入表,这个表就是需要的数据 Create Function [dbo].[Split] ( ), ) ) ...

  4. 为知笔记 Markdown 新手指南

    为知笔记 Markdown 新手指南 http://www.wiz.cn/feature-markdown.html 时序图,流程图详细流程图语法 http://adrai.github.io/flo ...

  5. VC7 HTML Dialog开发实例讲解

    开发环境:VS7,Windows XP,Windows 2K 在VS7中添加了一种新的对话框类:CDHtmlDialog,顾名思义就是能够显示DHTML内容的对话框,但不同与以前的CHTMLView不 ...

  6. extern “C”原理,用法以及使用场景-2016.01.05

    1 问题提出 在编程过程中,经常发现如下用法: #ifndef _FILE_NAME_H_ #define _FILE_NAME_H_ #ifdef __cplusplus extern " ...

  7. Tomcat Connector三种运行模式

    BIO: 一个线程处理一个请求.缺点:并发量高时,线程数较多,浪费资源. Tomcat7或以下,在Linux系统中默认使用这种方式. NIO: 利用Java的异步IO处理,可以通过少量的线程处理大量的 ...

  8. c++ builder TListView控件按字符串排序(根据网上代码亲测ok)

    //--------------------------------------------------------------------------- /* 首先将一个列表框控件安放在Form上, ...

  9. 使用jquery时弹出[object HTMLImageElement]问题

    本打算写一个轮播图,但是获取到图像后想改变图片地址,却jq方法各种不能实现,开始以为是jq文件弄错了,用百度的cdn试了下还是报错. 于是开始了alert调试. 我是用的jquery获取类 var a ...

  10. 新手浅谈C#Task异步编程

    Task是微软在.net framework 4.0发布的新的异步编程的利器,当然4.5新增了async.await,这儿我们先说Task相关. 在实际编程中,我们用的较多的是Task.Task.Fa ...