Golden Gate配置实例:RHEL 4.7下的Oracle 10g RAC到单实例的单向同步
环境
rac1 rac2: RHEL 4u7 + Oracle 10.2.0.4 + ASM
rac1 外网IP 192.168.47.241 虚拟IP 192.168.47.243
rac2 外网IP 192.168.47.242 虚拟IP 192.168.47.244
目标端是一个单机
ggdb: RHEL 4u7 + ORACLE 10.2.0.4 + ASM
IP: 192.168.47.211
两台主机均已创建数据库,sid分别为oradb 和 dyggdb
配置oradb 到 dyggdb的数据同步
goldengate版本11.1.1.0
将rac1配置为NTP服务器
rac1:
修改配置文件。配置一个server指向自己
cat>/etc/ntp.confrestrict default nomodify notrap noquery
restrict 127.0.0.1
server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org
server 2.rhel.pool.ntp.org
server 192.168.47.241
server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
keys /etc/ntp/keys
EOF
启动ntpd服务
service ntpd restart
chkconfig --level 345 ntpd on
rac2:
rac2上的操作与rac1类似,不同的是配置的server指向rac1
cat>/etc/ntp.confrestrict default nomodify notrap noquery
restrict 127.0.0.1
server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org
server 2.rhel.pool.ntp.org
server 192.168.47.241
fudge 192.168.47.241 stratum 10
driftfile /var/lib/ntp/ntp.drift
broadcastdelay 0.008
keys /etc/ntp/keys
EOF
service ntpd restart
chkconfig --level 345 ntpd on
需要注意的是,配置完ntp后大概需要5-10分钟的时候,才会开始进行同步。可以通过ntpq -p 命令来查看
[root@rac1 ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
rac1 .INIT. 16 u - 64 0 0.000 0.000 4000.00
*LOCAL(0) LOCAL(0) 10 l 30 64 377 0.000 0.000 0.001
[root@rac2 ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
rac1 LOCAL(0) 11 u 9 64 1 0.187 0.072 0.001
源端和目标端之间的时间同步则不是那么重要。可以在目标端手动对时间进行一次同步(目标端的ntpd服务没有启动),并将同步后的系统时间写入bios
[root@ggdb ~]# ntpdate 192.168.47.241
8 Dec 15:40:20 ntpdate[8311]: adjust time server 192.168.47.241 offset 0.003007 sec
[root@ggdb ~]# /sbin/hwclock -w
如果不能成功,可以在ntpdate命令中加上-d参数来排查具体原因
useradd -g oinstall -G dba goldengate
passwd goldengate
配置资源限制:
官方建议尽可能将资源限制放开,其实我们可以根据具体情况进行配置,但不能设得太小
cat >>/etc/security/limits.confgoldengate soft memlock 3145728
goldengate hard memlock 3145728
goldengate soft nproc 200
goldengate hard nproc 1024
goldengate soft stack -
goldengate hard stack -
goldengate soft fsize -
goldengate hard fsize -
EOF
以下的在rac1上做就可以了
这里有一个分区/dev/sdg1,可以被rac1和rac2访问。我们将其格式化ext3文件系统,并挂载到rac1上(在正常情况下,我们在rac1上启动extract进程):
[root@rac1 ~]# mkfs.ext3 /dev/sdg1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
12500992 inodes, 24993115 blocks
1249655 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
763 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@rac1 ~]#
挂载到rac1的/opt/gg下:
[root@rac1 ~]# mkdir /opt/gg
[root@rac1 ~]# mount /dev/sdg1 /opt/gg
然后在rac1中配置开机自动挂载(这一步不要在rac2上做):
echo "mount /dev/sdg1 /opt/gg" >> /etc/rc.local
目标端
mkdir /opt/gg
在源端和目标端上,赋予goldengate用户/opt/gg目录的使用权限
chown -R goldengate:oinstall /opt/gg
chmod -R 775 /opt/gg

mysqlhandlesconcurrencyusing amixofrow-levelandtable-levellocking、主にthroughnodb'srow-levellocking.comparedtootherrdbms、mysqlのsapproachiseformanyusecasesecasesbutmayfaceChallengeswithdeadlockdlacklikeRisikErisikErikErikErikErikErikErikErikErikErikErikErikErikErikErikeを使用してください

mysqlhandlestransactionsefectivectivelivationtivelivational supportingingacidpropertiessimilArtopostgreslesclandoracle.1)mysqluseSesrepeatable-readededededededededededefaultisolation level

MySQLデータ型は、数値、日付と時刻、文字列、バイナリ、空間型に分割されます。正しいタイプを選択すると、データベースのパフォーマンスとデータストレージを最適化できます。

ベストプラクティスには以下が含まれます。1)データ構造とMySQL処理方法の理解、2)適切なインデックス作成、3)SELECT*、4)適切な結合タイプの使用、5)サブQueriesを使用して、5)慎重に使用します。これらのプラクティスは、MySQLクエリを高速であるだけでなく、保守性、スケーラビリティ、リソース効率もすることができます。

mysqlisbetterforspeedandsimplicity、適切なforwebapplications; postgresqlexcelsincomplexdatascenararios withobustfeatures.mysqlisidealforquickprojectsandread-havytasks、whilepostgressqlessqlispreredforforivationsRedictrictiontrictdateinitegriTinitegriTiontegriTioniitaintegrategrisioniationegrisioniaty

MySQLは、非同期、半同期、およびグループ複製の3つのモードを介してデータの複製を処理します。 1)非同期の複製パフォーマンスは高くなりますが、データが失われる可能性があります。 2)半同期複製により、データセキュリティが向上しますが、遅延が増加します。 3)グループレプリケーションは、高可用性要件に適したマルチマスターレプリケーションとフェールオーバーをサポートします。

説明ステートメントは、SQLクエリのパフォーマンスを分析および改善するために使用できます。 1.説明ステートメントを実行して、クエリプランを表示します。 2。出力結果を分析し、アクセスの種類、インデックスの使用量に注意し、順序を結合します。 3.分析結果に基づいてインデックスを作成または調整し、結合操作を最適化し、フルテーブルスキャンを回避してクエリ効率を向上させます。

論理バックアップにMySQLDUMPとホットバックアップにMySQLenterPriseBackupを使用することは、MySQLデータベースをバックアップする効果的な方法です。 1. mysqldumpを使用してデータベースをバックアップします:mysqldump-uroot-pmydatabase> mydatabase_backup.sql。 2。ホットバックアップにmysqlenterprisebackupを使用:mysqlbackup - user = root-password = password - backup-dir =/path/to/backupbackup。回復するときは、対応する寿命を使用します


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

EditPlus 中国語クラック版
サイズが小さく、構文の強調表示、コード プロンプト機能はサポートされていません

VSCode Windows 64 ビットのダウンロード
Microsoft によって発売された無料で強力な IDE エディター

SecLists
SecLists は、セキュリティ テスターの究極の相棒です。これは、セキュリティ評価中に頻繁に使用されるさまざまな種類のリストを 1 か所にまとめたものです。 SecLists は、セキュリティ テスターが必要とする可能性のあるすべてのリストを便利に提供することで、セキュリティ テストをより効率的かつ生産的にするのに役立ちます。リストの種類には、ユーザー名、パスワード、URL、ファジング ペイロード、機密データ パターン、Web シェルなどが含まれます。テスターはこのリポジトリを新しいテスト マシンにプルするだけで、必要なあらゆる種類のリストにアクセスできるようになります。

ZendStudio 13.5.1 Mac
強力な PHP 統合開発環境

ホットトピック









