06.03. Configuring "OGG for Oracle" and creating EXTRACTs estock, pstock

                                                    <<< Back   Next >>>

1. Creating a directory for trail files.
[oracle@ogg-sqv]$>
mkdir -p /gg/ggtrail/db-quik/

2. Configuring "OGG for Oracle"
[oracle@ogg-srv] $> 
. ~/.profile.oracle.gg21
$GG/ggsci
 -- creating directories
create subdirs
-- создание хранилища паролей и добавление пар (логин-пароль) в хранилище
ADD CREDENTIALSTORE
ALTER CREDENTIALSTORE ADD USER ggadmin@dbquik01 PASSWORD *** ALIAS ggadmin_dbquik01
ALTER CREDENTIALSTORE ADD USER ggadmin@dbquik02 PASSWORD *** ALIAS ggadmin_dbquik02
ALTER CREDENTIALSTORE ADD USER ggadmin@ds PASSWORD *** ALIAS ggadmin_ds
INFO CREDENTIALSTORE
-- checking
dblogin useridalias ggadmin_dbquik01
dblogin useridalias ggadmin_dbquik02
dblogin useridalias ggadmin_ds

3. Создать файл параметров для GG Manager
[oracle@ogg-srv] $> 
. ~/.profile.oracle.gg21
$GG/ggsci
edit param mgr
Port 7809
ACCESSRULE, PROG *, ALLOW
AUTORESTART ER *, RETRIES 120, WAITMINUTES 10, RESETMINUTES 1200
-- End of parameter file
start mgr

4. Enable extended logging for dbquik
[oracle@ogg-srv] $> 
. ~/.profile.oracle.gg21
$GG/ggsci
dblogin useridalias ggadmin_dbquik01
ADD TRANDATA STOCK.BONDS
ADD TRANDATA STOCK.BONDS_SETTING
ADD TRANDATA STOCK.BONDS_ZAJVKA
ADD TRANDATA STOCK.CLIENT_ACCOUNT
ADD TRANDATA STOCK.DIVIDENTS
ADD TRANDATA STOCK.JOB_LOGS
ADD TRANDATA STOCK.PORTFOLIO
ADD TRANDATA STOCK.QUOTES
ADD TRANDATA STOCK.QUOTES_ANALYST_15M, cols(dt_trading)
ADD TRANDATA STOCK.QUOTES_ANALYST_1H, cols(dt_trading)
ADD TRANDATA STOCK.QUOTES_ANALYST_1D, cols(dt_trading)
ADD TRANDATA STOCK.QUOTES_VOLUME
ADD TRANDATA STOCK.REPORT_BENEFIT
ADD TRANDATA STOCK.REPORT_BENEFIT_COMPARATOR
ADD TRANDATA STOCK.REPORT_EDU
ADD TRANDATA STOCK.REPORT_EDU_COMPARATOR
ADD TRANDATA STOCK.SDELKA
ADD TRANDATA STOCK.SIGNAL
ADD TRANDATA STOCK.TRADING_EDU
ADD TRANDATA STOCK.TRADING_PROD

-- checking
select g.log_group_name name,
g.owner || '.' || g.table_name table_name,
g.always,
g.generated,
c.column_name
from dba_log_groups g, dba_log_group_columns c
where g.log_group_name = c.log_group_name(+)
and g.table_name = c.table_name(+)
and g.table_name in ('QUOTES_ANALYST_15M','QUOTES_ANALYST_1H','QUOTES_ANALYST_1D')
and g.owner = 'STOCK'
order by 1, 2, 3, 4;

4. Create extract estock (do not start yet)
[oracle@ogg-srv] $> 
. ~/.profile.oracle.gg21
$GG/ggsci
DBLOGIN useridalias ggadmin_dbquik01
MININGDBLOGIN useridalias ggadmin_ds
ADD EXTRACT estock , INTEGRATED TRANLOG, BEGIN NOW
ADD EXTTRAIL /u01/gg/ggtrail/db-quik/aa, EXTRACT estock
REGISTER EXTRACT estock DATABASE
--UNREGISTER EXTRACT estock DATABASE

edit param estock
EXTRACT estock
USERIDALIAS ggadmin_dbquik01
TRANLOGOPTIONS MININGUSERALIAS ggadmin_ds
EXTTRAIL /u01/gg/ggtrail/db-quik/aa
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 ADD CONSTRAINT;
TABLE STOCK.REPORT_EDU_COMPARATOR;
TABLE STOCK.SDELKA;
TABLE STOCK.SIGNAL;
TABLE STOCK.TRADING_EDU;
TABLE STOCK.TRADING_PROD;

5. Create a datapump extract that reads from the local trail and writes to the remote trail ("OGG for Postgres"), but do not start yet.
[oracle@ogg-srv] $>
. ~/.profile.oracle.gg21
$GG/ggsci
add extract pstock, exttrailsource /u01/gg/ggtrail/db-quik/aa
add rmttrail /u01/gg/ggtrail/db-pgsql/aa, extract pstock, megabytes 200
edit param pstock
extract pstock
rmthost app-ogg, mgrport 7831
rmttrail /u01/gg/ggtrail/db-pgsql/aa
passthru
--
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
                                                    <<< Back   Next >>>