Skip to content
March 11, 2014 / doganay

ADDING STANDBY REDO LOGs

--standby
alter system set standby_file_management=manual;
alter database recover managed standby database cancel;

--primary
select 'alter database add standby logfile thread 1 group ' from dual
union all
select max(group#)+1||'' from v$logfile
union all
select '('''||rtrim (regexp_substr (member, '.*\/'), '/')||'/'||'std_redo01.log'') size ' from v$logfile where rownum<=1
union all
select bytes||';' from v$log where rownum<=1
union all
select 'alter database add standby logfile thread 1 group ' from dual
union all
select max(group#)+2||'' from v$logfile
union all
select '('''||rtrim (regexp_substr (member, '.*\/'), '/')||'/'||'std_redo02.log'') size ' from v$logfile where rownum<=1
union all
select bytes||';' from v$log where rownum<=1;

--standby
alter system set standby_file_management=auto;
alter database recover managed standby database disconnect from session;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: