oracle 系统搬迁案例(zw3)

20150212 zw3迁移详细步骤
1.老账务3区信息备份
2.停掉老系统(注:屏蔽定时任务);
3.启动新系统
4.修改/etc/hosts 内容,跟现网保持一致;
5.修改新系统的SCAN VIP 和SCAN LISTENER
7.停新系统的GRID
8.OS层修改PUBLIC IP、PREVITE IP (注:本迁移网络接口、网段均与老系统一样,因此不需要做变更,仅OS层变更后修改/etc/hosts即可)
9.启动新系统GRID 启库;
10.变更检查
11.取消先前屏蔽的定时任务


##################################################老账务库信息备份############################################
老账务/etc/hosts
127.0.0.1               loopback localhost      # loopback (lo0) name/address


10.17.248.15    c4ozw3a
10.17.248.16    c4ozw3b
10.19.243.81     tres3
########## Backup Server #################
10.19.205.103   backupsvr4


########## For Oracle 11g RAC Database ##########
10.17.248.115   c4ozw3a-vip
10.17.248.116   c4ozw3b-vip


172.17.248.15   c4ozw3a-priv
172.17.248.16   c4ozw3b-priv


10.17.248.212   c4ozw3-scan
########## End For Oracle 11g RAC Database ######


10.19.243.198 tnimsvr1
::1       localhost       loopback


###########NIM Server##########
10.19.205.80   snimsvr1
10.19.243.198  tnimsvr1
10.19.243.199  tnimsvr2




老账务3 地址
[oracle@c4ozw3a] /oracle> ifconfig -a
en8: flags=1e080863,c0
        inet 10.17.248.15 netmask 0xffffff00 broadcast 10.17.248.255
        inet 10.17.248.115 netmask 0xffffff00 broadcast 10.17.248.255
        inet 10.17.248.212 netmask 0xffffff00 broadcast 10.17.248.255
         tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
en9: flags=1e080863,c0
        inet 172.17.248.15 netmask 0xffffff00 broadcast 172.17.248.255
        inet 169.254.210.192 netmask 0xffff0000 broadcast 169.254.255.255
         tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
lo0: flags=e08084b,c0
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1%1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1


Below is an example using the following configuration:
The name of the SCAN is sales-scan.example.com
subnet of the public network is 10.100.10.0
netmask for the public network is 255.255.255.0
name of the public interface is eth1
old IP addresses: 10.100.10.81, 10.100.10.82 & 10.100.10.83
new IP addresses: 10.100.10.121, 10.100.10.122 & 10.100.10.123
Stopping & starting the SCAN VIPs/listeners can be done by the grid user, however the 'srvctl modify scan' command must be executed by root user, so it's practical to execute all steps as the root user.


#############################################SCAN IP 变更#################################################3
实施方案:
1.监检SCAN ip 配置
[oracle@c4ozw3a] /oracle> $GRID_HOME/bin/srvctl config scan
SCAN name: c4ozw3-scan, Network: 1/10.17.248.0/255.255.255.0/en8
SCAN VIP name: scan1, IP: /c4ozw3-scan/10.17.248.212
[oracle@c4ozw3b] /oracle> $GRID_HOME/bin/srvctl config scan
SCAN name: c4ozw3-scan, Network: 1/10.17.248.0/255.255.255.0/en8
SCAN VIP name: scan1, IP: /c4ozw3-scan/10.17.248.212


2.更改/etc/hosts文件


3.停止SCAN 监听和SCAN IP资源
Stop the SCAN listener and the SCAN VIP resources:
# $GRID_HOME/bin/srvctl stop scan_listener
# $GRID_HOME/bin/srvctl stop scan
# $GRID_HOME/bin/srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running
# $GRID_HOME/bin/srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running


4、查看SCAN IP 注:此时SCAN IP仍然是老的
The SCAN VIP resources still show the old IP addresses:
# $GRID_HOME/bin/srvctl config scan
SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.81
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.82
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.83


5、更新SCAN IP
Now tell CRS to update the SCAN VIP resources:
# $GRID_HOME/bin/srvctl modify scan -n c4ozw3-scan
To verify that the change was successful, check the SCAN configuration again:


6、检查更新是否成功
# $GRID_HOME/bin/srvctl config scan
SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.121
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.122
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.123


$GRID_HOME/bin/srvctl status scan_listener


7、开启SCAN & SCAN_LISTENER
Start SCAN and the SCAN listener:


# $GRID_HOME/bin/srvctl start scan
# $GRID_HOME/bin/srvctl start scan_listener




8、如果SCAN IP 更新成功,需要更新SCAN 监听
$GRID_HOME/bin/srvctl modify scan_listener -u  


##################################################PUBLIC IP 变更#############################################
实施方案:
1.由于新老机器的PUBLIC IP属于同一个网段,因此CLUSTERWARE层不需要做更改,所有的操作全部在OS层;
2.关闭GRID;
3.主机人员修改IP地址;
4.开启GRID;


备选方案:(如果网络节点变更)
如果网口或更改不同的网段地址使用如下方式(注:做此步时必须确保所有的节点均开启clusterware)
1.获到老账务3区
[oracle@c4ozw3a] /oracle> $GRID_HOME/bin/oifcfg getif -global 
en8  10.17.248.0  global  public
en9  172.17.248.0  global  cluster_interconnect
2.修改新账务3区为老区地址
$GRID_HOME/bin/oifcfg delif -global en8/10.17.248.0 
$GRID_HOME/bin/oifcfg setif -global en9/172.17.248.0:public
3.然后变更OS的地址
这一步不需要重启clusterware 


##################################################VIP 变更#####################################################
实施方案:
由于新老机器的PUBLIC IP属于同一个网段,因此CLUSTERWARE层不需要做更改,所有的操作全部在OS层;


备选方案:(如果网络接口做变更)
1.收集当前老账务的vip信息
[oracle@c4ozw3a] /oracle> srvctl config nodeapps -a
Network exists: 1/10.17.248.0/255.255.255.0/en8, type static
VIP exists: /c4ozw3a-vip/10.17.248.115/10.17.248.0/255.255.255.0/en8, hosting node c4ozw3a
VIP exists: /c4ozw3b-vip/10.17.248.116/10.17.248.0/255.255.255.0/en8, hosting node c4ozw3b
You have mail in /usr/spool/mail/oracle
2.检查VIP状态
crsctl stat res -t
- it should show VIPs are ONLINE
$ ifconfig -a
(netstat -in for HP and ipconfig /all for Windows)
- VIP logical interface is bound to the public network interface
老账务3信息
en8: flags=1e080863,c0
        inet 10.17.248.15 netmask 0xffffff00 broadcast 10.17.248.255
        inet 10.17.248.115 netmask 0xffffff00 broadcast 10.17.248.255
        inet 10.17.248.212 netmask 0xffffff00 broadcast 10.17.248.255
         tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
3.停止资源
Stop the nodeapps resources (and all dependent resources ASM/DB only if required):


$ srvctl stop instance -d orazw3 -n c4ozw3b
$ srvctl stop vip -n orazw3 -f
4.检查vip 资源,正常情况下应该是OFFLINE状态
Verify VIP is now OFFLINE and the interface is no longer bound to the public network interface


$ crs_stat -t (or $ crsctl stat res -t for 11gR2)


$ ifconfig -a
(netstat -in for HP and ipconfig /all for windows)


5.修改VIP资源(注:必须是root执行)
Modify the VIP resource, as root user:
# srvctl modify nodeapps -n -A //


srvctl modify nodeapps -n c4ozw3a -A 10.17.248.115/255.255.255.0/en8
srvctl modify nodeapps -n c4ozw3b -A 10.17.248.116/255.255.255.0/en8
6.检查是否改变了
Verify the change
$ srvctl config nodeapps -n -a (10g and 11gR1)
$ srvctl config nodeapps -a (11gR2)


$ srvctl config nodeapps -n c4ozw3a -a
-n option has been deprecated.
Network exists: 1/10.17.248.0/255.255.255.0/en8, type static
VIP exists: /c4ozw3a-vip/10.17.248.115/10.17.248.0/255.255.255.0/en8, hosting node c4ozw3a
% srvctl config nodeapps -n c4ozw3b -a
Network exists: 1/10.17.248.0/255.255.255.0/en8, type static
VIP exists: /c4ozw3b-vip/10.17.248.116/10.17.248.0/255.255.255.0/en8, hosting node c4ozw3b


7.启动VIP资源
11gR2, as Grid Infrastructure owner:


$ srvctl start vip -n  
$ srvctl start listener -n
$ srvctl start instance -d -n      (optional)


eg,
$ srvctl start vip -n c4ozw3a 
$ srvctl start vip -n c4ozw3b
$ srvctl start listener -n c4ozw3a
$ srvctl start listener -n c4ozw3b
$ srvctl start instance -d orazw3 -n c4ozw3a
$ srvctl start instance -d orazw3 -n c4ozw3b


8.检查vip 成功与否
Verify the new VIP is ONLINE and bind to the public network interface


$ crs_stat -t (or $ crsctl stat res -t for 11gR2)


$ ifconfig -a
(netstat -in for HP or ipconfig /all for windows)


9.执行上述同样的步骤在集群里的另一个节点上(注:只需要对部分特定的内容进行修改)


10.修改listener.ora、tnsnames.ora 的与VIP相关的 LOCAL_LISTENER/REMOTE_LISTENER的参数(如果需要)


#############################################private ip 变更############################################
Case II. Changing private IP only without changing network interface, subnet and netmask
因为本次账务3迁移,private ip 的节点名、网段均一样,因此不需要在集群层更改,只需要在OS层更改即可;
1.关闭clusterware;
2.os 层修改private ip 
3.开启clusterware;
4.检查是否改变
  oifcfg getif
  
##############################################后续检查###################################################
1.修改listener.ora、tnsnames.ora 的与VIP相关的 LOCAL_LISTENER/REMOTE_LISTENER的参数(如果需要)
2.检查GRID 组件状态
crsctl stat rest -t 
3.检查vip是否修改成功
srvctl config nodeapps -a 
4.查看vip 是否已经在PUBLIC接口上
ifconfig -a
5.检查SCAN VIP 是否成功修改
srvctl config scan
6.检查SCAN LISTENER 状态
$GRID_HOME/bin/srvctl status scan_listener
$GRID_HOME/bin/srvctl config scan_listener
7.取消先前屏蔽的定时任务






来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29446986/viewspace-1453591/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29446986/viewspace-1453591/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值