Run the following query and select a GROUP# which its status is INACTIVE.
- Check the inactive group of file
SQL> SELECT G.GROUP#, G.STATUS FROM V$LOG G ORDER BY 1;
GROUP# STATUS
---------- ----------------
1 INACTIVE
2 CURRENT
3 INACTIVE
- Check the location of file group 3 and remove database at OS level.
SQL> col MEMBER for a150
SELECT MEMBER FROM V$LOGFILE WHERE GROUP#=3;
SQL>
MEMBER
----------------------------------------------------------------------------------------------------
/u01/app/oracle/oradata/plm/redo03.log
- Shutdown database
SQL> SHUTDOWN IMMEDIATE ;
Database closed.
Database dismounted.
ORACLE instance shut down.
- Startup , It will through an error.
SQL> STARTUP
ORACLE instance started.
Total System Global Area 2717908992 bytes
Fixed Size 2928104 bytes
Variable Size 704643608 bytes
Database Buffers 1996488704 bytes
Redo Buffers 13848576 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 8227
Session ID: 1 Serial number: 51969
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics
and Real Application Testing options
oracle@suse1:~> sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu May 21 18:17:08 2020
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
- Start database in mount stage
SQL> STARTUP MOUNT;
ORACLE instance started.
Total System Global Area 2717908992 bytes
Fixed Size 2928104 bytes
Variable Size 704643608 bytes
Database Buffers 1996488704 bytes
Redo Buffers 13848576 bytes
Database mounted.
- Clear logfile group3
SQL> ALTER DATABASE CLEAR LOGFILE GROUP 3;
Database altered.
- Open the database
SQL> ALTER DATABASE OPEN;
Database altered.
SQL> @display_logs
NAME Size MB Used MB
------------------------------------------------------------ ---------- ----------
/u01/app/oracle/fast_recovery_area 4560 1379
SQL> ALTER SYSTEM SWITCH LOGFILE;
System altered.
SQL>
SQL> col MEMBER for a30
SELECT G.GROUP#, G.STATUS G_STATUS, M.STATUS M_STATUS, SUBSTR( MEMBER, INSTR(MEMBER,'o1')) MEMBER FROM V$LOG G, V$LOGFILE M WHERE G.GROUP#=M.GROUP# ORDER BY 1;SQL>
GROUP# G_STATUS M_STATU MEMBER
---------- ---------------- ------- ------------------------------
1 INACTIVE /u01/app/oracle/oradata/plm/re
do01.log
2 ACTIVE /u01/app/oracle/oradata/plm/re
do02.log
3 CURRENT /u01/app/oracle/oradata/plm/re
do03.log
SQL> exit
No comments:
Post a Comment