HSQLDB Database Connection Close Doesn’t Write to Disk - Solution , HSQLDB 데이터베이스 연결을 닫습니다을 디스크에 기록하지 않습니다 - 솔루션
HSQLDB, the famous fast RDBMS written in Java, introduced a new feature which affects code ported over from previous versions. , HSQLDB, 자바로 작성된 유명 패스트 rdbms 소개 이상의 새 기능 이전 버전에서 어떤 영향을 미치는 코드를 포팅합니다. From version 1.7.2, in-process databases are no longer closed when the last connection to the database is explicitly closed via JDBC. 버전 1.7.2, - 프로세스 데이터베이스는 더 이상 데이터베이스에 대한 연결을 폐쇄하면 마지막으로 jdbc를 통해 명시적으로 폐쇄합니다. Effectively your data is not written to disk even if you exit the program (say for database opened within application). 귀하의 데이터가 디스크에 효과적으로 작성되지 않은 경우에도 프로그램을 종료합니다 (예 : 시간에 대한 데이터베이스를 열 응용 프로그램). Also it prevents opening the database next time around as a lock file (.lck) has been created to indicate that the data has not been commited to disk. 또한, 다음 번에 데이터베이스를 열어 주위를 방지 잠금 파일 (. lck)이 만들어졌습니다을 나타낼을 디스크에 데이터를 커밋되지 않았습니다. There are two solutions to this issue. 이 문제에는 두 가지 솔루션을합니다.
You can either issue an explicit SHUTDOWN command through executeQuery. 중 하나에 대해 명시적인 시스템 종료 명령을 통해 문제를하실 수있습니다 executequery합니다. It will effectively shutdown the database and commit all data to disk. 이 데이터베이스를 효과적으로 종료하고 모든 데이터를 디스크에 커밋합니다.
A simpler way is to slightly alter your DriverManager.getConnection statement to ensure the database is closed after the last connection has been closed. 간단한 방법은 약간의 변경을 보장하기 위해 데이터베이스가 닫힌 후 drivermanager.getconnection 성명의 마지막 연결이 폐쇄합니다. This is what I use - 이건 내가 사용 -
DriverManager.getConnection(”jdbc:hsqldb:file:” + database + “ ;shutdown=true “, “sa”, “”); drivermanager.getconnection ( "jdbc :, HSQLDB : 파일 :"+ 데이터베이스 + "; 종료 = 진실", "에", "");
Filed under 밑에 Database 데이터베이스를 , How To 하는 방법을 , Java Software 자바 소프트웨어 , RDBMS rdbms , Tech Note 기술 참고 사항 | |
| |
RSS 2.0 rss 2.0 | |
Email this Article 전자 우편이 문서
You may also like to read 같은를 읽을 수있습니다 |





July 16th, 2006 at 6:46 am 2006년 7월 16일에서 오전 6시 46분
[...] http://blog.taragana.com/index.php/archive/hsqldb-database-connection-close-doesnt-write-to-disk-solution/ [...]