Search

Multiplexing Redo Log and Control files

-- 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;

1 view0 comments

Recent Posts

See All

Get DDL for Oracle object

set feed off set long 1000000 set longchunksize 1000000 set pages 0 set lines 32767 set trimspool on set feed off set wrap on set serveroutput on format wrapped set def off set tab off exec dbms_metad

Cancelled scheduled concurrent requests

This SQL query returns all concurrent requests that were scheduled in the past and are not scheduled currently. It can be used for identifying scheduled requests that failed to be resubmitted. select

Foreign key constraint violation

/* This PL/SQL script checks violations of foreign key constraints Example of the tables: CREATE TABLE temp_supplier ( supplier_id numeric(10) not null, supplier_name varchar2(50) not null, contact_na