SQL Server Performance Forum – Threads Archive
fn_get_sql privelages ???Hi Everyone
As a developer in an OLTP/OLAP system which processes thousands of transaction/Reports a day, we often come across situations where performance /blocking are occurring. Using sp_who and various commands, I can work out what spid is causing the block etc.
However when it comes to finding out what SQL caused the issue I need to get hold of a DBA and get him to run the fn_get_sql function against that spid because it can only be run by a sysadmin. Can a developer be given privileges to use this function without being a member of sysadmin? The server is sql server 2000
From BOL: Permissions
Only members of the sysadmin fixed server role can run the fn_get_sql function.
SQL-Server-Performance.com Although nature commences with reason and ends in experience it is necessary for us to do the opposite, that is to commence with experience and from this to proceed to investigate the reason.
Leonardo Da Vinci Nunca esperes el reconocimiento de tus hijos, eso ocurrirÃ¡ luego de tu muerte
All postings are provided â€œAS ISâ€ with no warranties for accuracy.
It is better to keep this privilege to SYSADMIN, as it involves searching inside process of SQL connections. You can use that function efficiently as perhttp://vyaskn.tripod.com/fn_get_sql.htm link and login must be under SA privileges. Satya SKJ
Contributing Editor & Forums Moderator
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.
Agreed, you should team up with your DBA to address this issue. And granting sysadmin privileges on a prod box is no option. —
Microsoft SQL Server MVP
Heute schon gebloggt?http://www.insidesql.de/blogs
Thank you for your replies.