|
lct_admin()
lct_admin("lastchance")
lct_admin("logfull")
lct_admin("reserved_for_rollbacks")
lct_admin("reserved")
lct_admin("abort")
lct_admin("logsegment_freepages")
lct_admin("num_logpages")
The
system function
lct_admin is a
function
for administering the
LCT
(Last Chance Threshold). It can modify the LCT, determine its current
value
and abort
transactions
in a
transaction log
which has crossed the LCT. lct_admin() can be executed by any
user.
The only exception is lct_admin("abort"), which can only be executed by users with
sa_role,
i.e by a system administrator. lct_admin() is a
Transact-SQL
extension.
Syntax of the System Function lct_admin()
lct_admin({{"lastchance" | "logfull" | "reserved_for_rollbacks"}, db_id
| "reserve", {log_pages | 0 }
| "abort", spid[, db_id]
| {"logsegment_freepages" | "num_logpages"}, db_id})
The Parameters of the System Function lct_admin()
"lastchance"
The parameter "lastchance" creates a
LCT
(Last Chance Threshold) in the
database
specified in the parameter db_id . (See also:
lct_admin("lastchance")).
"logfull"
The parameter "logfull" returns 1 if the LCT in the specified database
has been crossed.
If the LTC has not been crossed, the return value is 0 .
(See also:
lct_admin("logfull")).
"reserved_for_rollbacks"
The parameter "reserved_for_rollbacks" determines the number of
pages,
a given database has currently reserved for
rollbacks.
(See also:
lct_admin("reserved_for_rollbacks")).
"reserve"
The parameter "reserve" either determines the current
valule
of the
LCTs
or returns the minimum number of
log pages,
which have to be free in order to be able to
dump
the
transaction log.
(See also:
lct_admin("reserved"))
"log_pages"
The parameter "log_pages" is the number of
pages
in the
transaction log.
This is a dynamic value in databases, which have their
log-segments
mixed with
data-segments.
Databases with seperate log and data segments have fixed values, relative to the
overall size of the respective
transaction log.
"0"
The parameter "0" determines the current
value
of the
LCT.
This is a dynamic value in databases, which have their
log-segments
mixed with
data-segments.
Databases with seperate log and data segments have fixed values, relative to the
overall size of the respective
transaction log.
"abort"
The parameter "abort" terminates a
transaction
in a
database
where the
transaction log
has crossed the
LCT
and where transactions are stuck in
LOG SUSPEND
mode. (See also:
lct_admin("abort"))
"spid"
The parameter "spid" is the server process id of a
transaction
stuck in the transaction mode
LOG SUSPEND.
If the spid "0"
is used in connection with the parameter "db_id",
all pending transactions in the specified database are aborted.
"db_id"
The parameter "db_id"
is used to specify the database in which the
transaction log
has crossed the
LCT
and where transactions are stuck in
LOG SUSPEND
mode. The db_id can be retrieved from the
column
dbid of the
system table
sysdatabases
or using the
stored procedure
sp_helpdb.
"logsegment_freepages"
The parameter "logsegment_freepages" returns the free space available in the
log segment
of the specified
database.
The parameter "logsegment_freepages" is available in ASE starting with
version 12.5.
(See also:
lct_admin("logsegment_freepages"))
"num_logpages"
The parameter "num_logpages" returns the currently allocated log pages for
the database specified with "db_id".
The parameter "num_logpages" is available in ASE starting with version 12.5.
(See also:
lct_admin("num_logpages"))
See also:
dump transaction,
sp_thresholdaction,
See also:
ASE T-SQL - Aggregate Functions, audit_event_name(), col_length(), col_name(), curunreservedpgs(), datachange(), datalength(), data_pages(), data_pgs(), db_id(), db_name(), host_id(), host_name(), identity(), index_col(), index_colorder(), isnull(), license_enabled(), lockscheme(), next_identity(), object_id(), object_name(), pagesize(), pointer_size(), ptn_data_pgs(), reserved_pages(), reserved_pgs(), rowcnt(), row_count(), showplan_in_xml(), syb_sendmsg(), syb_sendmsg(), System Functions, tempdb_id(), tran_dumpable_status(), tsequal(), used_pages(), used_pgs().
|