|
|
sybperl-l Archive
Up Prev Next
From: Kevin Stussman <kevins at gilman dot com>
Subject: RE: Locking Databases
Date: Dec 4 1997 7:44PM
>The problem is that you can't put the databases in read-only
mode
>if users are using them (ie if some user has done a 'use
database'
>for the database that you want to set to read-only).
>
>The other option is to set the database to single user mode,
but
>for that you also need to make sure that no users are connected
to
>the databases.
Is there any way to log out all users and/or suspend transactions? (sort
of put the entire sybase DB into a "sa only" mode..like an
administrative shutdown) It seems odd that there aren't more people
doing this sort of DB backup consistency locking. Even with the
transaction log, this problem would occur.
For example:
Databases A and B are interdependent. When we backup A, a user updates B
and then updates A, but after the backup has finished. Now the process
updates A and ends. Backup on B now completes. Perhaps this has to do
with what a "transaction" is (i.e. where a rollback would occur (after
just update A or after A and B together)) But assuming it wasn't written
well....
On my tape I now have A out of sync with B and a potentially big
problem. The only solution (that I can find anyway) is to lock (read
only) both DBs and then perform a backup on both. But it sounds like if
there is a rogue "use A" out there, this is not a good option.
What a world! What a world! :-)
Thanks..
Kevin.
|