!!! You need to execute them on each Oracle GoldenGate server !!!
OGG server #1***************************
- ogg-srv01.oracak.ru
1. Create an instruction file with a list of tables for datapump extract prep1
[oracle]$>
. ~/.profile.postgres.gg21
vi $GG/dirprm/ep_rep1.inc
table stock.bonds;
table stock.bonds_arch;
table stock.bonds_setting;
table stock.bonds_setting_arch;
table stock.bonds_zajvka;
table stock.bonds_zajvka_arch;
table stock.client_account;
table stock.client_account_arch;
table stock.dividents;
table stock.job_logs;
table stock.portfolio;
table stock.portfolio_arch;
table stock.quotes;
table stock.quotes_analyst_15m;
table stock.quotes_analyst_1d;
table stock.quotes_analyst_1h;
table stock.quotes_arch;
table stock.quotes_volume;
table stock.quotes_volume_arch;
table stock.report_benefit;
table stock.report_benefit_comparator;
table stock.report_edu;
table stock.report_edu_comparator;
table stock.sdelka;
table stock.sdelka_arch;
table stock.signal;
table stock.signal_arch;
table stock.trading_edu;
table stock.trading_prod;
table stock.trading_prod_arch;
2. Create a datapump extract that reads the local trail and writes to the remote trail ("OGG for Postgres")
[oracle] $>
. ~/.profile.postgres.gg21
./ggsci
add extract ep_rep1, exttrailsource /ggtrail/dbquik1/ab
add rmttrail /ggtrail/dbrep1/ab, extract ep_rep1, megabytes 200
edit param ep_rep1
extract ep_rep1
rmthost ogg-srv01.oracak.com, mgrport 7809
rmttrail /ggtrail/dbrep1/ab
passthru
table ggadmin.HB;
--
INCLUDE ./dirprm/ep_rep1.inc
-- End of parameter file
3. Start the datapump extract prep1 ("OGG for Postgres")
[oracle] $>
. ~/.profile.postgres.gg21
./ggsci
start ep_rep1
4. Create the checkpoint table ("OGG for Oracle")
[oracle] $>
. ~/.profile.oracle.gg19
./ggsci
dblogin useridalias ggadmin_dbrep1
add checkpointtable ggadmin.GGS_CHKPT_RREP1A
5. Create the instruction file with a list of tables for replicat rrep1a
[oracle]$>
. ~/.profile.oracle.gg19
vi $GG/dirprm/r_rep1a.inc
map stock.bonds, target stock.bonds;
map stock.bonds_arch, target stock.bonds_arch;
map stock.bonds_setting, target stock.bonds_setting;
map stock.bonds_setting_arch, target stock.bonds_setting_arch;
map stock.bonds_zajvka, target stock.bonds_zajvka;
map stock.bonds_zajvka_arch, target stock.bonds_zajvka_arch;
map stock.client_account, target stock.client_account;
map stock.client_account_arch, target stock.client_account_arch;
map stock.dividents, target stock.dividents;
map stock.job_logs, target stock.job_logs;
map stock.portfolio, target stock.portfolio;
map stock.portfolio_arch, target stock.portfolio_arch;
map stock.quotes, target stock.quotes;
map stock.quotes_analyst_15m, target stock.quotes_analyst_15m;
map stock.quotes_analyst_1d, target stock.quotes_analyst_1d;
map stock.quotes_analyst_1h, target stock.quotes_analyst_1h;
map stock.quotes_arch, target stock.quotes_arch;
map stock.quotes_volume, target stock.quotes_volume;
map stock.quotes_volume_arch, target stock.quotes_volume_arch;
map stock.report_benefit, target stock.report_benefit;
map stock.report_benefit_comparator, target stock.report_benefit_comparator;
map stock.report_edu, target stock.report_edu;
map stock.report_edu_comparator, target stock.report_edu_comparator;
map stock.sdelka, target stock.sdelka;
map stock.sdelka_arch, target stock.sdelka_arch;
map stock.signal, target stock.signal;
map stock.signal_arch, target stock.signal_arch;
map stock.trading_edu, target stock.trading_edu;
map stock.trading_prod, target stock.trading_prod;
map stock.trading_prod_arch, target stock.trading_prod_arch;
6. Create replicat rrep1a (do not start it yet, the start will be performed only after InitialLoad)
[oracle]$>
. ~/.profile.oracle.gg19
./ggsci
dblogin useridalias ggadmin_dbrep1
add replicat r_rep1a integrated parallel, exttrail /ggtrail/dbrep1/ab, checkpointtable ggadmin.GGS_CHKPT_RREP1A
edit params r_rep1ainfo all
REPLICAT r_rep1a
SETENV (NLS_LANG="AMERICAN_AMERICA.CL8ISO8859P5")
SETENV (NLS_DATE_FORMAT = "YYYY-MM-DD HH24:MI:SS")
USERIDALIAS ggadmin_dbrep1
--
MAP ggadmin.HB, TARGET ggadmin.HB_TARGET, HANDLECOLLISIONS, COLMAP(USEDEFAULTS, INSTANCE_NAME=@STRCAT(@GETENV('GGENVIRONMENT', 'HOSTNAME'), '_', @GETENV('GGENVIRONMENT', 'GROUPNAME')));
--
INCLUDE ./dirprm/r_rep1a.inc
-- End of parameter file
----------------------------------------------------
OGG server #2
***************************
- ogg-srv02.oracak.ru
1. Create an instruction file with a list of tables for datapump extract prep1
[oracle]$>
. ~/.profile.postgres.gg21
vi $GG/dirprm/ep_rep1.inc
table stock.bonds;
table stock.bonds_arch;
table stock.bonds_setting;
table stock.bonds_setting_arch;
table stock.bonds_zajvka;
table stock.bonds_zajvka_arch;
table stock.client_account;
table stock.client_account_arch;
table stock.dividents;
table stock.job_logs;
table stock.portfolio;
table stock.portfolio_arch;
table stock.quotes;
table stock.quotes_analyst_15m;
table stock.quotes_analyst_1d;
table stock.quotes_analyst_1h;
table stock.quotes_arch;
table stock.quotes_volume;
table stock.quotes_volume_arch;
table stock.report_benefit;
table stock.report_benefit_comparator;
table stock.report_edu;
table stock.report_edu_comparator;
table stock.sdelka;
table stock.sdelka_arch;
table stock.signal;
table stock.signal_arch;
table stock.trading_edu;
table stock.trading_prod;
table stock.trading_prod_arch;
2. Create a datapump extract reading the local trail and writing to the remote trail ("OGG for Postgres")
[oracle] $>
. ~/.profile.postgres.gg21
./ggsci
add extract ep_rep1, exttrailsource /ggtrail/dbquik2/ab
add rmttrail /ggtrail/dbrep1/ab, extract ep_rep1, megabytes 200
edit param ep_rep1
extract ep_rep1
rmthost ogg-srv02.oracak.com, mgrport 7809
rmttrail /ggtrail/dbrep1/ab
passthru
table ggadmin.HB;
--
INCLUDE ./dirprm/ep_rep1.inc
-- End of parameter file
3. Start the datapump extract prep1 ("OGG for Postgres")
[oracle] $>
. ~/.profile.postgres.gg21
./ggsci
start ep_rep1
4. Create the checkpoint table ("OGG for Oracle")
[oracle] $>
. ~/.profile.oracle.gg19
./ggsci
dblogin useridalias ggadmin_dbrep1
add checkpointtable ggadmin.GGS_CHKPT_RREP1B
5. Create a file-instruction with a list of tables for replicat rrep1b
[oracle]$>
. ~/.profile.oracle.gg19
vi $GG/dirprm/r_rep1b.inc
map stock.bonds, target stock.bonds;
map stock.bonds_arch, target stock.bonds_arch;
map stock.bonds_setting, target stock.bonds_setting;
map stock.bonds_setting_arch, target stock.bonds_setting_arch;
map stock.bonds_zajvka, target stock.bonds_zajvka;
map stock.bonds_zajvka_arch, target stock.bonds_zajvka_arch;
map stock.client_account, target stock.client_account;
map stock.client_account_arch, target stock.client_account_arch;
map stock.dividents, target stock.dividents;
map stock.job_logs, target stock.job_logs;
map stock.portfolio, target stock.portfolio;
map stock.portfolio_arch, target stock.portfolio_arch;
map stock.quotes, target stock.quotes;
map stock.quotes_analyst_15m, target stock.quotes_analyst_15m;
map stock.quotes_analyst_1d, target stock.quotes_analyst_1d;
map stock.quotes_analyst_1h, target stock.quotes_analyst_1h;
map stock.quotes_arch, target stock.quotes_arch;
map stock.quotes_volume, target stock.quotes_volume;
map stock.quotes_volume_arch, target stock.quotes_volume_arch;
map stock.report_benefit, target stock.report_benefit;
map stock.report_benefit_comparator, target stock.report_benefit_comparator;
map stock.report_edu, target stock.report_edu;
map stock.report_edu_comparator, target stock.report_edu_comparator;
map stock.sdelka, target stock.sdelka;
map stock.sdelka_arch, target stock.sdelka_arch;
map stock.signal, target stock.signal;
map stock.signal_arch, target stock.signal_arch;
map stock.trading_edu, target stock.trading_edu;
map stock.trading_prod, target stock.trading_prod;
map stock.trading_prod_arch, target stock.trading_prod_arch;
6. Create replicat rrep1a (do not start!!!, start will be performed only after InitialLoad)
[oracle]$>
. ~/.profile.oracle.gg19
./ggsci
dblogin useridalias ggadmin_dbrep1
add replicat r_rep1b integrated parallel, exttrail /ggtrail/dbrep1/ab, checkpointtable ggadmin.GGS_CHKPT_RREP1B
edit params r_rep1b
REPLICAT r_rep1bstart replicat r_rep1b
SETENV (NLS_LANG="AMERICAN_AMERICA.CL8ISO8859P5")
SETENV (NLS_DATE_FORMAT = "YYYY-MM-DD HH24:MI:SS")
USERIDALIAS ggadmin_dbrep1
--
MAP ggadmin.HB, TARGET ggadmin.HB_TARGET, HANDLECOLLISIONS, COLMAP(USEDEFAULTS, INSTANCE_NAME=@STRCAT(@GETENV('GGENVIRONMENT', 'HOSTNAME'), '_', @GETENV('GGENVIRONMENT', 'GROUPNAME')));
--
INCLUDE ./dirprm/r_rep1b.inc
-- End of parameter file
info all
<<< Back Next >>>