Applies To
All Users
Summary
The purpose of this document is to demonstrate how to identify and remove online redo log files belonging to a RAC instance that has been removed from the cluster
(e.g. via srvctl remove instance -d <dbname> -i <inst_name>).
When all the log files of the related thread are dropped, the thread will be removed from v$thread.
Please note the preferred method to remove an instance is using dbca, this tool will automatically remove the instance related online redo logs, undo tablespaces and parameters.
Solution
1.) Disable the redo log thread of the removed instance:
alter database disable instance '<name of removed instance>';
2.) Check that the thread is disabled using:
select INSTANCE,THREAD#,STATUS,ENABLED from v$thread where INSTANCE = '<name of removed instance>';
3.) Archive the active logs (if any) from the removed instance:
alter system archive log instance '<name of removed instance>' all;
Note: this may report:
ORA-00263: there are no logs that need archiving for thread <n>
which can be ignored.
4.) Find all redo log groups belonging to the thread of the removed instance:
col instance format a15
col status format a10
col archived format a8
select a.INSTANCE,a.THREAD#,a.STATUS "Thread Status",b.group#,b.archived,b.status "Log Status"
from vthread a, vlog b
where a.THREAD# = b.THREAD# and a.INSTANCE = '<name of removed instance>';
5.) And then drop them:
if you later want to remove the actual file at the filesystem or ASM level then query v$logfile first:
select member from v$logfile where GROUP# = <n>;
then drop the group:
alter database drop logfile group <n>;
It is also necessary to remove the UNDO tablespace and instance specific parameters of the removed instance to complete the task.
Attachments :