记一次解决Oracle数据库连接失败
发布时间:2020-12-12 15:09:44 所属栏目:百科 来源:网络整理
导读:问题背景:使用PL/SQL Developer连接本地虚拟机(RedHat6.7)中的Oracle服务,报错如下: ERROR:ORA- 01034 : ORACLE not availableORA- 27101 : shared memory realm does not existLinux-x86_64 Error: 2 : No such file or directory Additional informat
问题背景:使用PL/SQL Developer连接本地虚拟机(RedHat6.7)中的Oracle服务,报错如下: ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3640
Additional information: 248258503
Process ID: 0
Session ID: 0 Serial number: 0
解决过程:先利用XShell 连接本地RedHat,尝试利用sqlplus连接Oracle看是否能够连接,结果报错如下: [oracle@Simon ~]$ sqlplus sys as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu Mar 16 19:45:44 2017
Copyright (c) 1982,2014,Oracle. All rights reserved.
Enter password:
ERROR:
ORA-09817: Write to audit file failed.
Linux-x86_64 Error: 28: No space left on device
Additional information: 12
ORA-09945: Unable to initialize the audit trail file
Linux-x86_64 Error: 28: No space left on device
看到提示报错是No space left on device 后,利用df -m 查看磁盘空间无剩余: [root@Simon ~]# df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/vg_simon-lv_root 26718 25351 11 100% /
tmpfs 1910 0 1910 0% /dev/shm
/dev/sda1 485 40 421 9% /boot
迅速确定问题所在,临时解决办法为删除 /var/lib/mlocate/ 目录下的 mlocate.db 文件释放磁盘空间: [root@Simon ~]# cd /var/lib/mlocate/
[root@Simon mlocate]# ls
mlocate.db
[root@Simon mlocate]# rm -rf mlocate.db
释放完毕后,再次连接sqlplus,启动数据库,外部连接恢复正常。后更改虚拟机磁盘大小,问题消失。
详细用法请百度linux locate命令 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |