HSQL中的数据迁移问题,新数据库不包含很少的表

时间:2022-08-04 00:00:53

I am currently responsible for migrating data for our application, for upgrading to new version.I am trying to migrate from HSQL to HSQL, later we will move on to other combinations.

我目前负责为我们的应用程序迁移数据,以便升级到新版本。我正在尝试从HSQL迁移到HSQL,稍后我们将继续进行其他组合。

So I have a stand alone utility to do this. I am using MockServletContext to initialize my services(this migration is to be done without starting the servers).

所以我有一个独立的实用程序来做到这一点。我正在使用MockServletContext初始化我的服务(这种迁移是在不启动服务器的情况下完成的)。

The problem is that all the tables are migrated except for 2-3 tables, the number depending on size of the data migrated. On extensive debugging I found nothing wrong. Meaning that all the data is getting migrated on debugging via eclipse, but on normal running it fails to complete for the last 3 tables.

问题是所有表都被迁移,除了2-3个表,数量取决于迁移的数据大小。在广泛的调试中,我发现没有错。这意味着所有数据都是通过eclipse在调试时迁移的,但在正常运行时,它无法在最后3个表中完成。

Any clue where to look at?

任何线索在哪里看?

In normal run I have put loggers to see if we are reading all the data from the source database and indeed the logs prove we do. The only place where I am unable to put logs is when it calls a method in driver.

在正常运行中,我已经让记录器查看我们是否正在读取源数据库中的所有数据,事实上日志证明我们这样做了。我无法放入日志的唯一地方是它在驱动程序中调用方法时。

In the last step we give a call to PreparedStatement object's executeBatch()/executeUpdate() methods(Tried with both but exactly same result).

在最后一步中,我们调用PreparedStatement对象的executeBatch()/ executeUpdate()方法(尝试两者但结果完全相同)。

I am completeley clueless what to do and where to look for. Any suggestions?

我完全无法做什么以及在哪里寻找。有什么建议么?

Thanks

谢谢

1 个解决方案

#1


0  

In normal run I have put loggers to see if we are reading all the data from the source database and indeed the logs prove we do. The only place where I am unable to put logs is when it calls a method in driver.

在正常运行中,我已经让记录器查看我们是否正在读取源数据库中的所有数据,事实上日志证明我们这样做了。我无法放入日志的唯一地方是它在驱动程序中调用方法时。

If you suspect something wrong there, try wrapping your driver in log4jdbc. It will show the SQL issued to DB. Good luck!

如果您怀疑有错误,请尝试将驱动程序包装在log4jdbc中。它将显示发布给DB的SQL。祝你好运!

#1


0  

In normal run I have put loggers to see if we are reading all the data from the source database and indeed the logs prove we do. The only place where I am unable to put logs is when it calls a method in driver.

在正常运行中,我已经让记录器查看我们是否正在读取源数据库中的所有数据,事实上日志证明我们这样做了。我无法放入日志的唯一地方是它在驱动程序中调用方法时。

If you suspect something wrong there, try wrapping your driver in log4jdbc. It will show the SQL issued to DB. Good luck!

如果您怀疑有错误,请尝试将驱动程序包装在log4jdbc中。它将显示发布给DB的SQL。祝你好运!