admin管理员组文章数量:1529456
原因分析:
1.内核参数设置有问题
2.ORACLE文件执行权限有问题
3.用户参数 stack 设置有问题
4. $ORACLE_HOME/rdbms/lib/config.o 文件大小为0字节
5. Oracle binaries have not been linked correctly
6.没有 $ORACLE_HOME/dbs 目录,且该目录下应该有ora文件,如果没有则报错:
ORA-01078:failure in processing system parameters
(Note that creating an empty dbs directory already solves this error and you can for instance shutdown the instance. However, you will obviously not be able to restart because of the missing parameter file. So, the dbs directory needs to be fully restored.)
7.缺少rpm包 例如 libaio,
解决办法:
-
Oracle11g官方给出了内核参数为:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576 -
检查oracle运行权限
$ cd $ORACLE_HOME/bin
$ ls -l oracle
权限应该为 -rwsr-s–x 1 oracle dba 或者 -rwsr-s–x 1 oracle oinstall
如果不是请更改:
$ chmod 6751 oracle
$ ls -l oracle -
检查 stack 的值
ulimit -a
看用户参数的值是否符合官方要求
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240 -
确保下面两个文件不为0字节
$ORACLE_HOME/bin/oracle
$ORACLE_HOME/rdbms/lib/config.oIf yes, rename the following file:
% cd $ORACLE_HOME/rdbms/lib
% mv config.o config.o.bad
Then, relink the oracle binary:
% relink oracle -
如果以上检查都没有问题,建议停掉数据库和监听
使用relink all 命令 重新编译 -
查看是否有$ORACLE_HOME/dbs目录,
本次错误可能就是由于该问题导致,创建dbs目录后,sqlplus / as sysdba 命令没有再报错,但是在启动数据库的时候报如下错误:
原因:
在oracle9i、10g、11g最近几个版本中,数据库默认使用spfile启动数据库,如果spfile不存在,则就会出现上述错误
解决办法:
使用命令查找pfile文件:find /u01 -name pfile -print 进入该文件夹,查看文件
将
O
R
A
C
L
E
H
O
M
E
/
a
d
m
i
n
/
c
v
t
e
63
/
p
f
i
l
e
目
录
下
的
i
n
i
t
.
o
r
a
.
6420171848
形
式
的
文
件
c
o
p
y
到
ORACLE_HOME/admin/cvte63/pfile目录下的init.ora.6420171848 形式的文件copy 到
ORACLEHOME/admin/cvte63/pfile目录下的init.ora.6420171848形式的文件copy到ORACLE_HOME/dbs目录下命名为initfxorcl.ora即可 (fxorcl 的意思是数据库实例的名称,根据自己的实例名命名)
现在启动数据库即可
7.检查rpm包是否有缺失,例如
rpm -qa | grep libaio
本文标签: 报错sysdbaORACLEsqlplusORA
版权声明:本文标题:oracle sqlplusas sysdba连接的时候报错ORA-12547: TNS:Lost Contact 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1726642353a1079778.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论