Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Execution based on completion of another transaction or session

$
0
0
Hi,I need a conditional logic or a logical script that would execute a script from another session (spid) when one of the session completes. For e.g if I am running dbcc shrinkfile for which the percentage gets recorded in sys.dm_exec_requests from say spid = 65 and I need to execute another script from say session id = 68 based on the completion of script in session id 65. How would I achieve that goal. I don't want to monitor the process whole night and then execute the script. I have a tight window and I don't want to be awake whole night for this. I know one way would be to execute this in separate batches in a single sesssion, but I don't want to go that route. Also, I need to consider a situation where I am half way down the shrink or any process for that matter and now I can't afford to roll back and start afresh. I need something handy that I can rely on that will do my work.Regards,Feivel

Viewing all articles
Browse latest Browse all 3145

Trending Articles