host_a 正在运行的数据库
host_b 用于恢复
操作步骤:
◆1.新建host_b机,安装操作系统,安装数据软件,只需要配置一下实例名就可以了,不需要初始化,把数据文件建立的和host_a机一样。
配置cfg文件的时候,把实例名做相应的更改即可。
◆2.host_b机安装rsh服务器软件,启动rsh服务。
◆3.配置host_b机信任host_a机。
◆4.在host_a上执行:
ontape -s -L 0 -F | rsh host_b "ontape -p"
实际执行的时候运行:
ontape -s -L 0 -F | rsh tonykorn9710 "ontape -p"
Please mount tape 1 on /dev/null and PRess Return to continue ...
Program over.
Physical restore failed - function read archive backup failed code 1 errno 0
或者:
ontape -s -L 0 | rsh tonykorn9710 "ontape -p"
Your evaluation license will expire on 2008-01-15 00:00:00
Please mount tape 1 on /dev/null and press Return to continue ...
Program over.
Physical restore failed - function read archive backup failed code 1 errno 0
informix@tonykorn97:~/etc>
◆5.需要把指使ontape 备份到标准输出:
ontape -s -L 0 -t STDIO | rsh tonykorn9710 "ontape -p -t STDIO"
用上面语句备份报错:
informix@tonykorn97:~/etc> ontape -s -L 0 -t STDIO -F| rsh tonykorn9710 "ontape -p -t STDIO"
Your evaluation license will expire on 2008-01-15 00:00:00
Backup data version is not compatible with Online version:
IBM Informix Dynamic Server Version 10.00.UC4
Physical restore failed - function Invalid archive tape failed code -1 errno 0
日志显示:
10:06:52 Maximum server connections 1
10:06:52 Level 0 Archive started on rootdbs, plogdbs, llogdbs, datadbs
10:06:53 Archive on rootdbs, plogdbs, llogdbs, datadbs ABORTED.
10:06:53 Aborted by client.
◆6.修改两台服务器的cfg文件,把TAPEDEV和LTAPEDEV都修改为:STDIO
重启host_a数据库。执行:
ontape -s -L 0 | rsh tonykorn9710 "ontape -p"
效果还是一样的。
◆7.经提示是rlogin服务没有起,启动rlogin服务。执行
informix@tonykorn97:~> ontape -s -L 0 | rsh tonykorn9710 "ontape -p"
Your evaluation license will expire on 2008-01-15 00:00:00
Backup data version is not compatible with Online version:
IBM Informix Dynamic Server Version 10.00.UC4
Physical restore failed - function Invalid archive tape failed code -1 errno 0
◆8.此时发现版本不一致,重新调整版本!
第一次执行:
informix@tonykorn97:~> ontape -s -L 0 | rsh tonykorn9710 "ontape -p"
Physical restore failed - Bad READ/WRITE permissions: '/informix.links/rootdbs'.
◆9.权限不对,重新执行:
ontape -s -L 0 | rsh tonykorn9710 "ontape -p"
成功!
◆10.host_b数据库一直在CKPT.没有办法杀掉进程。
[informix@Oracle10 ~]$ onstat -m
IBM Informix Dynamic Server Version 10.00.UC4 -- Fast Recovery (CKPT REQ) -- Up 07:21:33 -- 28024 Kbytes
Blocked:CKPT
◆11.重新执行
ontape -s -L 0 -F | rsh oracle10 "ontape -p"
7个小时后host_b机还是一直CKPT
IBM Informix Dynamic Server Version 10.00.UC4 -- Fast Recovery (CKPT REQ) -- Up 07:16:36 -- 28024 Kbytes
Blocked:CKPT
◆12.在host_b服务器上把数据库重启即可。
新闻热点
疑难解答