Subject | Re: [IBO] Re: How to set forced writes? |
---|---|
Author | Helen Borrie |
Post date | 2008-07-03T09:44:06Z |
At 07:13 PM 3/07/2008, you wrote:
What is dangerous is to write applications that allow ordinary users to flip between async and synch write mode at will, with or without active connections to the database.
The whole issue of these DPB parameters that allow non-privileged users to change the database header is being discussed amongst the core developers now. Alex Peshkov has posted his intention to address the privileges issue for Fb 2.0, 2.1 and 2.5 ( http://tracker.firebirdsql.org/browse/CORE-1972 ). There's still the other issue of permitting the write mode (and some other DPB parameters that need protecting) - that discussion is ongoing.
Jason, this will affect IBO but exactly in what way is yet unknown.
Helen
>--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:Common sense should prevail here. Obviously, if you have exclusive access to a database and the network and power supply are stable, you can do this operation with FW off (i.e., write mode -async), if it helps to make a one-off job run faster.
>>
>> At 12:22 PM 1/07/2008, Calin Pirtea wrote:
>> >Hi Tiago,
>> >
>> >You can set forced writes programmatically using IBO if:
>> >1) Set the TIB_connection.ForcedWrites to True BEFORE you connect
>to the database.
>> >2) Connect to the database. Now the property will become read only
>however the database itself has forced writes turned on.
>> >
>> >Same applies if you want to reset the Forced Writes.
>>
>> Oops, Calin, it is true - and it is not meant to be.
>>
>> From ODS 10 onward, actions that change the header attributes of
>databases were meant to be accessed only through a SPB (Service
>Parameter Block), deprecating the old (and dangerous) situation that
>allows any user to do it through "any old DPB". Some of the old
>parameters became a bit flaky...but this one is alive and kicking. Oh
>dear, oh dear!
>>
>> Worse still, Firebird 2 and higher (ODS 11 and above) were meant to
>make this possible ONLY through a SPB, i.e. the honeymoon was meant to
>be over.
>>
>> But in fact *any user* can still change the write mode through the
>old API DPB and, hence, can still put the database into a state where
>FW is switched on or off whilst there are active attachments. Tested
>with both Fb 1.5.5 and 2.0.4. (Not tested with 2.1.x yet, but I have
>that sinking feeling that it might still be slipping beneath the QA
>radar....)
>>
>> But - PLEASE DON'T WRITE APPS THAT DO IT!
>Hi
>I wish I should !
>I have an replication app which I wrote using IBO DataPump and I
>populate a new database with only data belonging to the user. In some
>case (depending of the Win2003 server's parameters) It takes a long
>time to populate the database, and I wondered if creating the new
>database with Forced Write OFF would be a good idea ? The database is
>only accessed by my app and closed afterwards
What is dangerous is to write applications that allow ordinary users to flip between async and synch write mode at will, with or without active connections to the database.
The whole issue of these DPB parameters that allow non-privileged users to change the database header is being discussed amongst the core developers now. Alex Peshkov has posted his intention to address the privileges issue for Fb 2.0, 2.1 and 2.5 ( http://tracker.firebirdsql.org/browse/CORE-1972 ). There's still the other issue of permitting the write mode (and some other DPB parameters that need protecting) - that discussion is ongoing.
Jason, this will affect IBO but exactly in what way is yet unknown.
Helen