Does copy pasting Apache derby db files into another system make it work fine

一笑奈何 提交于 2019-12-11 01:54:13

问题


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..?


回答1:


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.

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

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.

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



来源:https://stackoverflow.com/questions/20933116/does-copy-pasting-apache-derby-db-files-into-another-system-make-it-work-fine

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!