官术网_书友最值得收藏!

How to do it…

In order to support your GoldenGate installation, you must ensure you have ample physical memory (RAM) available on the server. The steps for implementing the design considerations are as follows:

  1. The following command will display your available memory on the server:
    $ /usr/sbin/lsattr –El sys0 –a realmmem
    

    The output of the preceding command will be as follows:

    Realmem 16777216 Amount of usable physical memory in Kbytes False
    

    The preceding output indicates that the server has 16 GB of physical RAM, which is more than sufficient to carry on for an Online Transaction Processing (OLTP) environment.

  2. For very busy systems, you can limit the amount of RAM to your Extract and/or Replicat processes as in the following parameter file:
    cachemgr cachesize 8G
    
  3. Your OGG software distribution should have its own filesystem created by your system administrator. Our example is a 100 GB filesystem.
    hosta> $ df -g
    

    The output of the preceding command will be as follows:

    Filesystem GB blocks Free % Used Iused %Iused Mounted on
    
    /dev/oggvg 100.00 99.67 1% 270 1% /u01/app/oracle/GG
    
  4. Next we want to calculate the optimal network bandwidth in order to set the TCP Send / Receive socket buffers (TCPBUFSIZE) for data pump extracts. Use the following command to get the correct TCPBUFSIZE buffers for your data pump extract:
    hosta> $ ping -c 10 hostb
    

    The output of the preceding command will be as follows:

    PING hostb: (10.3.4.5): 56 data bytes
    64 bytes from 10.3.4.5: icmp_seq=0 ttl=255 time=0.8 ms
    64 bytes from 10.3.4.5: icmp_seq=1 ttl=255 time=0.8 ms
    64 bytes from 10.3.4.5: icmp_seq=2 ttl=255 time=0.8 ms
    64 bytes from 10.3.4.5: icmp_seq=3 ttl=255 time=0.8 ms
    64 bytes from 10.3.4.5: icmp_seq=4 ttl=255 time=0.8 ms
    64 bytes from 10.3.4.5: icmp_seq=5 ttl=255 time=0.8 ms
    64 bytes from 10.3.4.5: icmp_seq=6 ttl=255 time=0.8 ms
    64 bytes from 10.3.4.5: icmp_seq=7 ttl=255 time=0.7 ms
    64 bytes from 10.3.4.5: icmp_seq=8 ttl=255 time=0.8 ms
    64 bytes from 10.3.4.5: icmp_seq=9 ttl=255 time=0.8 ms
    
    ----hostb PING Statistics----
    10 packets transmitted, 10 packets received, 0% packet loss
    round-trip min/avg/max = 0.8/0.8/0.8 ms
    

    Now we'll calculate the buffer size based on the preceding output of 0.8 ms network latency and our 100 megabits interface card. You might have a different speed interface card such as 1 gigabit or even 10 gigabits. Check with your system administrator if you're unsure.

    Note

    0.8 seconds * 100 megabits per second = 8 megabits

    To determine the buffer size in bytes, where 8 bits = 1 byte, we perform the following calculation:

    8 megabits / 8 = 1,000,000 bytes ~ 1 MB / second = TCPBUFSIZE

  5. Create an Oracle service for OGG to connect to the Oracle database via a service name in a high availability Real Application Clusters (RAC) database as follows:
    $ srvctl add service -d sourcedb -s OGG_SRVC –r hosta1 –a hosta2
    $ srvctl start service –d sourcedb –s OGG_SRVC
    
  6. Once the OGG_SRVC service has been created from the preceding code, you must add it to your tnsnames.ora file, for example, as follows:
    OGG_SRVC =
    (DESCRIPTION =
       (ADDRESS = (PROTOCOL = TCP)(HOST = hosta1-vip)(PORT = 1521))
       (ADDRESS = (PROTOCOL = TCP)(HOST = hosta2-vip)(PORT = 1521))
       (LOAD_BALANCE = NO)
       (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = OGG_SRVC)
       )
    )
  7. For very slow networks, or networks with bandwidth limitations, you would benefit highly by enabling network compression in the data pump extract. We can do it using the following example:

    Example: enabling compression for your trail files in flight as follows:

    rmthost london mgrport 7809 tcpbufsize 1000000 compress
    
主站蜘蛛池模板: 商丘市| 庐江县| 湖口县| 砀山县| 蒲江县| 河南省| 民县| 晋江市| 集贤县| 滦南县| 怀柔区| 九台市| 新绛县| 化隆| 弥勒县| 宿松县| 太保市| 荣成市| 抚顺市| 韩城市| 棋牌| 武宣县| 巴林右旗| 西和县| 雷州市| 昌江| 辽阳市| 慈溪市| 深圳市| 思茅市| 策勒县| 衡水市| 乌拉特中旗| 沙雅县| 东乌| 会同县| 伊宁市| 临洮县| 宕昌县| 百色市| 南溪县|