用户跟踪在SQl Server 2012 SP4上消失 [英] User Trace disappears on SQl Server 2012 SP4
问题描述
您好,
我使用"SP_TRACE_CREATE"创建了一个用户跟踪并使用"SP_TRACE_SETEVENT"添加了一些事件并使用"SP_TRACE_SETSTATUS"启动跟踪。我能够通过Traceid"2"看到我的踪迹。状态为"1"的状态
当我查询 " select * from sys.traces"
我已在3个单独的SQL Server上完成此操作,过了一段时间后,我没有查看我在两台服务器上创建的用户跟踪。我已经做了3到4次,每次都会发生,跟踪出现一段时间然后消失,只有"系统
跟踪"使用traceid 1是可见的。
有什么我做错了或有关为什么会发生这种情况的想法吗?
提前非常感谢。
SG
偶然地,对sp_trace_create的调用是否包含了跟踪的停止时间?在这种情况下,跟踪将在那时自毁。
另一种可能性是系统中的其他用户不喜欢跟踪并停止并删除它。
Hi,
I have created an user trace using "SP_TRACE_CREATE" and added some events using "SP_TRACE_SETEVENT" and started the trace using "SP_TRACE_SETSTATUS". I was able to see my trace with Traceid "2" with status "1" when I query "select * from sys.traces"
I have done this on 3 separate SQL Servers and after some time, I don't see the user trace I've created on two of the servers. I've did this 3 to 4 times and it happens every time, trace appears for some time and then gone, only "system trace" with traceid 1 is visible.
Is there something I'm doing wrong or any ideas as to why this happens?
Thank you so much in advance.
SG
By chance, did the call to sp_trace_create include a stop time for the trace? In that case, the trace will self-destruct at that time.
The other possibility is that some other user on the system did not like the trace and stopped and deleted it.
这篇关于用户跟踪在SQl Server 2012 SP4上消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!