|
|
sybperl-l Archive
Up Prev Next
From: Kevin Stussman <kevins at gilman dot com>
Subject: Locking Databases
Date: Dec 3 1997 7:20PM
We are using a HR/Benefits package (many table, many database, many
interdependencies) that requires "select into / bulk copy" and "trunc
log on checkpoint" on all the time (don't get me started on the whys of
this...rrrrrgh)
I'm using Datatools "SQL Backtrack for Sybase" to do backups, but am
concerned that the backups will not have a consistent snapshot of the
databases (i.e. user updates might occur in between backups on
interdependent databases). The only solution I can think of is to write
a sybperl script that will put all the databases (except master and
tempdb) into read-only mode while the backups occur.
Are there any "gotchas" that someone who might be in a similar situation
has found? It seems fairly straightforward (get databases in an array,
check the time, run sp_dboption, do a checkpoint on that DB, check the
time, back out of the read-only). I would imagine this will just block
any processes until the DB is released, but a consistent backup is
critical.
Thanks for the help..
Kevin.
Sybase 11.0.2 / Solaris 2.5.1 / Perl 5.004_04 / Sybperl 2.08
|