Encrypting *ONLY* Password in a Command or Parameter File (OLD Classic Method)
=========================================================================
This method is an Alternative option Of CREDENTIALSTORE for Encrypting Passwords .You can use CREDENTIALSTORE(which is discussed in another article) method for this operation as well .So let's begin this process.
Here we will need below things to start this process
=> Password ( That is going to be encrypted)
=> Keygen (To generate Random Encrypted Keys)
=> ENCKEYS (User defined filed ,that will hold all above generated Random Keys)
Step 1=> Create Random key using KEYGEN command as below
[oracle@HOST12C2020 gg_home]$ cd $GG_HOME
[oracle@HOST12C2020 gg_home]$ ./keygen 128 1
0x5DF78718F37FD21BB2697B5ECCC50764
[oracle@HOST12C2020 gg_home]$
Step 2=> Create ENCKEYS file in GG_HOME directory and copy above key in file as below
[oracle@HOST12C2020 gg_home]$ cat ENCKEYS
# KeyName KeyValue
ggkey 0x5DF78718F37FD21BB2697B5ECCC50764
[oracle@HOST12C2020 gg_home]$ ls -lrt ENCKEYS
-rw-r--r--. 1 oracle oinstall 60 May 24 16:37 ENCKEYS
Step 3=> Let we ENCRYPT Password using below command
[oracle@HOST12C2020 gg_home]$ ./ggsci GGSCI (HOST12C2020) 1> ENCRYPT PASSWORD ggsource AES128 ENCRYPTKEY ggkey Encrypted password: AADAAAAAAAAAAAIARIHASGODKDZFIAZISDJDGBNIOHZADDHFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Algorithm used: AES128 GGSCI (HOST12C2020) >
Step 4=> Copy above generate Encrypted password (in step3)at DBLOGIN options and test if everything okay
GGSCI (HOST12C2020) > dblogin userid ggsource password AADAAAAAAAAAAAIARIHASGODKDZFIAZISDJDGBNIOHZADDHFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AES128 ENCRYPTKEY ggkey Successfully logged into database. GGSCI (HOST12C2020 as ggsource@NCDB) 4> GGSCI (HOST12C2020 as ggsource@NCDB) 4> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING DPUMP1 00:00:00 00:00:00 EXTRACT RUNNING EXT1 00:00:00 00:00:04 REPLICAT RUNNING REP2 00:00:00 00:00:01
Step 5=> Now we will copy above Encrytped password in parameter files as below and test.
GGSCI (HOST12C2020 as ggsource@NCDB) 21> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING DPUMP1 00:00:00 00:00:05
EXTRACT RUNNING EXT1 00:00:00 00:00:07
REPLICAT RUNNING REP2 00:00:00 00:00:07
GGSCI (HOST12C2020 as ggsource@NCDB) 22> view params EXT1
EXTRACT ext1
USERID ggsource@NCDB password AADAAAAAAAAAAAIARIHASGODKDZFIAZISDJDGBNIOHZADDHFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AES128 ENCRYPTKEY ggkey
--USERID ggsource@NCDB password ggsource
--USERIDALIAS ggncdb
EXTTRAIL /u01/app/oracle/gg_home/dirdat/tt
TRANLOGOPTIONS EXCLUDEUSER ggsource
TABLE dbsource.*;
GGSCI (HOST12C2020 as ggsource@NCDB) 23> view params DPUMP1
EXTRACT dpump1
--USERIDALIAS ggncdb
--USERID ggsource@NCDB, PASSWORD ggsource
userid ggsource@NCDB password AADAAAAAAAAAAAIARIHASGODKDZFIAZISDJDGBNIOHZADDHFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AES128 ENCRYPTKEY ggkey
RMTHOST HOST12C2021, MGRPORT 7809
RMTTRAIL /u01/app/oracle/gg_home/dirdat/uu
TABLE dbsource.*;
GGSCI (HOST12C2020 as ggsource@NCDB) 24> view params REP2
REPLICAT rep2
ASSUMETARGETDEFS
--USERIDALIAS ggncdb
--USERID ggsource@NCDB PASSWORD ggsource
userid ggsource@NCDB password AADAAAAAAAAAAAIARIHASGODKDZFIAZISDJDGBNIOHZADDHFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AES128 ENCRYPTKEY ggkey
REPERROR(1403,IGNORE)
DDL INCLUDE ALL
DDLERROR DEFAULT IGNORE
MAP dbtarget.*,TARGET dbsource.*;
GGSCI (HOST12C2020 as ggsource@NCDB) 25>
Step 6=> Stop / Start all process and Test.
GGSCI (HOST12C2020 as ggsource@NCDB) 25> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING DPUMP1 00:00:00 00:00:09 EXTRACT RUNNING EXT1 00:00:00 00:00:08 REPLICAT RUNNING REP2 00:00:00 00:00:02 GGSCI (HOST12C2020 as ggsource@NCDB) 26> Everthing is fine and Smooth ***Our practice Completed now *** Cheers !!!!
© 2021 Ace2Oracle. All Rights Reserved | Developed By IBOX444