Script to enable all table logging mode

Script to enable all table in logging mode

It will help in DR System when you want to spike any table from logging such as any log table you maintained which data is not important for you.

Script do for HR schema:

begin
for r in ( select table_name from dba_tables where owner='HR' and logging='NO')
loop
execute immediate 'alter table hr.'|| r.table_name ||' LOGGING';
end loop;
end;
/

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