Commit 539e54c8 authored by carplaptop's avatar carplaptop

minor updates

parent d521b54f
if not exists (select * from PerformanceCollector.Version)
BEGIN
INSERT INTO PerformanceCollector.Version VALUES ('1.1',GETDATE(),'PerformanceCollector','Install')
INSERT INTO PerformanceCollector.Version VALUES ('1.2',GETDATE(),'PerformanceCollector','Install')
END
ELSE
BEGIN
UPDATE PerformanceCollector.Version SET
ID = '1.1_HIT',
ID = '1.2',
ApplyDTime = GETDATE(),
CntcName = 'PerformanceCollector',
LastCngText = 'Upgrade'
......
......@@ -8,7 +8,7 @@ BEGIN
--------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------
--
-- Run Add-in Stored Procedures ( All SPs w/ name Addin% with ConfigValInt = 1)
-- Run Add-in Stored Procedures ( All SPs w/ name Addin%)
--
--------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------
......
......@@ -174,31 +174,31 @@ DECLARE @OUTPUT TABLE (
--at least one other connection, the original connection must be abandoned for at least 5 minutes, and the other connection
--waiting for at least 1 minute.
DECLARE @exec_str varchar(4000);
--DECLARE @exec_str varchar(4000);
DECLARE Killer CURSOR FOR
SELECT spid
FROM @OUTPUT
WHERE tran_iso_level = 99 --'Abandoned Blocking Spid for > 60 sec?'
AND DATEDIFF(s,last_batch,CurrTime) > 300 --spid has to be out there for 5 mins.
AND login_name NOT LIKE '___SIB%' --disregard SIB...architecture will block by design.
OPEN Killer
FETCH NEXT FROM Killer INTO @spid
WHILE (@@FETCH_STATUS = 0)
BEGIN
BEGIN TRY
SELECT @exec_str = 'Kill ' + convert(varchar(20),@spid)
EXEC (@exec_str)
INSERT INTO PerformanceCollector.SpidsKilled VALUES (@RiteNow,@spid,'Success')
END TRY
BEGIN CATCH
INSERT INTO PerformanceCollector.SpidsKilled VALUES (@RiteNow,@spid,ERROR_MESSAGE())
END CATCH
-- DECLARE Killer CURSOR FOR
-- SELECT spid
-- FROM @OUTPUT
-- WHERE tran_iso_level = 99 --'Abandoned Blocking Spid for > 60 sec?'
-- AND DATEDIFF(s,last_batch,CurrTime) > 300 --spid has to be out there for 5 mins.
-- AND login_name NOT LIKE '___SIB%' --disregard SIB...architecture will block by design.
-- OPEN Killer
-- FETCH NEXT FROM Killer INTO @spid
-- WHILE (@@FETCH_STATUS = 0)
-- BEGIN
-- BEGIN TRY
-- SELECT @exec_str = 'Kill ' + convert(varchar(20),@spid)
-- EXEC (@exec_str)
-- INSERT INTO PerformanceCollector.SpidsKilled VALUES (@RiteNow,@spid,'Success')
-- END TRY
-- BEGIN CATCH
-- INSERT INTO PerformanceCollector.SpidsKilled VALUES (@RiteNow,@spid,ERROR_MESSAGE())
-- END CATCH
FETCH NEXT FROM Killer INTO @spid
END
CLOSE Killer
DEALLOCATE Killer
-- FETCH NEXT FROM Killer INTO @spid
-- END
-- CLOSE Killer
-- DEALLOCATE Killer
EXEC PerformanceCollector.TempDbAllocationLogger ;
EXEC PerformanceCollector.TempDbLogger
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment