4.2 高级特性(2) -加密

1.对密码进行加密

GGSCI (db11) 3> ENCRYPT PASSWORD ogg ENCRYPTKEY DEFAULT
Using default key...

Encrypted password: AACAAAAAAAAAAADAHBLDCCIIOIRFNEPB
Algorithm used: BLOWFISH

得到加密的秘密后,修改参数文件

USERID ogg, PASSWORD "AACAAAAAAAAAAADAHBLDCCIIOIRFNEPB", ENCRYPTKEY default

 

用法举例:

2.加密trail文件

在参数文件中添加参数ENCRYPTTRAIL和DECRYPTTRAIL

先在源段的抽取进程参数文件中添加参数ENCRYPTTRAIL,这个参数一定要加载要加密的trail file之前

GGSCI (db11) 11> view param lhremd1



EXTRACT lhremd1

setenv(NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

USERID ogg, PASSWORD "AACAAAAAAAAAAADAHBLDCCIIOIRFNEPB", ENCRYPTKEY default

ReportCount Every 100 RECORDS, Rate 

Report at 22:45

ReportRollover at 21:57

DiscardFile dirrpt/LHREMD1.dsc, Append

DiscardRollover at 02:00 ON SUNDAY

DBOPTIONS ALLOWNOLOGGING 

ENCRYPTTRAIL EXTTRAIL ./dirdat/l1

TABLE hr.T; 

 

 

然后再在投递进程参数文件中进行解密后再加密远程trail file

GGSCI (db11) 13> view param phremd1



Extract PHREMD1 

------------------------------------------------------------------- 

-- Data Pump extract for HR schema 

------------------------------------------------------------------- 

PassThru 

DECRYPTTRAIL ENCRYPTTRAIL 

RmtHost 192.168.1.3, MgrPort 7809 

RmtTrail dirdat/l2 

Table HR.* ;

 

最后在目标端进行解密

GGSCI (10gasm) 9> view param rhremd1



Replicat RHREMD1 

------------------------------------------------------------------- 

-- Replicat for HR Schema 

------------------------------------------------------------------- 

SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8) 

USERID ogg, PASSWORD ogg

DiscardFile dirrpt/LHREMD1.dsc, Append 

DiscardRollover at 02:00 ON SUNDAY

HandleCollisions 

AssumeTargetDefs 

DECRYPTTRAIL

Map HR.T, Target HR.T ; 

 

重启所有的进程!

 

你可能感兴趣的:(加密)