SQL Server Performance

What bit for UDFs when using PERMISSIONS()?

Discussion in 'T-SQL Performance Tuning for Developers' started by Adriaan, Nov 18, 2005.

  1. Adriaan New Member

    As far as I can understand from BOL, you need to check the bit that corresponds to SELECT:<br /><br />PERMISSIONS(&lt;udf_objectid&gt<img src='/community/emoticons/emotion-5.gif' alt=';)' /> & 0x1<br /><br />However, this is only correct for UDFs that return a table.<br /><br />Also, this bit seems to apply only to dbowners and sysadmins, not to a member of a non-fixed database role that has SELECT permission on the function.<br /><br />If I use 0x20, which corresponds to EXECUTE permission on a procedure, I do get the correct result, but BOL says it only applies to procedures.<br /><br />Any opinions?
  2. Adriaan New Member

Share This Page