Database lock acquisition failure and hsqldb

前端 未结 8 2048
终归单人心
终归单人心 2020-12-30 00:00

I was trying to connect to a hsql db. I created one by running from C:\\myhsql:

java -cp .;C:\\hsql\\lib\\hsqldb.jar org.hsqldb.Server -database.0 file:db\\m         


        
8条回答
  •  生来不讨喜
    2020-12-30 00:34

    I face this error because I wanted to view a currently opened database in another client like IntelliJ database while the server is using the same db

    so to make hsql db able to be connected to multiple clients, use

    hsqldb.lock_file=false
    

    so the connection url will be like

    jdbc:hsqldb:file:./db/myDbInFile;hsqldb.lock_file=false
    

提交回复
热议问题