回退Informix数据库 [英] Rollback informix database

查看:84
本文介绍了回退Informix数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些使用Informix 11.5数据库的代码,我想对该数据库进行一些测试.

I have some code that uses an Informix 11.5 database that I want to run some tests against.

如果测试失败,它们通常会使数据库处于不一致状态,需要手动解决该问题,然后才能再次运行测试.

If the tests fail they will often leave the database in an inconsistent state that needs to be manually resolved before the tests can be run again.

我想使它自动化,以便在再次运行测试之前不需要手动干预.

I would like to automate this so that the tests do not require manual intervention before running the tests again.

我当前的解决方案是编写一些代码进行清理,但这意味着只要新功能中可能出现新的不一致状态,就必须维护代码.

My current solution is to write some code that does the cleanup, but this means the code must be maintained whenever potential new inconsistent states can occur in new features.

代码运行许多存储过程,它们本身经常使用事务.由于Informix不支持嵌套事务,所以我不能仅将所有工作包装在一个大事务中.

The code runs a lot of stored procedures, which themselves often use transactions. As Informix does not support nested transactions I can't just wrap up all the work in one big transaction.

还有另一种创建检查点的方法,可以将数据库还原到该检查点?

Is there another way to create a checkpoint which I can restore the database back to?

推荐答案

您可以使用撤消磁盘创建虚拟机,并且在运行测试后,您可以关闭虚拟机而不保存更改.就像您从未进行过测试一样!

You could create a virtual machine with an undo disk and after you run the test you can close the virtual machine without saving the changes. It's equivalent to like you never ran the tests!

这篇关于回退Informix数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