1. 程式人生 > >Oracle Golden Gate 系列四 -- GG 安裝 與 解除安裝 理論知識

Oracle Golden Gate 系列四 -- GG 安裝 與 解除安裝 理論知識

在前面的幾篇裡講了GG的系統需求及支援的物件型別, 在這裡看下GG的安裝與解除安裝的理論知識,這裡只介紹Linux 平臺的說明,其他平臺的自己參看官方文件。

一.GG 安裝說明

To install Oracle GoldenGate , the following steps arerequired:

(1)    Downloading Oracle GoldenGate

(2)    Setting ORACLE_HOME andORACLE_SID

(3)    Setting library paths fordynamic builds

(4)    Installing the OracleGoldenGate software

(5)    Installing support for Oraclesequences

(6)    (Optional) Installing OracleGoldenGate DDL support

1.1 Downloading Oracle GoldenGate

1.2 Setting ORACLE_HOME and ORACLE_SID

Make certain that the ORACLE_HOME and ORACLE_SID system environment variables are set to thecorrect Oracle instance. The Oracle GoldenGate processes refer to them when connectingto the database.

To specify Oraclevariables on UNIX-based systems

(1) If there is one instance of Oracleon the system, set ORACLE_HOME and ORACLE_SID at the system level. If youcannot set them that way, use the following SETENV statements in the parameterfile of every Extract and Replicat group that will be connecting to the instance.

       --如果只是一個instance,那麼在系統級別設定ORACLE_HOME和ORACLE_SID,如果不能設定,可以設定GG  Extract 和Replicat 組的SETENV 引數。

SETENV (ORACLE_HOME = “<path to Oraclehome location>”)

SETENV (ORACLE_SID = “<SID>”)

The SETENV parametersoverride the system settings and allow the Oracle GoldenGate process to set thevariables at the session level when it connects to the database.

--SETENV 引數會覆蓋系統級別的設定。

(2) If there are multiple Oracleinstances on the system with Extract and Replicat processes connecting to them,you will need to use a SETENV statement in the parameter file of each processgroup and point it to the correct instance. For example, the following showsparameter files for two Extract groups, each capturing from a different Oracleinstance.

       --如果有多個instance,那麼就需要對每個Extract 和 Replicat程序組設定SETENV 引數。

Group 1:

EXTRACT ora9a

SETENV (ORACLE_HOME =“/home/oracle/ora9/product”)

SETENV (ORACLE_SID = “ora9a”)

USERID ggsa, PASSWORD ggsa

RMTHOST sysb

RMTTRAIL /home/ggs/dirdat/rt

TABLE hr.emp;

TABLE hr.salary;

Group 2:

EXTRACT ora9b

SETENV (ORACLE_HOME =“/home/oracle/ora9/product”)

SETENV (ORACLE_SID = “ora9b”)

USERID ggsb, PASSWORD ggsb

RMTHOST sysb

RMTTRAIL /home/ggs/dirdat/st

TABLE fin.sales;

TABLE fin.cust;

1.3 Setting library paths for dynamic builds on UNIX

Oracle GoldenGate uses shared libraries. When you install Oracle GoldenGate on a UNIX system,the following must be true before you run GGSCI or any other Oracle GoldenGate process.

--GG 需要使用shared libraries,所以在使用GG 之前,要先確保如下選項

1.3.1. When OracleGoldenGate connects to the database locally, all of the following must have thesame bit type, either all 32-bit, all 64-bit, or all IA64:

1) OracleGoldenGate version

2)  Oracle library versions

3)  Database versions

       --如果GG 連線到本地的database,要學到以上的幾種軟體版本要一致。

1.3.2. When OracleGoldenGate connects through SQL*Net, the Oracle client library and the OracleGoldenGate build must match.This means that the Oracleversion, the bit type (32-bit, 64-bit, IA64) and the operating system versionall must match. If you are using the TRANLOGOPTIONS parameter with the LOGSOURCEoption and Oracle GoldenGate connects to transaction logs from a different operatingsystem, the Oracle versions must also be the same.

1.3.3. Make certain thatthe database libraries are added to the shared-library environment variables ofthe system.This procedure is usually performed atdatabase installation time. Consult your Database Administrator if you have anyquestions.

       --確保資料庫的library 新增到了系統的變數裡。

即引數:

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;export LD_LIBRARY_PATH

1.3.4. If you will be running an OracleGoldenGate program from outside the Oracle GoldenGate installation directory ona UNIX system:

