Subject | Re: Database corruption if users connected when "creating table..." |
---|---|
Author | Adam |
Post date | 2005-07-04T11:29:58Z |
--- In firebird-support@yahoogroups.com, "ddresse" <denis.dresse@d...>
wrote:
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
wrote:
> Do I need to shutdown the database to avoid DB corruption when IDenis,
> 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
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