Subject Re: [firebird-support] How to mark a database read-only?
Author Ann W. Harrison
Helen Borrie wrote:
>>
>> gfix -user SYSDBA -password masterkey dbfile -mode read_only
>>
>> which makes it possible to do queries on a database file which is
>> read-only (located on a read-only filesystem for example). Is there a
>> way to accomplish that using a SQL command instead?
>
> No: it is an API function call.

To amplify Helen's answer, you can use the API call to connect to
the database providing a parameter that will make the database read
only.

The call is isc_attach_database - you'll find examples in the sources -
probably the file exe.cpp from gfix (which is called alice in the source
tree) is the most useful.


Regards,


Ann