Seagate ST43401N/ND Informacje Techniczne Strona 86

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 85
6-6 Implement: Making Required Database Administration Changes
If Your Current Version is 4.x Adaptive Server Enterprise 11.5
To learn how to manage free space with thresholds, see the System
Administration Guide.
Sample Procedure
The following code fragment is a sample threshold procedure that
you can tune to suit your installation. This sample creates a threshold
procedure that dumps the transaction log to a tape device when the
last chance threshold is reached:
create procedure sp_thresholdaction
@dbname varchar(30),
@segmentname varchar(30),
@space_left int,
@status int
as
dump transaction @dbname to “/dev/rmt4”
/*
** if this is last-chance threshold, print LOG FULL
** @status is 1 (last-chance) or 0 (all others)
*/
if (@status&1) = 1
begin
print “LOG FULL: database ‘%1!’”, @dbname
end
Open Transactions
Even if a last chance threshold procedure exists to dump the
transaction log, a problem occurs if an open transaction is filling the
log. The
dump transaction command does not clear the log because of
the open transaction.
Note
The new
sysloghold
table enables you to identify open transactions. For
more information about this table, see the
Reference Supplement
.
The user who has the open transaction remains in suspend state,
keeping the transaction open. If this occurs, you can use the
lct_admin
unsuspend
function.
For information about
lct_admin, see the SQL Server Reference Manual.
It also describes how to set thresholds with
sp_addthreshold.
Przeglądanie stron 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag