[oracle@ogg-srv] $>
. ~/.profile.oracle.gg21
$GG/ggsci
START EXTRACT estock
INFO EXTRACT estock DETAIL
2. start extract datapump pstock ("OGG for Oracle")
[oracle@ogg-srv] $>
. ~/.profile.oracle.gg21
$GG/ggsci
start pstock
3. Disable replicat rstock (or ensure it is disabled)
[oracle@ogg-srv] $>
. ~/.profile.postgres.gg21
$GG/ggsci
dblogin sourcedb gg_dbquik useridalias ggadmin
stop replicat rstock
info all
4. Stop applying logs on the Oracle database server db-ora02 (STANDBY)
[oracle@db-ora02]$>
sqlplus / as sysdba
alter database recover managed standby database cancel;
5. Get the current SCN on the Oracle database server db-ora02 (STANDBY)
[oracle@db-ora02]$>
sqlplus / as sysdba
select CURRENT_SCN from v$database;
1408986655
6. Create the initial-load datapump extract i_estock
[oracle@ogg-srv] $>
. ~/.profile.oracle.gg21
$GG/ggsci
DBLOGIN useridalias ggadmin_dbquik02
ADD EXTRACT i_estock, SOURCEISTABLE
edit param i_estock
EXTRACT i_estock
USERIDALIAS ggadmin_dbquik02
RMTHOST app-ogg, mgrport 7831
RMTTASK REPLICAT, GROUP i_rstock
--
TABLE STOCK.BONDS;
TABLE STOCK.BONDS_SETTING;
TABLE STOCK.BONDS_ZAJVKA;
TABLE STOCK.CLIENT_ACCOUNT;
TABLE STOCK.DIVIDENTS;
TABLE STOCK.JOB_LOGS;
TABLE STOCK.PORTFOLIO;
TABLE STOCK.QUOTES;
TABLE STOCK.QUOTES_ANALYST_15M;
TABLE STOCK.QUOTES_ANALYST_1H;
TABLE STOCK.QUOTES_ANALYST_1D;
TABLE STOCK.QUOTES_VOLUME;
TABLE STOCK.REPORT_BENEFIT;
TABLE STOCK.REPORT_BENEFIT_COMPARATOR;
TABLE STOCK.REPORT_EDU;
TABLE STOCK.REPORT_EDU_COMPARATOR;
TABLE STOCK.SDELKA;
TABLE STOCK.SIGNAL;
TABLE STOCK.TRADING_EDU;
TABLE STOCK.TRADING_PROD;
-- End of parameter file
7. Create the inital-load replicate i_rstock
[oracle@ogg-srv] $>
. ~/.profile.postgres.gg21
$GG/ggsci
dblogin sourcedb gg_dbquik useridalias ggadmin
add replicat i_rstock, SPECIALRUN
edit param i_rstock
replicat i_rstock
TARGETDB gg_dbquik, USERIDALIAS ggadmin
ASSUMETARGETDEFS
--
map STOCK.BONDS, target STOCK.BONDS;
map STOCK.BONDS_SETTING, target STOCK.BONDS_SETTING;
map STOCK.BONDS_ZAJVKA, target STOCK.BONDS_ZAJVKA;
map STOCK.CLIENT_ACCOUNT, target STOCK.CLIENT_ACCOUNT;
map STOCK.DIVIDENTS, target STOCK.DIVIDENTS;
map STOCK.JOB_LOGS, target STOCK.JOB_LOGS;
map STOCK.PORTFOLIO, target STOCK.PORTFOLIO;
map STOCK.QUOTES, target STOCK.QUOTES;
map STOCK.QUOTES_ANALYST_15M, target STOCK.QUOTES_ANALYST_15M;
map STOCK.QUOTES_ANALYST_1H, target STOCK.QUOTES_ANALYST_1H;
map STOCK.QUOTES_ANALYST_1D, target STOCK.QUOTES_ANALYST_1D;
map STOCK.QUOTES_VOLUME, target STOCK.QUOTES_VOLUME;
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.SIGNAL, target STOCK.SIGNAL;
map STOCK.TRADING_EDU, target STOCK.TRADING_EDU;
map STOCK.TRADING_PROD, target STOCK.TRADING_PROD;
8. Start the Initial Load Extract
[oracle@ogg-srv] $>
. ~/.profile.oracle.gg21
$GG/ggsci
start extract i_estock
--- !!!
--- Do NOT start the initial load Replicat.
--- The Manager process starts it automatically and terminates it when the load is finished.
9. Check the report on the target system, to find out if the data load is finished.
[oracle@ogg-srv] $>
. ~/.profile.oracle.gg21
$GG/ggsci
info i_estock
info i_rstock
VIEW REPORT i_estock
VIEW REPORT i_rstock
10. Checking the number of rows in tables
-- Postgres
-- Oracle
select 'BONDS',count(*) from STOCK.BONDS union
select 'BONDS_SETTING',count(*) from STOCK.BONDS_SETTING union
select 'BONDS_ZAJVKA',count(*) from STOCK.BONDS_ZAJVKA union
select 'CLIENT_ACCOUNT',count(*) from STOCK.CLIENT_ACCOUNT union
select 'DIVIDENTS',count(*) from STOCK.DIVIDENTS union
select 'JOB_LOGS',count(*) from STOCK.JOB_LOGS union
select 'PORTFOLIO',count(*) from STOCK.PORTFOLIO union
select 'QUOTES',count(*) from STOCK.QUOTES union
select 'QUOTES_ANALYST_15M',count(*) from STOCK.QUOTES_ANALYST_15M union
select 'QUOTES_ANALYST_1H',count(*) from STOCK.QUOTES_ANALYST_1H union
select 'QUOTES_ANALYST_1D',count(*) from STOCK.QUOTES_ANALYST_1D union
select 'QUOTES_VOLUME',count(*) from STOCK.QUOTES_VOLUME union
select 'REPORT_BENEFIT',count(*) from STOCK.REPORT_BENEFIT union
select 'REPORT_BENEFIT_COMPARATOR',count(*) from STOCK.REPORT_BENEFIT_COMPARATOR union
select 'REPORT_EDU',count(*) from STOCK.REPORT_EDU union
select 'REPORT_EDU_COMPARATOR',count(*) from STOCK.REPORT_EDU_COMPARATOR union
select 'SDELKA',count(*) from STOCK.SDELKA union
select 'SIGNAL',count(*) from STOCK.SIGNAL union
select 'TRADING_EDU',count(*) from STOCK.TRADING_EDU union
select 'TRADING_PROD',count(*) from STOCK.TRADING_PROD order by 1;
<<< Back Next >>>