java + sqlite: how to open database as read-only?

前端 未结 4 1391
南旧
南旧 2020-12-20 17:45

I have a large database that I want to open in read-only mode... I\'m using SQLiteJDBC and am not sure what to use to get it to work as read-only.

Can anyone help?

4条回答
  •  时光说笑
    2020-12-20 17:56

    Just want to add that when using HikariCP, you need two datasource properties:

    readOnly=true
    dataSource.open_mode=1
    

提交回复
热议问题