Centos-6.7下 - Oracle 11gR2静默详细安装过程及排错

2026/4/29 7:14:26

STATUS of the LISTENER ------------------------

Alias LISTENER Version TNSLSNR for Linux: Version11.2.0.1.0 - Production

Start Date 06-MAR-2016 15:36:22

Uptime 0 days 0 hr. 19 min. 8 sec Trace Level off

Security ON: Local OS Authentication SNMP OFF

Listener Parameter

File /opt/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log

File /opt/app/oracle/diag/tnslsnr/DB_2/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DB_m2)(PORT=1521))) Services Summary...

Service \

Instance \Service\

Instance \The command completedsuccessfully

如果出现以下错误:

lsnrctl: error while loading shared

libraries:/u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1: cannotrestoresegmentprot after reloc: Permission denied 或者

ORA-12547: TNS:lost contact

解决办法:在root用户下执行以下命令

su - root

setenforce 0 不需要重启

修改/etc/selinux/config文件中的SELINUX=\为 disabled ,需要重启

注意:如果在没有将依赖包全部安装完成后强行安装数据库,那么登录数据库时将会出现:ORA-12547: TNS:lost contact错误,出现这个错误,就重新安装吧

修改oracle启动配置文件:

su - oracle vi /etc/oratab

orcl:/soft/u01/app/oracle/product/11.2.0/db_1:Y //把“N”改成“Y” 这样就可以通过dbstart启动此实例,监听器。

dbstart $ORACLE_HOME

此时所有oracle的进程关闭,监听器也停止。

dbshut $ORACLE_HOME 再次查看监听器状态。 lsnrctlstatus

启动数据库:

$ sqlplus / as sysdba //as前有个空格

[oracle@DB_m2 database]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Mar 616:22:55 2016 Copyright (c) 1982, 2009, Oracle. All rights reserved. ERROR:

ORA-12162: TNS:netservice name is incorrectly specified Enter user-name:

登录出现以上错误,诡异的故障背后的原因竟然是那样的基础:ORACLE_SID没有指定!

确认系统当前的ORACLE_HOME和ORACLE_SID环境变量

[oracle@DB_m2 database]$ echo $ORACLE_HOME /opt/app/oracle/product/11.2.0/dbhome_1 [oracle@DB_m2 database]$ echo $ORACLE_SID

[oracle@DB_m2 database]$

可见,此时只设置了ORACLE_HOME环境变量,但ORACLE_SID此时为空,这就是该问题的真实原因。 解决方法如下:

[oracle@DB_m2 database]$ cd [oracle@DB_m2 ~]$ pwd /home/oracle

[oracle@DB_m2 ~]$ vi .bash .bash_history .bash_profile .bash_logout .bashrc [oracle@DB_m2 ~]$ vi .bash_

.bash_history .bash_logout .bash_profile

[oracle@DB_m2 ~]$ vi .bash_profile 在最后面加入如下内容:

export ORACLE_SID=ora11g 后保存退出! [oracle@DB_m2 ~]$ source .bash_profile [oracle@DB_m2 ~]$ echo $ORACLE_SID ora11g

[oracle@DB_m2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0Production on Sun Mar 6 16:31:46 2016 Copyright (c) 1982, 2009,Oracle. All rights reserved.

Connected to:

Oracle Database 11g EnterpriseEdition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, DataMining and Real Application Testing options SQL>start SQL>startup

ORACLE instance started.

Total System Global Area 304807936 bytes

Fixed Size 2212856 bytes Variable Size 113249288 bytes Database Buffers 184549376 bytes Redo Buffers 4796416 bytes Database mounted. Database opened.


Centos-6.7下 - Oracle 11gR2静默详细安装过程及排错.doc 将本文的Word文档下载到电脑
搜索更多关于: Centos-6.7下 - Oracle 11gR2静默详细 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219