(1) (Optional) Add the OracleGoldenGate installation directory to the PATH environment variable.

(2)(Required) Add the OracleGoldenGate installation directory to the sharedlibraries environment variable.

For example,given an Oracle GoldenGate installation directory of /users/ogg, the second commandin the following example requires these variables to be set:

Command                       RequiresGG libraries in environment variable?

$ users/ogg > ./ggsci No

$ users > ./ogg/ggsci Yes

To set the variables in Korn shell

PATH=<installation directory>:$PATH

export PATH

<shared librariesvariable>=<absolute path of installation directory>:$<sharedlibraries variable>

export <shared libraries variable>

To set the variables in Bourne shell

export PATH=<installation directory>:$PATH

export <shared librariesvariable>=<absolute path of installation directory>:$<sharedlibraries variable>

To set the variables in C shell

setenv PATH <installation directory>:$PATH

setenv <shared libraries variable><absolute path of installation directory>:$<shared librariesvariable>

Where: <sharedlibraries variable> is one of the following:

 

Example:

 exportLD_LIBRARY_PATH=/ggs/10.0:$LD_LIBRARY_PATH

NOTE:

To view thelibraries that are required by an Oracle GoldenGate process, use the ldd<process> shell command before starting the process. This command also showsan error message for any that are missing.

1.4 Installing Oracle GoldenGate on Linux and UNIX

1.4.1 Installing Oracle GoldenGate into a Linux or UNIX cluster

Follow these guidelines if installing intoa cluster configuration:

(1) Install the Oracle GoldenGatebinaries and files on a file system that is available to all cluster nodes,according to the directions that follow.

(2) After installing OracleGoldenGate, configure the Manager process within the cluster application, asdirected by the cluster documentation, so that Oracle GoldenGate will fail overproperly with the other applications.

1.4.2 Installing the Oracle GoldenGate files

1. Extract the Oracle GoldenGate mediapack.zipfile to the system and directory where you want Oracle GoldenGate to beinstalled.

2. Run the command shell.

3. Change directories to the new OracleGoldenGate directory.

4. From the Oracle GoldenGate directory,run the GGSCI program.

GGSCI

5. In GGSCI, issue the following command tocreate the Oracle GoldenGate working directories.

CREATE SUBDIRS

6. Issue the following command to exitGGSCI.

EXIT

1.5 Installing support for Oracle sequences

To support Oracle sequences, you must install some database procedures. These proceduressupport the Oracle GoldenGate FLUSH SEQUENCE command, which you issue immediatelyafter you start the Oracle GoldenGate processes for the first time (typically whenyou perform the initial data synchronization procedure).

To install Oracle sequence objects

Follow these instructions on the source andtarget systems.

1. On the source and target Oracle systems,connect to SQL*Plus as SYSDBA.

2. If you already assigned a database userto support the Oracle GoldenGate DDL replication feature, you can skip thisstep. Otherwise, on both systems create a database user that can also be theDDL user.

SQL> CREATE USER DDLuser IDENTIFIED BY password;

SQL> GRANT CONNECT,RESOURCE,DBA TO DDLuser;

       --在沒有啟用DDL的情況下執行次操作,如果已經啟用,跳過。

3. From the Oracle GoldenGate installationdirectory, run GGSCI.

4. In GGSCI, issue the following command.

EDIT PARAMS./GLOBALS

5. In the file, enter the GGSCHEMA parameterand specify the schema of the DDL user that you created earlier in thisprocedure.

GGSCHEMA <schema>

6. Save and close the file.

7. On both systems, run the sequence.sql scriptfrom the root of the Oracle GoldenGate installation directory. This scriptcreates some procedures for use by Oracle GoldenGate processes. (Do not runthem yourself.) You are prompted for the user information that you created inthe first step.

SQL> @sequence.sql

       --在所有系統餓GG根目錄下執行sequence.sql 指令碼,該指令碼會為GG 程序建立一些過程。

8. On the source system, grant EXECUTE privilegeon the updateSequence procedure to a database user that can be used to issuethe DBLOGIN command. Remember or record this user. You use DBLOGIN to log intothe database prior to issuing the FLUSH SEQUENCE command, which calls theprocedure.

SQL> GRANT EXECUTE on DDLuser.updateSequenceTO DBLOGINuser;

       --在source 端,賦許可權

9. On the target system, grant EXECUTE privilegeon the replicateSequence procedure to the Replicat database user.

