[oracle@ogg-sqv]$>
mkdir -p /gg/ggtrail/db-quik/
2. Configuring "OGG for Oracle"
[oracle@ogg-srv] $>
. ~/.profile.oracle.gg21
$GG/ggsci
$GG/ggsci
-- creating directories
create subdirs
-- создание хранилища паролей и добавление пар (логин-пароль) в хранилище
ADD CREDENTIALSTOREALTER CREDENTIALSTORE ADD USER ggadmin@dbquik01 PASSWORD *** ALIAS ggadmin_dbquik01ALTER CREDENTIALSTORE ADD USER ggadmin@dbquik02 PASSWORD *** ALIAS ggadmin_dbquik02ALTER CREDENTIALSTORE ADD USER ggadmin@ds PASSWORD *** ALIAS ggadmin_dsINFO CREDENTIALSTORE-- checkingdblogin useridalias ggadmin_dbquik01dblogin useridalias ggadmin_dbquik02dblogin useridalias ggadmin_ds
3. Создать файл параметров для GG Manager
[oracle@ogg-srv] $>
. ~/.profile.oracle.gg21
$GG/ggsci
$GG/ggsci
edit param mgr
Port 7809ACCESSRULE, PROG *, ALLOWAUTORESTART 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/ggscidblogin useridalias ggadmin_dbquik01ADD TRANDATA STOCK.BONDSADD TRANDATA STOCK.BONDS_SETTINGADD TRANDATA STOCK.BONDS_ZAJVKAADD TRANDATA STOCK.CLIENT_ACCOUNTADD TRANDATA STOCK.DIVIDENTSADD TRANDATA STOCK.JOB_LOGSADD TRANDATA STOCK.PORTFOLIOADD TRANDATA STOCK.QUOTESADD 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_VOLUMEADD TRANDATA STOCK.REPORT_BENEFITADD TRANDATA STOCK.REPORT_BENEFIT_COMPARATORADD TRANDATA STOCK.REPORT_EDUADD TRANDATA STOCK.REPORT_EDU_COMPARATORADD TRANDATA STOCK.SDELKAADD TRANDATA STOCK.SIGNALADD TRANDATA STOCK.TRADING_EDUADD 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
$GG/ggsci
DBLOGIN useridalias ggadmin_dbquik01MININGDBLOGIN useridalias ggadmin_dsADD EXTRACT estock , INTEGRATED TRANLOG, BEGIN NOWADD EXTTRAIL /u01/gg/ggtrail/db-quik/aa, EXTRACT estockREGISTER EXTRACT estock DATABASE--UNREGISTER EXTRACT estock DATABASE
edit param estockEXTRACT estockUSERIDALIAS ggadmin_dbquik01TRANLOGOPTIONS MININGUSERALIAS ggadmin_dsEXTTRAIL /u01/gg/ggtrail/db-quik/aaTABLE 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/aaadd rmttrail /u01/gg/ggtrail/db-pgsql/aa, extract pstock, megabytes 200edit param pstockextract pstockrmthost app-ogg, mgrport 7831rmttrail /u01/gg/ggtrail/db-pgsql/aapassthru--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