如何将德比改为READ / WRITE模式 [英] how can change derby to READ/WRITE mode
问题描述
我有一个Derby数据库,它给我一个只读错误。数据库工作正常,直到上周磁盘空间不足:
I have a Derby database that is giving me a read-only error. The database was working fine, up until last week when disk ran out of space:
Caused by: java.io.IOException: No space left on device
at java.io.RandomAccessFile.writeBytes0(Native Method)
at java.io.RandomAccessFile.writeBytes(RandomAccessFile.java:520)
at java.io.RandomAccessFile.write(RandomAccessFile.java:550)
at org.apache.derby.impl.store.raw.log.LogAccessFile.writeToLog(Unknown Source)
at org.apache.derby.impl.store.raw.log.LogAccessFile.flushDirtyBuffers(Unknown Source)
... 23 more
I清理磁盘,有80%的磁盘被释放为德比。但是derby仍处于只读模式:
I cleaned up disk and there are 80% of disk is freed for derby. But the derby is still in read-only mode:
java.sql.SQLException: An SQL data change is not permitted for a read-only connection, user or database.
org.apache.derby.impl.jdbc.EmbedSQLException: An SQL data change is not permitted for a read-only connection, user or database.
org.apache.derby.iapi.error.StandardException: An SQL data change is not permitted for a read-only connection, user or database.
我发现有一个db.lck文件(文件大小为0),我可以删除那档案?有没有其他方法可以改变它的读/写模式?
谢谢!
I found there is a db.lck file (which file size is 0) there, can I remove that file? Is there any other way to change it read/write mode? Thank you!
推荐答案
我清理了磁盘,但我没有重新启动连接到derby的java进程。我杀了进程并重新启动它,derby处于读/写模式。
I cleaned up disk but I didn't reboot my java process which connected to derby. I killed the process and restarted it, derby is in read/write mode.
这篇关于如何将德比改为READ / WRITE模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!