开发者

Executing TRACEON in a Stored Procedure as a public user

Running SQL Server 2000.

I have a linked server over ODBC to Providex data files. Never mind mind if you are not familiar with them, the point is that for SQL Server to be able to select from the linked server, an arcane and undocumented TRACE needs to be turned on.

The exact command is: DBCC TRACEON(8765)

The problem is that i need to turn this trace on from within a stored procedure that is being called from a client app running as a public user, which causes a permission denied error.

Microsoft says that in开发者_JAVA百科 order to run TRACEON you must be a member of sysadmin.

Any way around it?

Thanks


Why do you need to set it inside the procedure rather than having someone with appropriate permissions set it at the server level? As Microsoft states in the link you cited:

"On a production server, to avoid unpredictable behavior, we recommend that you only enable trace flags server-wide"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