-- List redo log files
select group#, member from v$logfile order by group#, member;
-- Check redo log file status
select group#, members, status from v$log;
-- Adding redo log file to a group
alter database add logfile member '<path>/redo011.log' to group 1;
-- Drop redo log file
-- Ensure that the file is not current
alter database drop logfile member '<path>/redo011.log';
-- Adding redo log group
alter database add logfile group 2 '<path>/redo21.log' size 100M;
-- Switch redo log file
alter system switch logfile;
-- Redo log files history
select * from v$log_history;
-- Show control files
show parameter control_files;
-- Add control file
alter system set control_files ='<path>/control01.ctl', '<path>/control02.ctl' scope=spfile;
shutdown immediate
host cp <path>/control01.ctl <path>/control02.ctl
startup
-- List files that need recovery
select * from v$recover_file;
-- Check archive mode
archive log list;
-- Find archive destination
show parameter db_recovery_file_dest
-- Set archive destination
alter system set log_archive_dest_1='LOCATION=<path>' scope=spfile;
-- Enable archive mode
-- Database should be mounted
alter database archive log;
Comments