0

can someone tell me why the parameters that i'm inserting in the url connecting to the bank are not changing? for example: the hsqldb.full_log_replay = true property in the database remains false, I have already tried to recreate the bank and still have not changed

connectionSource = new JdbcConnectionSource("jdbc:hsqldb:file:./database/db;ifexists=false;" +
    "shutdown=true;hsqldb.lock_file=false;hsqldb.write_delay=false;hsqldb.full_log_replay=true",
    "SA", "", new HsqldbDatabaseType());
connection = DriverManager.getConnection("jdbc:hsqldb:file:./database/db;ifexists=false;" +
    "shutdown=true;hsqldb.lock_file=false;hsqldb.write_delay=false;hsqldb.full_log_replay=true");
flaxel
  • 4,173
  • 4
  • 17
  • 30

1 Answers1

0

The properties ifexists and shutdown are properties for an individual connection. But the property hsqlb.lock_file is a database operation property and the properties hsqldb.write_delay + hsqldb.full_log_replay are database file and memory properties. So these properties are not changed when you try to connect in the Java code. You can read more about it in the documentation.

If you still want to change the properties, you can create a db.properties file for your database. This file contains the properties for the database itself. This post describes other files that are created for the database.

flaxel
  • 4,173
  • 4
  • 17
  • 30
  • my database has a db.properties file, however when I put `hsqldb.full_log_replay` it changes the value in the database, but whenever I restart the database it removes the ownership of the database and changes the value back – Mateus Gonçalves Sep 24 '20 at 16:45
  • How do you restart the database? – flaxel Sep 24 '20 at 17:13
  • closing runManagerSwing.bat or closing my application, which contains the shutdown in the connection url, so I don't know if it deletes db.properties or if it just removes the property I added – Mateus Gonçalves Sep 24 '20 at 17:30
  • The best way to check if the file still exists after that is to check the file. But this should not be the case. I could not find out if the properties are deleted. Maybe the log file could help. – flaxel Sep 24 '20 at 18:33
  • Actually the properties file should be there. – flaxel Sep 24 '20 at 19:30
  • The properties that are not persisted in the database do not have an SQL equivalent (e.g. `hsqldb.full_log_replay`). Some other properties have an effect only on the connection that creates the database. – fredt Sep 28 '20 at 09:12