How to setup SharePlex in AWS (Amazon Web Services)?
说明
How to set up SharePlex in AWS (Amazon Web Services) environment
原因
Steps for setting up SharePlex in AWS
解决办法
Steps for AWS with EC2 classic
SharePlex requires a persistent ip address.
You need to allocate then associate Elastic IP (EIP) with a private IP address specified by the network interface attached to the instance.
The private ip address is binded with the primary network interface eth0 on the instance, you can not have secondary network interface with EC2 classic.
1. Export SP_SYS_HOST_NAME to the private ip that’s associated with Elastic IP (EIP, persistent public ip) on source and start sp_cop on source
2. Create config with target ip pointing to the Elastic IP (public ip) for target host on source
3. Export SP_SYS_HOST_NAME to private ip that’s associated with the Elastic IP on target and start sp_cop on target
4. Stop post on target
Sp_ctrl> stop post
5. Activate config on source
Sp_ctrl> activate config filename
6. Take a hot backup on source and restore to target
7. Run ora_setup and choose existing user on target, then run cleanup.sql on target from prod dir/bin
./ora_setup
Sqlplus splex/xxx
@cleanup.sql
8. Reconcile to the post queue to the seq#
Sp_ctrl> reconcile queue for o.sid-o.sid seq xxx
9. Disable FK constraints with delete cascade, disable triggers or any jobs that can modify data on target
10. Start post on target
You may see two import process, one is running and one is idle and this is expected as Elastic ip and the private ip are associated with NAT translation.
Make sure the SharePlex port is open on firewall for the public Elastic IP if there are firewalls between source and target.
If the server reboots and the private ip changes, then you need to run provision utility on source and target to handle the ip change.
Steps for AWS with VPC
You must associate the Elastic IP (EIP) with either the eth0 primary network interface or a secondary network interface of your instance.
1 . Export SP_SYS_HOST_NAME to Elastic IP on source, should be visible internally on the server
2. create config with target ip pointing to external ip of the Elastic IP for target host on source
3. Export SP_SYS_HOST_NAME Elastic IP on target and start sp_cop on target
4. Stop post on target
Sp_ctrl> stop post
5. Activate config on source
Sp_ctrl> activate config filename
6. Take a hot backup on source and restore to target
7. Run ora_setup and choose existing user on target, then run cleanup.sql on target
./ora_setup
Sqlplus splex/xxx
@cleanup.sql
8. Reconcile to the post queue to the seq#
Sp_ctrl> reconcile queue for o.sid-o.sid seq xxx
9. Disable FK constraints with delete cascade, disable triggers or any jobs that can modify data on target
10. Start post on target
You should not see two import process running on target and the Elastic ip should be persistent and static even after server reboot.
其他信息
Please see SharePlex 8.6.6 release notes for Cloud support of SharePlex running in AWS environment. SharePlex can replicate from Oracle to target in RDS, and replicate from Oracle in AWS EC2 to Oracle in AWS EC2.