Subject Re: Database corruption if users connected when "creating table..."
Author ddresse
Thanks for your answer.

I mean a real corruption of database (instead of data incoherancy),
that makes the database totally unsusable.

I had the case once on the test database... And I wonder what have
they made to corrupt this database, except as modifying structure when
users where still using it.

The problem is that it is really difficult to shut the database as
users are active night and days without interruption and it is really
difficult to expulse users... (it is used in a hospital)

Denis

--- In firebird-support@yahoogroups.com, "Adam" <s3057043@y...> wrote:
> --- In firebird-support@yahoogroups.com, "ddresse" <denis.dresse@d...>
> wrote:
> > Do I need to shutdown the database to avoid DB corruption when I
> > modify the structure of the database with SQL as "create table, alter
> > table..., compute index selectivity, verify...", via a tool as
IBExpert.
> >
> > Is there a risk of corruption if workers are still connected ?
> >
> > Denis
>
> Denis,
>
> The metadata changes will fail if another user is using those tables,
> so the risk is that you think you have changed the structure but in
> fact you haven't. Metadata changes really shouldn't be done on a live
> database. You can put the database into shutdown mode, which prevents
> anyone except sysdba and the owner from connecting.
>
> Commenting out the alias also does the trick :)
>
> Btw, unless I am mistaken, computing selectivity / sweep / verify are
> not metadata changes in their own right. Create table is safe because
> no-one will know of its existence beforehand, however someone could
> theoretically use it after you create it but before you set up foreign
> keys etc, so it is probably better in offline mode.
>
> Adam