Problem setting permissions

  • Hello everybody,

    I ran into a strange kind of problem in SQL2K. I tryto give a user select permissions on fn_trace_getinfo, but then I apply the new permissions I get the message "Invalid object name system_functionschema.fn_trace_getinfo". How is this possible. I see the function and as sysadmin I can use it, but when you try to change permissions it says the object doesn't exist ???

    Does anybody know why this is happening and if there is some way around.

    Tia Markus

    [font="Verdana"]Markus Bohse[/font]

  • It's because it is a system function and not a user-defined one. You can't touch system functions in such a manner. For instance, do the same with any other system function and you'll receive the same error.

    K. Brian Kelley
    @kbriankelley

  • Brian,

    I understand that system functions are somehow different from user defined ones, but I expected at least some message saying you can't grant select permission instead of "Invalid objectname".

    And you can grant permissions on system tables and procedures, so why not functions?

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • I'm not sure, most likely because they are internal to SQL Server. They behave very differently than user-defined functions in a lot of regards. For instance, you can sp_helptext a user-defined function, but you cannot for a system one (because there isn't T-SQL code behind it). The @@<name> are also system functions, though they obviously have maintained the @@ prefix for backward compatibility. They too cannot receive permissions.

    K. Brian Kelley
    @kbriankelley

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply