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

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
    
主站蜘蛛池模板: 南投县| 五寨县| 永宁县| 珲春市| 盘山县| 华亭县| 马山县| 新民市| 绥宁县| 朝阳县| 华坪县| 东乌珠穆沁旗| 宜兴市| 安平县| 阳春市| 依兰县| 蕲春县| 改则县| 惠安县| 乐业县| 盐池县| 高阳县| 阿巴嘎旗| 北京市| 禹城市| 英德市| 普安县| 军事| 霍山县| 新建县| 民权县| 渝中区| 深水埗区| 静乐县| 景谷| 宁德市| 鸡泽县| 竹北市| 社旗县| 东乌珠穆沁旗| 安远县|