监控informix数据库变化
我想为我们正在开发的 Web 应用程序生成测试数据。我正在考虑的一种方法是,当我通过 Web 应用程序添加某些内容并执行一批操作时,是否有一种方法可以监视数据库(我们正在使用 informix),以便我可以看到在执行过程中插入了哪些数据运行时间,因此可以将这些数据导出为测试数据。
有什么想法吗?
谢谢。
I'd like to generate test data for a web application we're developing. One approach I am thinking about is that if there is a way to monitor the database (we're using informix) when I add something via our web application and do a batch of operations, so that I can see what data are inserted during the operation time and thus can export these data as test data.
Any idea ?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有多种选择,不同程度的合理性。您必须担心的一个问题是删除、更新、插入;跟踪插入很容易,删除很难。
其中,CDC 可能是最全面和最好的,但它需要使其工作的开销(设置过程 - 不是运行时开销;后者并不重要)。
基于触发的跟踪需要程序员和系统管理员的干预最少;设置起来很麻烦(而不是真正困难)。一旦您有了第一个表格的模板,其他表格就会系统地遵循;您只需编写一些脚本即可为需要跟踪的每个表创建正确的触发器。
There are various options, with varying degrees of plausibility. One issue you'll have to worry about is deletes vs updates vs inserts; tracking inserts is easy, deletes hard.
Of these, CDC is probably the most comprehensive and best, but it has overhead to get it working (setup process - not runtime overhead; the latter is not significant).
The trigger-based tracking requires least intervention from programmers and system administrators; it is fiddly (rather than truly difficult) to set up. Once you have a template for the first table, the other tables follow systematically; you just need to script something to create the correct triggers for each table you need to track.