views:

20

answers:

1

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 order to run TRACEON you must be a member of sysadmin.
Any way around it?

Thanks

+1  A: 

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"

Joe Stefanelli
This is an undocumented trace, and i therefore have no idea what else it affects. i don't want to turn it on globally. there are lots of other databases on the server.
Make it useful Keep it simple