OGG server #1
***************************- ogg-srv01.oracak.com
1. Creating a directory for trail files.
[oracle]$>
mkdir -p /ggtrail/dbquik1
rm -fr /ggtrail/dbquik1/*
2. Creating an instruction with a list of tables for Extract e_quik1
-- Get the list of tables
-- SELECT 'table stock."'||table_name||'";' FROM information_schema.tables WHERE table_schema = 'stock' order by table_name;
[oracle] $>
. ~/.profile.postgres.gg21
vi $GG/dirprm/e_quik1.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;
3. Creating extract e_quik1
[oracle] $>
. ~/.profile.postgres.gg21
./ggsci
dblogin sourcedb gg_dbquik1 useridalias ggadmin
add extract e_quik1, tranlog, begin now
add exttrail /ggtrail/dbquik1/ab, extract e_quik1, megabytes 200
info all
edit param e_quik1
extract e_quik1start e_quik1
sourcedb gg_dbquik1 useridalias ggadmin
exttrail /ggtrail/dbquik1/ab
ignorereplicates
tranlogoptions filtertable ggadmin.ckpt_01
DiscardFile ./dirrpt/e_quik1.dsc, megabytes 200
--
table ggadmin.HB;
--
INCLUDE ./dirprm/e_quik1.inc
-- End of parameter file
4. Create an instruction with the list of tables for Replicat r_quik2
-- Get the list of tables
-- SELECT 'map stock."'||table_name||'", target stock."'||table_name||'";' FROM information_schema.tables WHERE table_schema = 'stock' order by table_name;
[oracle] $>
. ~/.profile.postgres.gg21
vi $GG/dirprm/r_quik2.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;
5. создание replicat r_quik2 (пока не стартуем, необходимо провести InitialLoad)
[oracle] $>
. ~/.profile.postgres.gg21
./ggsci
dblogin sourcedb gg_dbquik2 useridalias ggadmin
add replicat r_quik2, exttrail /ggtrail/dbquik1/ab, checkpointtable ggadmin.ckpt_02
edit params r_quik2
replicat r_quik2
targetdb gg_dbquik2 useridalias ggadmin
--
map ggadmin.HB, TARGET ggadmin.HB_TARGET, HANDLECOLLISIONS, COLMAP(USEDEFAULTS, INSTANCE_NAME=@STRCAT(@GETENV('GGENVIRONMENT', 'HOSTNAME'), '_', @GETENV('GGENVIRONMENT', 'GROUPNAME')));
--
INCLUDE ./dirprm/r_quik2.inc
-- End of parameter file
6. Getting current status
. ~/.profile.postgres.gg21
./ggsci
info all
<<< Back Next >>>