Script to add trandata for GoldenGate

Here is a simple script to check which tables are missing trandata and generate the GG (so call DDL) to enable it on them.

select ‘add trandata ‘||t.owner||’.’||t.table_name stmt
from
(select owner, table_name from dba_tables) t,
(select owner, table_name from dba_log_groups) s
where t.owner = s.owner (+)
and t.table_name = s.table_name (+)
and s.table_name is null
and t.owner in
(‘<schema>’);

 

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