- Oracle Goldengate 11g Complete Cookbook
- Ankur Gupta
- 497字
- 2021-08-04 09:59:53
Configuring an Extract process to read from an Oracle ASM instance
If your source
database is on ASM and the archive logs reside in an ASM diskgroup, the GoldenGate extract requires some additional configuration to be able to read them. In this recipe we will look at the additional parameters that you need to specify in the extract parameter file for this.
How to do it…
The setup required for reading archive logs from ASM depends on the version of the source database.
For Oracle 10gR2 (10.2.0.5 or later) / Oracle 11gR2 (11.2.0.2 or later):
- Modify the extract parameter files to use the
TRANSLOGOPTIONS
parameter:./ggsci EDIT PARAMS EGGTEST1 EXTRACT EGGTEST1 USERID GGATE_ADMIN@DBORATEST, PASSWORD AADAAAAAAAAAAAFAQCFIIDLCUELFNFECLITBSCAHYBBHHEUGKDNICDCCDCFELJDJFFEAUHUBFGWIUJGCAJJDNDPDZEOHGILBIIWCUIBHHGPBKBHB, AES256, ENCRYPTKEY dbkey1 EXTTRAIL /u01/app/ggate/dirdat/st TRANSLOGOPTIONS DBLOGREADER TABLE scott.*;
- Save the file and exit the editor window.
- Start the Extract process:
GGSCI> START EGGTEST1
For Oracle 10gR2 (10.2.0.4 or earlier) / Oracle 11gR2(11.2.0.1 or earlier):
- Add the following entry to
tnsnames.ora
to enable a bequeath connection for ASM:ASM = (DESCRIPTION = (ADDRESS = (PROTOCOL = BEQ) (PROGRAM = <ORACLE_HOME>/bin/oracle) (ARGV0 = oracle+ASM1) (ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))') (ENVS = 'ORACLE_HOME=<ORACLE_HOME>/asm,ORACLE_SID=+ASM1') ) (CONNECT_DATA = (SERVICE_NAME = +ASM) (INSTANCE_NAME = +ASM1)))
- Encrypt the ASM sys user password:
./ggsci encrypt password helloworld AES256, encryptkey dbkey1 Encrypted password: AADAAAAAAAAAAAKAHBABQBPFFEVGRHGIFFBAQHSHGDCHKCTFFCQHKCPCFCKJSGPIPJWDQAGHRCQBZEQFOGUELCTDPDEJMBDJBJWAOGEJJEQHBCEF Algorithm used: AES256
- Modify the process parameter files to use the
TRANSLOGOPTIONS
parameter with an encrypted password:./ggsci EDIT PARAMS EGGTEST1 EXTRACT EGGTEST1 USERID GGATE_ADMIN@DBORATEST, PASSWORD AADAAAAAAAAAAAFAQCFIIDLCUELFNFECLITBSCAHYBBHHEUGKDNICDCCDCFELJDJFFEAUHUBFGWIUJGCAJJDNDPDZEOHGILBIIWCUIBHHGPBKBHB, AES256, ENCRYPTKEY dbkey1 EXTTRAIL /u01/app/ggate/dirdat/st TRANLOGOPTIONS ASMUSER SYS@ASM, ASMPASSWORD AADAAAAAAAAAAAFAQCFIIDLCUELFNFECLITBSCAHYBBHHEUGKDNICDCCDCFELJDJFFEAUHUBFGWIUJGCAJJDNDPDZEOHGILBIIWCUIBHHGPBKBHB, AES256, ENCRYPTKEY dbkey1 TABLE scott.*;
- Save the file and exit the editor window.
- Start the Extract process:
GGSCI> START EGGTEST1
How it works…
For the newer Oracle 10gR2 and 11gR2 versions, GoldenGate connects through the database instance to read the archived log files in the ASM diskgroup. This enables the Extract process to read the archived logs in a much more efficient way than the old way of accessing it directly through an ASM instance.
If your database is on Oracle 10gR2 (10.2.0.5 or earlier) or 11g (11.2.0.1 or earlier), then you must configure an ASM user with sysdba privileges in the extract configuration to enable it to login to an ASM instance and read the redo/archived logs. You can specify the ASM user password in the extract configuration file, however, the best practice is to encrypt the password using the encrypt tool, as done in step 2 in the previous section, and specify the generated key in the parameter files.
Tip
Although in the newer Oracle releases you don't need to configure the ASM user in the extract configuration, it is recommended to configure both the ways to enable the extract to continue processing archived logs in the event of a database instance not being available.
TRANSLOGOPTIONS DBLOGREADER -- TRANSLOGOPTIONS ASMUSER SYS@ASM, PASSWORD *****
If the source
database instance is not available and you still have archived logs which have not yet been mined, you can swap the TRANSLOGOPTIONS
parameters to allow extract to access the ASM instance directly.
- 30天自制操作系統
- Linux操作系統基礎
- 循序漸進學Docker
- Windows Server 2019 Administration Fundamentals
- Windows 8實戰從入門到精通(超值版)
- Advanced Infrastructure Penetration Testing
- μC/OS-III內核實現與應用開發實戰指南:基于STM32
- 大學計算機應用基礎實踐教程(Windows 7+MS Office 2010)
- 鴻蒙入門:HarmonyOS應用開發
- Java EE 8 High Performance
- OpenSolaris紅寶書
- SAP后勤模塊實施攻略:SAP在生產、采購、銷售、物流中的應用
- SQL Server on Azure Virtual Machines
- Windows 10從入門到精通
- TD-SCDMA HSDPA系統設計與組網技術