ORA-01034, ORA-01219 error solution, find common parameters

plsql cannot connect to the database, and the following error occurs when logging in to the database with the sys user:

SQL> select * from all_users;
select * from all_users
*
ERROR at line 1:
ORA-01034: ORACLE not available
SQL> shutdown immedate;
SP2-0717: illegal SHUTDOWN option
SQL> startup mount;
ORA-09945: Unable to initialize the audit trail file
Linux-x86_64 Error: 28: No space left on device

The error indicates that the disk space is insufficient.
df -h checked and found that the available space is 0%.
** This error is usually caused by the disk space of the server where the oracle is located is already occupied. You need to clean up unnecessary disk files and restart the database. **
Solution:

#查找oracle的trace文件目录
find / -name   trace  -type d
#进入trace目录,查寻、删除指定天数以前的文件
find -mtime -10 -exec rm -rf {} \;
#查看告警日志文件的大小
du -sh alert_ipems.log
#告警日志可以直接删除(如无特殊查看需要的化),删除后系统会自动创建(记录启动,关闭,连接错误信息)

Find common parameters

格式1:find  [目录]   [条件1]  [-a|-o]  [条件2] ...

-mtime # depending on the file modification time (all of the time elapsed time)
+10: 10 days before documentation
-10: Document within the last 10 days
-type type # file types are f, d directory, l shortcuts
- size +/- file size #find by file size (k, M, G)
-user username
#find by owner -iname #find by name, ignore case

格式二:find .. .. -exec 处理命令 {} \;

-exec #Fixed writing
{}; #Replace each result with {}, process one by one, meet; end

SQL> shutdown;  #删完文件之后,再重启数据库
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1586708480 bytes
Fixed Size		    2253624 bytes
Variable Size		  922750152 bytes
Database Buffers	  654311424 bytes
Redo Buffers		    7393280 bytes
Database mounted.

However, there was still a problem when querying after a successful restart:

SQL> select * from all_users;
select * from all_users
              *
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
#数据库未打开: 仅允许在固定表/视图中查询#
#解决方法,重新打开数据库
SQL> alter database open;
Database altered.
SQL> select * from all_users;
USERNAME			  USER_ID CREATED
------------------------------ ---------- ---------
TBS_APP_TDRP			      102 05-NOV-19
HJ				      110 22-NOV-19
LINKCLD_ORM			       87 17-OCT-19
SCOTT				       83 24-AUG-13
OWBSYS_AUDIT			       79 24-AUG-13
OWBSYS				       78 24-AUG-13

USERNAME			  USER_ID CREATED
------------------------------ ---------- ---------
SPATIAL_CSW_ADMIN_USR		       69 24-AUG-13
SPATIAL_WFS_ADMIN_USR		       66 24-AUG-13
----以下省略------

39 rows selected.
Published 10 original articles · Likes0 · Visits 959

Guess you like

Origin blog.csdn.net/weixin_43572702/article/details/103819047