GG Build Source Single instance---to target RAC environment 11.2.3 version one-way sync (XX company project)

Source: Internet
Author: User
Tags aliases naming convention prepare
GG Build Source Single instance---to target RAC Environment 11.2.3 version one-way synchronization
Purpose

After completing this Oracle by Example (OBE) tutorial, you will be able to keep two heterogeneous databases synchronized using Oracle Goldengate (OGG), in which case the Linux Oracle 11GR2 database to the 11GR2 exadata database.

In this lesson, you will learn how to: Prepare your environment to configure the Oracle goldengate process. Configures and initiates a database operation for the change capture. Configures and initiates a database operation that changes delivery. Finish Time

About 2 hours introduction

Oracle Goldengate exadata: Replication from Oracle 11GR2 to Oracle 11GR2

Oracle Goldengate provides very rapid replication of heterogeneous databases by reading transaction logs and writing changes to one or more target databases. The following five processes are involved in a typical environment: Manager: There is a manager on the source host and a separate manager on the target host. The manager starts and stops other processes on the source and target instances. You do not need to use the manager for delivery traffic once the extract is run or recommended. Initial load: optional. Used to populate the target table once. It can read or from the source table directly or from the ASCII file. This OBE ignores initial loading. See other Imperial Medals for how to do it. extract: run on the source where the transaction data is to be captured to the trajectory file. There are two versions of extracts: Classic (this OBE) and integrated. Data pump: optional, but strongly recommended. Data extraction trajectory file from the source code instance in the IP network that will be sent to the target instance. Technically, data extraction is a secondary extract. It is recommended that you use: pass data to the target database. It is generally recommended that you use the to run on the target system. Yes, the spelling is correct, there is no Last "E" (Long Story). Linux Oracle exadata configuration (one-way)

The configuration shown in the figure (uses a primary extraction process for creating a remote trace on the target system). It is recommended that you use process changes from remote tracking to be applied as target RAC databases. It is not necessary to source host01 Linux is also not 64 bits.

In short, the environment is:

host name screen colors os hardware database sid ogg source/destination main console
host01 Red Linux 64-bit PC for single CPU Oracle 11GR2 Orcl Source Two
QR01DB02 (NODE02) Yellow Linux 64-bit Exadata Database Node Oracle 11GR2 RAC Dbm2 Goal Ggsci
QR01DB01 (NODE01) Green Linux 64-bit Exadata Database Node Oracle 11GR2 RAC Dbm1 Goal SQL * Plus
Prerequisite Components

Prerequisites for this lab include the following: View basic goldengate Oracle to Oracle OBE "normal" tasks such as initial loading, viewing statistics, and so on. This OBE only focuses on the unique exadata aspect. For more links at the bottom, see resources. View the white paper, especially the section on my Oracle support (MOS, accounts that need to be viewed) Notes 1054431.1. The source host and the sample schema have installed and run the Oracle 11GR2 database. Oracle Goldengate's 64-bit Linux zip distribution is staged on the source and/home/user/targets/home/user/directory. This is a cloud that can be delivered from Oracle software. The Exadata Cluster service is installed and running.

Remember that there are two hosts: host01 and host02, and three environmental prompts per host: OS, Ggsci, and SQL. This makes six different places in which you can type. Please try to be extra careful where you enter the command. The wrong command in the wrong context is the most common error. Task Overview Preparing the Environment

To perform this lesson, the Goldengate application must be installed on both the source and target systems. The installation includes a sample database and script to generate initial data and subsequent update operations. Source and target tables are created and loaded with the initial data. The Goldengate manager process also starts so that other processes may be configured and started. The source is defined as the last, generated and transferred to the target system. Configuration Change Capture (excerpt)

For an audited table, the extraction process configuration captures the change data directly from the Treasury Market Development Board, and stores the changes in a data queue called the Goldengate local path. Configure change delivery (recommended for your use)

Once the table has initially loaded the data, extracting all the actions captured by the process, we recommend that you use the process configuration to pass the captured operation to the target database. Printing Conventions

The direction of the

text color and font and in this screen should be interpreted as follows: Some_command type as a command or a value. Example:
Enter the./ggsci Start command line interpreter. The some_prompt system responds with this as a prompt or reply. Example:
After the initial welcome banner, you can enter the command Ggsci (host01) 1 > prompt. Some_button Click this button on the screen. Example:
After selecting the version you want, click Continue to start the download. Some_variable The variables you use to replace the actual values. Example:
Please enter a prompt for your user's Id/password. Some_filename file name, path, or folder/directory. Example:
Edit the Hosts file in the/etc directory. Some_code the element of a keyword or code. Example:
Changes the handlecollisions parameter to nohandlecollisions  after initial loading. naming conventions for files and procedures

