sp_tempdb  sp_transactions

Chapter 1: System Procedures

sp_thresholdaction

Description

Executes automatically when the number of free pages on the log segment falls below the last-chance threshold, unless the threshold is associated with a different procedure. Sybase does not provide this procedure.

Syntax

When a threshold is crossed, Adaptive Server passes the following parameters to the threshold procedure by position:

sp_thresholdaction @dbname,
	@segment_name,
	@space_left,
	@status

Parameters

@dbname

is the name of a database where the threshold was reached.

@segment_name

is the name of the segment where the threshold was reached.

@space_left

is the threshold size, in logical pages.

@status

is 1 for the last-chance threshold; 0 for all other thresholds.

Examples

Example 1

Creates a threshold procedure for the last-chance threshold that dumps the transaction log to a tape device:

create procedure sp_thresholdaction 
        @dbname varchar(30),
        @segmentname varchar(30),
        @space_left int,
        @status int
as
        dump transaction @dbname to tapedump1

Usage


Waking suspended processes

Permissions

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

Commands create procedure, dump transaction

System procedures sp_addthreshold, sp_dboption, sp_dropthreshold, sp_helpsegment, sp_helpthreshold, sp_modifythreshold, sp_who





Copyright © 2005. Sybase Inc. All rights reserved. sp_transactions

View this book as PDF