Prereq for golden gate
1) database must be in archivelog mode
SQL>archive log list;
look for space for online redlogfiles and online red0logfiles
2)Enable supplemental logging
database level and object level ,ddl replicaton(schema level)
3)SQL>Select supplemental_log_data_min from v$database;
SQL>alter database add supplemental log data;
SQL>Select supplemental_log_data_min from v$database;
how to enable table supplemental logging at table level
create golden gate user
SQL> create user ggadmin identified by india123;
SQL> grant dba to ggadmin ;
CREATE ONE MORE USER WHOSE SCHEMA WILL BE REPLICATED
SQL>create user syed identified by india123;
SQL>grant connect, resource to syed;
connect syed/india123
SQL>create table mytab (id integer, name varchar2(100));
create primary key
SQL>alter table mytab add primary key (id);
exit
ENABLING SUPPLEMENTAL LOGGING FOR TABLE LEVEL FROM GOLDEN GATE
gg_home}$ ./ggsci
enable supplemental table level logging from golden gate;
DBLOGING
>dblogin userid ggadmin password india123
ENABLING SUPPLEMENTAL LOGGING
>add trandata syed.mytab
for multiples tables of schema
>add trandata syed.*
check golden gate error logfile
vi ggserr.log
How to supplemental logging from database level
Sqlplus / as sysdba
SQL>create table mytab2 (id integer, name varchar(2)(100));
SQL>alter table syed.mytab2 (id integer, name varchar(2)(100));
SQL>alter table syed.mytab2 add primary key (id);
now we will enable supplemental logging for object lever from database
SQL>alter table syed.mytab2 add supplemental log group ggs_mytab2_log (id);
sqlplus / as sysdba
No comments:
Post a Comment