The naming convention for files and procedures can work for you or your company. Here is the example convention used in this OBE:
Pxxxxhh.ext
Location: p= process = e (xtract), P(UMP), R(eplicat), i (nitial), D(Efgen), C7>s(Tartup). xxxx Project = = All files with related common project xxxx, such as human resources, sales, Engr, test . hh= host to host = AA,AB,BA,BB, such as where the name of the source and target host is = host01 and B = host02. Later you will see the names of some files that cannot be used as part of the number, so it is best not to go there at all. ext= extension = prm= parameter (stored in DIRPRM/), dsc= Discard, rpt= report (stored in DIRRPT/), def= definition (stored in dirdef/), in vitro = Obey (stored in installation directory), sql=   SQL (stored in Dirsql/). 1. Preparing the environment Target

The goal of this exercise is to define. Profile or. bash_profile or an environment variable that is equivalent to preparing the operating system (OS). Configure the VIP address of the application. Tnsping test for future sqlplus connections. Prepare Oracle database 11gr2 by creating OGG Admin users and modifying database parameters.

The command you type will be in a blue, equal-width font.   The system's response will be in black monospaced font. 1.1 Writing operating system environment variables

You will configure the. Profile as an/etc/hosts file for environment variables and host aliases. You will do all of these three hosts: source and two target nodes. Your existing profiles may have rows for them, and this step is more focused on the rows to be added to them.

Use the editor of your choice, and check the initial state of the configuration file on target host Node 1. Oracle_base, Oracle_home, Ogg_home, and ld_library_path add variables. As they left the other lines.

exadata-Node 1 (target)
[Oracle@qr01db01 ~]$ vi. bash_profile 1 #. Bash_profile 2  3 # Get the aliases and functions 4 if [F ~/.BASHRC]; Then 5.                                                                
~/.BASHRC 6 fi 7             
8 # User specific environment and startup programs                                         
9 path= $PATH: $HOME/bin                                                  
One export PATH                                       
Oracle_home=/u01/app/oracle/product/11.2.0/dbhome_1 Export ORACLE_SID=DBM1 Oraenv_ask=no; /usr/local/bin/oraenv >/dev/null 2<&1 alias gogrid= ' Export Oracle_home=/u01/app/11.2.0/grid;export oracle_sid=+ ASM1;.  /usr/local/bin/oraenv >/dev/null 2<&1;env |grep ora|grep-v BASE ' 17 Alias godb= ' Export Oracle_home=/u01/app/oracle/product/11.2.0/dbhome_1;export oracle_sid=dbm1; /usr/local/bin/oraenv >/d ev/null 2<&1;env|grep ora|grep-v BASE ' [oracle@qr01db01 ~                                                                
]$ vi. bash_profile 1 #. Bash_profile 2 3 # Get the aliases and functions 4 if [-F ~/.BASHRC] ; Then 5.                                                                
~/.BASHRC 6 fi 7 8 # User specific environment and starTup Programs 9 path= $PATH: $HOME/bin                                                  
One export PATH  Oracle_base=/u01/app/oracle Export                             
Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1 export ogg_home= $ORACLE _base/ogg                                       
Export ld_library_path= $ORACLE _home/lib export ORACLE_SID=DBM1 Oraenv_ask=no; 
    /usr/local/bin/oraenv >/dev/null 2<&1 alias gogrid= ' Export Oracle_home=/u01/app/11.2.0/grid;export ORACLE_SID=+ASM1;.  /usr/local/bin/oraenv >/dev/null 2<&1;env |grep ora|grep-v BASE ' 20 Alias godb= ' Export Oracle_home=/u01/app/oracle/product/11.2.0/dbhome_1;export oracle_siD=DBM1;. /usr/local/bin/oraenv >/d ev/null 2<&1;env|grep ora|grep-v BASE ' [oracle@qr01db02 ~
 ]$  

The alias Gogrid and alias Godb have been added for another demos, they are not part of the default profile. They make it easier to switch between the Grid infrastructure and DB environments. The aliases each span several lines. Be mindful to is introduce extra returns on those lines.

Switch user to root and edit the/etc/hosts the file to append a alias for host01. Use the proper IP addresses for your environment.

Exadata-node 1 (target)
[Oracle@qr01db02 ~]$ su-root 
Password: 
[root@qr01db02       , ~]# vi/etc/hosts 127.0.0.1 Localhost.localdomain    localhost          
                                                               
     (... rest of file not shown, too many possibilities ...)    

[Root@qr01db02 ~]# tail-1/etc/hosts 
192.0.2.16      host01.example.com              host01
[root@qr01db02 ~]# Exit 
[Oracle@qr01db02 ~]$
                                                                               

The tail command assumes you appended the "host01" to the "end of" the file. Exit out of the root when you have are done editing.

Do the exact same thing for the other target node 2. The lines are not shown, they are the same for qr01db and qr01db.

Exadata-node 2 (target)
[Oracle@qr01db02 ~]$ VI bash_profile 
  (REPEAT on other qr01db02)
[oracle@qr01db02 
~]$ Su-root] [ ROOT@QR01DB02 ~]# vi/etc/hosts 
  (REPEAT on other qr01db02)
