motioneye
asked on
Sybase sp_thresholdaction
I have a following sp_thresholdaction in ASE 15. I have added another threshold in db UPMVat, but now I'm just curious when I should trigger the action? or ASE will do automatic sp_thresholdaction when the db UPMVat reach the threshold defined ?
1> sp_helptext sp_thresholdaction
2>
# Lines of Text
---------------
1
(1 row affected)
text
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----
create proc sp_thresholdaction (@dbname varchar(30), @segment_name varchar(30), @space_left int, @status int)
as
begin
dump tran @dbname with truncate_only
return 0
end
(1 row affected)
(return status = 0)
1> use UPMVAT
2>
1> sp_helpthreshold
2>
segment name free pages last chance? threshold procedure
-------------------------- -- ------------------------ -------------------------- -- -------------------------- ---------- ------
logsegment 500 0 sp_thresholdaction
logsegment 192 1 sp_thresholdaction
(2 rows affected)
(return status = 0)
1>
1> sp_helptext sp_thresholdaction
2>
# Lines of Text
---------------
1
(1 row affected)
text
--------------------------
create proc sp_thresholdaction (@dbname varchar(30), @segment_name varchar(30), @space_left int, @status int)
as
begin
dump tran @dbname with truncate_only
return 0
end
(1 row affected)
(return status = 0)
1> use UPMVAT
2>
1> sp_helpthreshold
2>
segment name free pages last chance? threshold procedure
--------------------------
logsegment 500 0 sp_thresholdaction
logsegment 192 1 sp_thresholdaction
(2 rows affected)
(return status = 0)
1>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As example below, I have two threshold for one of the db, does it means dump transaction will trigger twice when free pages fall at 500 and subsequently as low as below 192 ?
1> sp_helpthreshold
2>
segment name free pages last chance? threshold procedure
--------------------------
logsegment 500 0 sp_thresholdaction
logsegment 192 1 sp_thresholdaction