Subject Re: [ib-support] Backup and restore of a database
Author Anthony Ison
Thank you, Helen.

This has been a terrific summary of everything I need to solve this problem.

> >Is it possible to disconnect a single database without taking down the
whole
> >server?
>
> Yes. You need to get exclusive access by performing a gfix -shut[down]
> with the -force switch if necessary.
>
> >I need to run 2 applications and allow access to one while
> >maintaining the other.... Also, is renaming a database the same as
copying
> >the file? That is, can renaming the file corrupt the database as well?
>
> No. In fact, if any connections are active, you won't be able to rename
> the database. That's a good test for whether it's clear to carry on
> maintenance. (Gbak backups and sweeps don't need a shut-down db
though...)
>
> >I
> >seem to be able to copy a database while connected and copy it back over
> >itself....
>
> Yes, for sure you can copy it while connected (but don't!) On Win2K, I
> can't manage to overwrite an open DB file but I can't say whether other OS
> variants will allow it. Another problem that can give corruption occurs
if
> you allow users to log in during a database restore. Once the operating
> system has begun to lay down the file to disk, there's nothing to stop
this
> happening.

That is suprising. Win2k is what just used to test this...

> > > You shouldn't even try to perform metadata updates whilst you don't
have
> > > exclusive access to the database...
> >
> >Is it possible to enforce this without shutting down the server?
>
> Yes - do a shutdown -force. Once the shutdown is in effect, nobody else
> can then log in. You will have exclusive access then until you log
> out. Warning: if another user tries to log in as sysdba, owner or root,
> shutdown won't stop them. I assume you have these basic security things
> taken care of.