Guest User

Untitled

a guest
May 16th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. UPDATE R
  2. SET IsOrphaned = 1, DebugTimestampUtc = GETUTCDATE()
  3. FROM
  4. RequestTable AS R
  5. LEFT JOIN sys.sysprocesses AS P ON
  6. P.spid = R.SPID
  7. WHERE P.spid IS NULL
  8.  
  9. INSERT INTO RequestTable(SPID, CreateTimestampUtc, ...)
  10. SELECT @@SPID, GETUTCDATE(), ...
  11. WAITFOR DELAY '00:00:30.000'
Add Comment
Please, Sign In to add comment