SQL> GRANT EXECUTE on DDLuser.replicateSequenceTO Replicatuser;

       --在target 端賦權。

1.6 Configuring Manager and other processes

To configureOracle GoldenGate to support your business requirements, It containsinstructions to:

(1)    Configure the Manager processwith a TCP/IP port and other optional parameters that control dynamic portassignments, trail file maintenance, automatic startup, and other properties.

(2)    Configure Extract and Replicatprocesses to support reporting, high availability, disaster recovery, and othertopologies.

(3)    Configure security to controluser access, file security, and data encryption.

(4)    Configure integration,manipulation, and conversion features that enable you to customize OracleGoldenGate and support the delivery of data across heterogeneous environments.

(5)    Configure utilities and othertools that support Oracle GoldenGate.

二.啟用GG 對DDL 操作的支援

DDL support forsequences (CREATE, ALTER, DROP, RENAME) is compatible with, but not requiredfor, replicating the sequence values themselves. To replicate just sequencevalues, you do not need to install the Oracle GoldenGate DDL support environment. You can just use the SEQUENCE parameter.

2.1 Overview of the DDL objects

To install theOracle GoldenGate DDL environment, you will be installing the database objectsshown in Table 7.

--啟用DDL 需要安裝以下的物件。

2.2 Oracle GoldenGate DDL objects in an Oracle standby configuration

In a physical orlogical Oracle standby configuration, the Oracle GoldenGate DDL objects arepropagated by the Oracle system (along with the other changes) from the primaryserver to the standby server. The Oracle GoldenGate DDL trigger will performits function on either the primary server or the logical standby server, butnot on a physical standby server, and only if the mode of operation on theserver is READ WRITE. On a physical standby, Oracle GoldenGate DDL objects arenot active.

If DDLreplication by Oracle GoldenGate will not be used on a logical standby server,you can disable the DDL trigger there after it has been installed and enabledon the primary server. If the logical standby server will be used as a sourceof DDL replication, however, the trigger must be enabled.

2.3 Installing the DDL objects

1. Choose an Oracle GoldenGate schema oranother schema for the DDL objects.

2. Grant the following permission on theOracle GoldenGate schema.

GRANT EXECUTE ONutl_file TO <schema>;

3. Choose a tablespace for the DDL objectsthat can accommodate the growth of the GGS_DDL_HIST and GGS_MARKER tables. The GGS_DDL_HISTtable, in particular, will grow in proportion to overall DDL activity. If thetablespace that contains these objects fills up, no DDL operations can beissued on the database, and the business applications will pause.

--選擇一個存放DDL 表的tablespace。

4. Open the GLOBALS file in the homedirectory of this instance of Oracle GoldenGate. If a GLOBALS file does notexist, create one. For information on creating or editing a GLOBALS file, seethe Oracle GoldenGate Windows and UNIX Administrator’s Guide.

5. Specify the name of the DDL schema byadding the following parameter to the GLOBALS file.

GGSCHEMA <schema_name>

--指定DDL 的使用者

6. (Optional) To change the names of otherobjects listed in Table 7, the changes must be made now, before proceeding withthe rest of the installation. Otherwise, you will need to stop OracleGoldenGate DDL processing and reinstall the DDL objects. It is recommended thatyou accept the default names of the database objects. To change any name inTable 7 (except the schema), do one or both of the following:

--在table 7裡列了DDL 需要的物件名稱,如果需要修改這些物件的預設名稱,按以下方式來操作:

(1) Record all name changes in the params.sqlscript. Edit this script and change the appropriate parameters. Do not run thisscript.

(2) List the names shown in Table 8 inthe GLOBALS file. The correct parameters to use are listed in the Parameter columnof the table.

 

7. Change directories to the OracleGoldenGate installation directory.

8. Exit all Oracle sessions, includingthose of SQL*Plus, those of business applications, those of the OracleGoldenGate processes, and those of any other software that uses Oracle. Preventthe start of any new sessions.

--退出所有的sessions

9. Run SQL*Plus and log in as a user thathas SYSDBA privilege. This privilege is required to install the DDL trigger inthe SYS schema, which is required by Oracle. All other DDL objects areinstalled in the schema that you created in step 1.

10. Run the marker_setup.sql script.

@marker_setup.sql

(1) Supply the name of the OracleGoldenGate schema when prompted, and then press Enter to execute the script.

(2) This script installs support forthe Oracle GoldenGate DDL marker system.

11. Run the ddl_setup.sql script.

@ddl_setup.sql

