11
我用CONTEXT_INFO
跳過觸發這樣:如何設置CONTEXT_INFO = NULL?
IF CONTEXT_INFO() = 0x676E6F7468692073656175746F6E RETURN
,並在我的PROC:
IF CONTEXT_INFO() IS NOT NULL SET @CONTEXT_INFO = CONTEXT_INFO() -- to restore later
SET CONTEXT_INFO 0x676E6F7468692073656175746F6E
如何將其重新設置爲NULL,如果你需要的? SET CONTEXT_INFO = NULL
確實不是工作。我錯過了明顯的東西嗎?
但是在它被定義之前它是空的:select context_info() – SQLMason
+1用於提示sys.sysprocesses – SQLMason
@DanAndrews - 如果它被清零'select context_info()'返回'NULL'。即'SET CONTEXT_INFO 0x; select context_info()' –