是否将粘贴的Apache derby db文件复制到另一个系统中使其工作正常 [英] Does copy pasting Apache derby db files into another system make it work fine

查看:107
本文介绍了是否将粘贴的Apache derby db文件复制到另一个系统中使其工作正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用derby db开发了一个应用程序。我已经在系统中创建了数据库。我需要将应用程序与数据库一起交付。我已经从表中删除了所有数据。仅保留表(数据为空的结构)。因此,如果我将db文件(log,seg0,tmp,db.lck,service.properties所有这些都放在一个文件夹中)复制到另一个系统,是否可以正常工作?。

I have developed an application with derby db. I have created DB in my system. I need to deliver the application along with the db. I have deleted all the data from tables. Only the tables(structure with empty data) are remaining. So If I copy the db files (log,seg0,tmp,db.lck,service.properties all these in a single folder) to another system, will it work fine..?

推荐答案

是的,它可以正常工作,尽管对于最干净的流程,您应确保在复制数据库文件夹时没有应用程序正在访问数据库。

Yes, it will work fine, although for the cleanest flow you should ensure that no application is accessing the database at the time that you copy the database folder.

来自Derby文档: http ://db.apache.org/derby/docs/10.10/getstart/cgsintro.html

From the Derby docs: http://db.apache.org/derby/docs/10.10/getstart/cgsintro.html


磁盘上Derby使用的数据库格式是可移植的,并且与平台无关。您可以在机器之间移动Derby数据库,而无需修改数据。 Derby应用程序可以根据需要包括一个预先构建的,填充的数据库,并且该数据库可以在任何Derby配置中使用。

The on-disk database format used by Derby is portable and platform-independent. You can move Derby databases from machine to machine without needing to modify the data. A Derby application can include a pre-built, populated database if it needs to, and that database will work in any Derby configuration.

有关使用应用程序打包数据库的更多信息,请参见: http:// db.apache.org/derby/docs/10.10/devguide/cdevdeploy32171.html

For more information about packaging a database with your application, see: http://db.apache.org/derby/docs/10.10/devguide/cdevdeploy32171.html

这篇关于是否将粘贴的Apache derby db文件复制到另一个系统中使其工作正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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