Subject Re: [ib-support] How can I know that Forced writes on at RC2 ???
Author Helen Borrie
At 07:27 PM 03-01-02 +0200, you wrote:
>Hi all
>
> I read about the posts about coruppted database. Many of the post was
>recomending Forced writes on at Win32 platform. I'm using FB RC2. And when
>I'm trying to connect my database I see that if I use dpbDefault IBO uncheck
>the Forced Write On checkbox.

Burak,

You can use the command-line tool gstat to check whether Forced Writes is enabled.

In the command shell, go to the ..\bin directory of your server installation and type

gstat -header c:\data\mydb.gdb -user SYSDBA -password yourpwd

If forced writes is enabled, the output will show it in the Attributes section, near the end.


>Do I have to make some changes at server side? I take a look at ibconfig
>file but I can't see any parameter abour forced writes.

It is a setting which has to be made on the database when nobody is logged in. You can use the gfix command-line utility to perform the change:

Use the command-line tool gfix to enable/disable Forced Writes.

In the command shell, go to the ..\bin directory of your server installation.

If Forced writes is off and you want to enable it, type

gfix -w sync c:\data\mydb.gdb -user SYSDBA -password yourpwd

If it is successful you won't get any feedback, but just run the gstat -h command again as before to check the result.


>If I change this property to dpbTruet IBO always checks this.

I'm not sure what you mean here. You need to be careful how you use the ForcedWrites flag on TIB_Connection.

- if you set it to dpbDefault, the connection will simply accept the current ForcedWrites setting of the database
- if you set it to dpbTrue or dpbFalse, the setting will be attempted every time you connect. This will result in errors if the user logging in is not either SYSDBA or the database owner.

In other words, keep it at dpbDefault unless the application you are writing is an admin tool.

Helen


All for Open and Open for All
Firebird Open SQL Database ยท http://firebirdsql.org
_______________________________________________________