Subject Re: how to set forcedwrites=off
Author judlian23
As always, I appreciate the help and quick responses, Roman.

I am trying: trying
DriverManager.getConnection("jdbc:firebirdsql:embedded:/home/jbu/dbtesting/data/firebirddb.fdb?force_write=0");

and getting error message attached to this message.

Anyone know what's going on?

-Julian

ERROR MESSAGE:

Nov 11, 2008 3:44:57 PM Main createDatabase
SEVERE: null
org.firebirdsql.gds.GDSException: I/O error for file open O_CREAT
"/home/jbu/dbtesting/data/firebirddb.fdb?force_write=0"
Error while trying to create file
null
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.native_isc_create_database(Native
Method)
at
org.firebirdsql.gds.impl.jni.BaseGDSImpl.iscCreateDatabase(BaseGDSImpl.java:269)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.firebirdsql.gds.impl.jni.GDSSynchronizationPolicy$AbstractSynchronizationPolicy.invoke(GDSSynchronizationPolicy.java:121)
at $Proxy0.iscCreateDatabase(Unknown Source)
at
org.firebirdsql.management.FBManager.createDatabase(FBManager.java:383)
at Main.createDatabase(Main.java:46)
at Main.main(Main.java:230)




--- In Firebird-Java@yahoogroups.com, Roman Rokytskyy <roman@...> wrote:
>
> > Is there a way to turn forced/synchronous writes off through JDBC
> > using the embedded firebird version?
>
> The easiest way - use appropriate flag in connection parameters:
>
> switch it off:
> jdbc:firebirdsql:localhost:c:/databases/my.fdb?force_write=0
>
> switch it on:
> jdbc:firebirdsql:localhost:c:/databases/my.fdb?force_write=1
>
> Works, but not nice - breaks logical structure.
>
> More correct is to use FBMaintenanceManager class - there is a method
> for it.
>
> Roman
>