Informix 11.50升级到Gbase 8t 下载本文

内容发布更新时间 : 2024/5/28 20:52:42星期一 下面是文章的全部内容请认真阅读。

数据库升级操作前准备

? 操作前检查

用于新版本数据库安装的空闲磁盘空间充足;

数据库rootdbs及其它dbspace有不少于10%的空闲空间; 相关命令:onstat -d 检查剩余空间

所有库中的表和索引可扩展区段数不少于10个,少于10个需先重建表; ? 数据库备份

在完全停止业务后,在主机上执行数据库备份。(备份操作会校验库表,建议提前完成数据库0级备份) ? 数据库参数配置文件备份

在主备机上均执行原参数配置文件onconfig备份,sqlhosts文件,用户环境文件.bash_profile ? 关闭并删除sysadmin库

进入$INFORMIXDIR/etc/sysadmin目录下执行

[informix@rhel64 sysadmin]$ dbaccess sysmaster db_uninstall.sql [informix@rhel64 sysadmin]$ touch stop

? 原informix用户目录/opt/IBM/informix备份(使用root用户操作)

[root@rhel64 informix]# tar -cvf ids1150fc6.tar * ? 新数据库版本软件包安装

按照正常数据库安装步骤指定/opt/gbase8t为INFORMIXDIR安装Gbase 8t版本数据库软件,但不执行初始化操作。建议停止运行sysadmin库。

[root@rhel64 install]#./ ids_install [informix@rhel64 sysadmin]$ touch stop

按照informix 11.50的配置文件onconfig和sqlhosts配置gbase 8t的配置文件onconfig和sqlhosts ? 业务停止

为保证数据库升级期间不受业务外部连接影响,升级过程中需临时修改SQLHOSTS文件中所有端口,以保证不被外部连接。

数据库升级操作具体步骤

以下操作均由informix帐户执行

1. 关闭数据库

[informix@rhel64 informix]$ onmode -ky

2. 修改SQLHOSTS,启动数据库到静模式,再切换到On-Line,验证数据库不存在打开的事务

[informix@rhel64 informix]$ oninit –s [informix@rhel64 informix]$ oninit –m

3. 验证数据完整性(该操作可能需要很长时间)

[informix@rhel64 informix]$ oncheck -cr [informix@rhel64 informix]$ oncheck -ce

[informix@rhel64 informix]$ oncheck -cc DBNAME

[informix@rhel64 informix]$ oncheck -cDI DBNAM --该操作需要很长的时间

4. 关闭数据库,更新环境变量,将INFORMIXDIR指向Gbase 8t

安装目录/opt/gbase8t

[informix@rhel64 informix]$ onmode -ky

5. 启动数据库,自动完成数据库升级转换

[informix@rhel64 gbase8t]$ oninit -vy

在自动转换的过程中,使用onstat -m查看数据库升级转换过程。

6. 检查新版本数据库状态

使用onstat -,onstat -m等数据库检查命令确认数据库运行正常,使用dbaccess等命令测试数据库连接。确认数据库运行正常。 [informix@rhel64 gbase8t]$ onstat - [informix@rhel64 gbase8t]$ dbaccess -

7. 数据库执行统计更新

数据库升级后,需对数据库进行统计更新操作。停止AUS功能,分别对sysmaster库和业务库做统计更新。 SQL> update statistics;

8. 对新版本数据库进行一致性检查,首次0级备份

数据库升级完成后,需要对数据库做一致性检查 [informix@rhel64 gbase8t]$ oncheck -cr [informix@rhel64 gbase8t]$ oncheck -ce

[informix@rhel64 gbase8t]$ oncheck -cc DBNAME

[informix@rhel64 gbase8t]$ oncheck -cDI DBNAME --该操作需要很长的时间

然后需要对数据库做首次0级备份。