linux 安装oracle错误解决方法

# ./sqlplus

./sqlplus: error while loading shared libraries: /home/mnum/app/mnum/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied

先解决libclntsh.so的问题:

# semanage fcontext -a -t textrel_shlib_t /home/mnum/app/mnum/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1

csvn homedir /opt/CollabNet_Subversion or its parent directory conflicts with a defined context in /etc/selinux/targeted/contexts/files/file_contexts, /usr/sbin/genhomedircon will not create a new context. This usually indicates an incorrectly defined system account. If it is a system account please make sure its login shell is /sbin/nologin.

# restorecon -R -v /home/mnum/app/mnum/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1

restorecon reset /home/mnum/app/mnum/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 context user_u:object_r:user_home_t:s0->system_u:object_r:textrel_shlib_t:s0

# ./sqlplus

Error 6 initializing SQL*Plus

SP2-0667: Message file sp1.msb not found

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

解决上边的问题,添加环境变量:

# vi /etc/profile

ORACLE_HOME=/home/mnum/app/mnum/product/11.2.0/dbhome_1

ORACLE_SID=ORCL

PATH=:$ORACLE_HOME/bin

# source /etc/profile (使变量生效)

# sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 16 13:34:08 2010

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Enter user-name: SYSTEM
Enter password:
ERROR:
ORA-12546: TNS:permission denied

要指定用户名/密码@SID:

# sqlplus SYSTEM/Oracle11@ORCL

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 16 13:35:29 2010

Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

OK!!

【补充】

sqlplus连接远程数据库

# sqlplus Oracle11@ip:port/ORCL">SYSTEM/Oracle11@ip:port/ORCL
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值