[root@qr01db02 ~]# exit 
[Oracle@qr01db02 ~]$
                                                                               

The two nodes should have identical profiles and very similar/etc/hosts.

Do the same thing for the source host. There May to slight difference in where things are installed, but to are defining the same four environment to Variables:or Acle_base, Oracle_home, Ogg_home, and Ld_library_path. The/etc/hosts points to the Exadata address.

Host01-linux (source)
[oracle@host01 ~]$ VI. Bash_profile. Bash_profile # get the aliases and functions if [-f ~/. BASHRC]; Then.                                                          
                                                               
   ~/.BASHRC fi            
   # User specific environment and startup programs            
   Oracle_base=/u01/app/oracle oracle_home= $ORACLE _base/product/11.2.0/db_home1                                             
   Ogg_home= $ORACLE _base/ogg ORACLE_SID=ORCL                            
                                                               
  Path= $PATH: $HOME/bin: $ORACLE _home: $ORACLE _home/bin ld_library_path= $ORACLE _home/lib Export PATH ld_library_path export oracle_home oracle_base oracle_sid ogg_home    [oracle@host01 ~]$ su-root Password: [root@host01 ~]# vi/etc/hosts 127.0.0.1-Localhost.localdomain LocalHost (... rest of file not shown, too    

Many possibilities ...) [root@host01 ~]# tail-1/etc/hosts 192.0.2.99 qr01-vip.example.com qr01-vip [root@host01 ~]# exit [ORAC
 le@host01 ~]$  

This time the/etc/hosts addition are for a application "VIP" address on exadata that gets defined in the next step. For now, just enter to on faith.

This completes preparing the OS environment variables. 1.2 Configure The application Virtual IP (VIP) address

The Application Virtual IP (VIP) is part of Cluster Ready Services (CRS). It is used to define a single new address shared by multiple nodes. The purpose is for "source" to "a single target address regardless of which target node is handling it. This is similar to the single Client Access Name (SCAN) address feature of real application clusters (RAC), except that SC An are only for use by the database, whereas VIP can be used by any application (in this example, Goldengate).

On target Node 2, perform the following tasks as root or Oracle as indicated. Create the VIP as root, but you run it as Oracle. The VIP address must is any unused to the subnet configured as the public network for the cluster. The example uses 192.0.2.99 because the grep returns 192.0.2.0 the subnet. It needs to match the/etc/hosts file on the source in the previous step.

Exadata-node 2 (target)
[Oracle@qr01db02 ogg]$ su-root Password: [root@qr01db02 ~]# Cd/u01/app/11.2.0/grid/bin [root@qr01db02 bin]#./crsctl Stat Res-p | Grep-ie. Network-ie Subnet | Grep-ie name-ie Subnet Name=ora.net1.network usr_ora_subnet=192.0.2.0 [root@qr01db02 bin]#./APPV Ipcfg create-network=1-ip=192.0.2.99-vipname=gg_vip_trg-user=root Production Copyright 2007, 20 Oracle.all rights reserved 2013-02-27 14:06:52:creating Resource Type 2013-02-27 14:06:52:executing/u01/app/11.2.0/ Grid/bin/crsctl Add Type App.appvip_net1.type-basetype ora.cluster_vip_net1.type-file/u01/app/11.2.0/grid/crs/tem Plate/appvip.type 2013-02-27 14:06:52:executing cmd:/u01/app/11.2.0/grid/bin/crsctl add type App.appvip_net1.type-ba Setype ora.cluster_vip_net1.type-file/u01/app/11.2.0/grid/crs/template/appvip.type 2013-02-27 14:06:55:create the R Esource 2013-02-27 14:06:55:executing/u01/app/11.2.0/grid/bin/crsctl Add Resource Gg_v ip_trg-tyPE app.appvip_net1.type-attr "Usr_ora_vip=192.0.2.99,start_dependen cies=hard (ora.net1.network) Pullup ( Ora.net1.network), Stop_dependencies=hard (or a.net1.network), acl= ' owner:root:rwx,pgrp:root:r-x,other::r--, User: Root:r-x ', HO sting_members=qr01db02.example.com,appsvip_failback= ' 2013-02-27 14:06:55:executing cmd:/u01/app/ 11.2.0/grid/bin/crsctl Add Resource Gg_vip_trg-type app.appvip_net1.type-attr "Usr_ora_vip=192.0.2.99,start_depe NDE Ncies=hard (ora.net1.network) Pullup (ora.net1.network), Stop_dependencies=har D (ora.net1.network), acl= ' Owner:root: Rwx,pgrp:root:r-x,other::r--, user:root:r-x ', hosting_members=qr01db02.example.com,appsvip_failback= ' [ ROOT@QR01DB02 bin]#./crsctl setperm Resource Gg_vip_trg-u user:oracle:r-x [root@qr01db02 bin]# exit [oracle@qr01db02 o gg]$ Cd/u01/app/11.2.0/grid/bin [oracle@qr01db02 bin]$./crsctl Start Resource Gg_vip_trg

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.