You are prompted to:

(1) Disable the Oracle recycle bin ifthe database is Oracle 10g.

(2) Stop current Oracle GoldenGate DDLreplication.

(3) Specify the name of the DDL schemafrom step 1.

(4) Specify the installation mode: Toinstall DDL objects the first time, use the INITIALSETUP mode.

NOTE:

INITIALSETUPmode assumes that no Oracle GoldenGate DDL objects exist and drops them if theydo. If the DDL objects exist and you want to reinstall them, but

preserve any DDL history, use the procedurein “Restoring an existing DDL environment to a clean state” on page 68.

12. Run the role_setup.sql script.

@role_setup.sql

(1) At the prompt, supply the DDLschema name.

(2) The script drops and creates therole that is needed for DDL synchronization, and it grants DML permissions onthe Oracle GoldenGate DDL objects.

13. Grant the role that was created(default name is GGS_GGSUSER_ROLE to all Oracle GoldenGate Extract users. Youmay need to make multiple grants if the processes have different user names.

GRANT<role> TO <user>;

14. Run the ddl_enable.sql script to enablethe DDL trigger.

@ddl_enable.sql

To install and use the optional performance tool

To improve theperformance of the DDL trigger, make the ddl_pin script part of the database startup.It must be invoked with the Oracle GoldenGate DDL user name, as in:

@ddl_pin <DDL_user>

This script pinsthe PL/SQL package that is used by the trigger into memory. If executing thisscript from SQL*Plus, connect as SYSDBA from the Oracle GoldenGate installationdirectory. This script relies on the Oracle dmbs_shared_pool system package, soinstall that package before using ddl_pin.

三.解除安裝GG

Uninstalling Oracle GoldenGate from Linux or UNIX

1. Run the command shell.

2. (Suggested) Log on as the systemadministrator, or as a user with permission to issue Oracle GoldenGatecommands, and to delete files and directories from the operating system.

3. Change directories to the OracleGoldenGate installation directory.

4. Run GGSCI.

5. Stop all Oracle GoldenGate processes.

6. Stop the Manager process.

7. Exit GGSCI.

8. Remove the Oracle GoldenGate files byremoving the installation directory.

9. Drop any Oracle GoldenGate-relatedobjects from the database as needed.

Author: Dave

Forward: http://blog.csdn.net/tianlesoftware/article/details/6937183

相關推薦

Oracle Golden Gate 系列 -- GG 安裝 解除安裝 理論知識

在前面的幾篇裡講了GG的系統需求及支援的物件型別, 在這裡看下GG的安裝與解除安裝的理論知識,這裡只介紹Linux 平臺的說明,其他平臺的自己參看官方文件。 一.GG 安裝說明 To install Oracle GoldenGate , the following s

Oracle Golden Gate 系列十六 -- 配置 GG 安全 說明 示例

由於GoldenGate所需的使用者許可權較大,而每個GoldenGate程序配置檔案中都需要設定該使用者和密碼用於資料庫登陸,出於安全性的考慮,建議將密碼進行加密。 官方文件上介紹的加密有如下三種方法: 1.Encryption Options are available for encrypting

Oracle Golden Gate 系列十八 -- GG 多對一 real-time data warehousing 說明 示例

一.官網說明 A datawarehousing configuration is a many-to-one configuration. Multiple sourcedatabases send data to one target warehouse databas

Oracle Golden Gate 系列十五 -- GG Trails 說明

一.Trails 說明 理論知識在系列一里有說明,這裡在拿出來看一下: To support thecontinuous extraction and replication of database changes, Oracle GoldenGatestores the captured chan

Oracle資料庫的安裝解除安裝

二.將下載的安裝包解壓縮,並且合併相應位數的兩個壓縮包 注:安裝前一定要關閉防火牆,儘可能斷開網際網路 三.開啟合併的database資料夾,點選setup.exe,開始安裝 1.配置安全更新 2.安裝選項 3.系統類 4.網格安裝選項 5.安裝

資料庫oracle安裝解除安裝

安裝的版本是oracle12-OraDb10g_home1服務端,先來解除安裝,如果電腦安裝了oracle,在計算機--》管理--》服務裡面可以看見下面三個oracle服務 首先我們要把它這裡服務全停掉 在開始選單找到oracle自帶解除安裝程式 進入後 刪除產品--》勾選oracle10-

積跬步至千里系列之六--安裝解除安裝應用程式(PackageInstaller)(一)

PackageInstaller屬於framework層的一個系統應用,其位置位於:原始碼目錄/package/apps/PackageInstaller.所有的系統預製應用全都放在apps/目錄下,比如Setting, Launcher等都在此目錄下. 我是

Oracle資料安裝解除安裝明細

安裝: 解除安裝 資料泵匯入 Oracle安裝: 1.到官網下載相應的安裝程式,如下圖所示。 有一點需要注意,Oracle的安裝程式分成2個檔案,下載後將2個檔案解壓到同一目錄即可。 2.下載完成後,將2個壓縮檔案一起選中,滑鼠右鍵—>解壓檔案,如下圖所示。兩個壓

Oracle資料庫的安裝解除安裝一步一步詳細過程

資料庫安裝和解除安裝 一、 安裝 1.  在Oracle官網下載11g版本資料庫,將會得到如下2個檔案: 解壓檔案將得到database資料夾,檔案組織如下: 點選setup.exe執行安裝

(Ubuntu系列)——Linux下軟體的安裝解除安裝(命令列模式)

關於軟體的形式: Linux下是除了二進位制形式的軟體分發外,還有原始碼形式的軟體包,講一講這些軟體的安裝與解除安裝: 一、二進位制分發軟體包的安裝與解除安裝 linux軟體的二進位制分發是指事先已經編譯好二進位制形式的軟體包的釋出形式,其優點是安裝使

Oracle 安裝 解除安裝 以及 使用 plsqldev

一、Oracle 伺服器 安裝 1、下載安裝包 壓縮包有兩個,一定要一起解壓,將兩個檔案解壓到同一目錄下 會生成 資料夾 直接執行安裝即可 2、安裝 參考地址 http

Ubuntu安裝解除安裝Mysql

安裝mysql 步驟: 1. sudoapt-get install mysql-server   2. apt-getisntall mysql-client   3. sudo apt-get install libmysqlclie

linux deb包的安裝解除安裝

通過deb包安裝軟體: sudo dpkg -i package_file.deb 解除安裝: sudo dpkg -r package_name 注意,解除安裝時候是package_file.deb對應的package name 若不知道package name,可以通過

centos下軟體的安裝解除安裝

linux下安裝軟體,如何知道軟體安裝位置 注:一般的軟體的預設安裝目錄在/usr/local或者/opt裡,可以到那裡去找找. 指令名稱:whereis 功能介紹:在特定目錄中查詢符合條件的檔案。這些檔案的烈性應屬於原始程式碼,二進位制檔案,或是幫助檔案。 語法格式:whereis [-bfmsu]

deepin15.7安裝解除安裝MySQL(解決不提示設定密碼問題)、修改預設編碼為utf-8以及查詢MySQL的一些命令

一、首先安裝MySQL 安裝前更新一下倉庫,輸入命令:sudo apt-get update [email protected]:~$ sudo apt-get autoremove --purge mysql-server-5.7 輸入命令:sudo

C++builder 元件的安裝解除安裝

寫下此文章是為了那些還還沒有接觸過第三方控制元件的,而又為第三方控制元件的安裝與解除安裝而煩惱的開發人員。就我所瞭解與使用過的有Raize、DevExpress、SuiPack、DBGridEh、FastReport等。     而如何正確的安裝與解除安裝呢?

Windows服務的安裝解除安裝

Windows服務的安裝與解除安裝。 1、服務資訊的設定 首先建立一個Windows服務專案,本示例中的專案名稱為:MyTest.WindowsService。 編寫服務啟動和關閉方法,記錄一些日誌資訊,方便後續檢視服務的狀態。 using System; using Syste

Linux系統安裝解除安裝軟體包

一、使用rpm命令安裝與解除安裝軟體包 1、檢視已安裝的rpm包 rpm -qa|grep filename 2、檢視rpm包的相關資訊 rpm -qi filename 3、列出一個rpm包中所安裝的檔案 rpm -ql filename 4、檢視某個檔案屬

Centos環境下htop的安裝解除安裝

操作環境 版本 :Xshell6.0 + CentOS 7.5.1804 ( VMware 14.1.2) 檢視系統版本:~]# cat /etc/redhat-release 一、更新yum為國內源 1、備份原始檔  mv /etc/yum.repos.d/Cen

Centos7.4下的docker的安裝解除安裝

1.更新yum命令: sudo yum update 2.安裝docker: yum install docker 3.啟動docker systemctl start docker docker就安裝完成並啟動了。附上docker一些常用的命令: 檢視映象列表