玉祥平台客服-15087858732

标题: Oracle数据库清理日志 [打印本页]

作者: 张兴康    时间: 2020-6-24 14:13
标题: Oracle数据库清理日志
ORA-01033: ORACLE 正在初始化或关闭时

打开sqlsplus.exe清理日志,一般在D:\oracle\product\10.2.0\db_1\BIN路劲下。根据具体的安装路径。

1、首先输入用户名密码连接数据库,密码是看不见的

Enter user-name: conn /as sysdba
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options


2、再次连接
SQL> conn /as sysdba
Connected.

3、打开数据库
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01531: a database already open by the instance


4、查日志
SQL> select group#,sequence#,archived,status from v$log;

    GROUP#  SEQUENCE# ARC STATUS
---------- ---------- --- ----------------
         1       4911 NO  INACTIVE
         2       4912 NO  INACTIVE
         3       4913 NO  CURRENT

根据显示的1、2、3分别清理日志
SQL> alter database clear unarchived logfile group 1;
Database altered.

SQL> alter database clear unarchived logfile group 2;
Database altered.


SQL> alter database clear unarchived logfile group 3;
alter database clear unarchived logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance orcl (thread 1)
ORA-00312: online log 3 thread 1:
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG'

作者: 张兴康    时间: 2020-6-24 14:14

作者: fteair    时间: 2020-6-24 17:06

作者: 张兴康    时间: 2020-6-25 14:12
fteair 发表于 2018-1-24 17:06


作者: caixuqad    时间: 2020-6-25 14:27

作者: fteair    时间: 2020-6-25 17:18

作者: 张兴康    时间: 2020-6-26 14:12

作者: fteair    时间: 2020-6-26 15:23

作者: caixuqad    时间: 2020-6-26 15:49

作者: 张兴康    时间: 2020-6-29 15:31





欢迎光临 玉祥平台客服-15087858732 (http://bbs.delit.cn/) Powered by Discuz! X3.2