sp_helprotect

  • I have a problem where I am trying to export some permissions. I try running sp_helprotect and it works in most databases, but in a couple, it gives this error:

     

     

    Server: Msg 515, Level 16, State 2, Procedure sp_helprotect, Line 105

    Cannot insert the value NULL into column '', table ''; column does not allow nulls. INSERT fails.

    Server: Msg 15330, Level 11, State 1, Procedure sp_helprotect, Line 346

    There are no matching rows on which to report.

    The statement has been terminated.

     

    Now, if I grab a role name and plug it into the @username parameter, it gives me results. Has anyone run into this problem before?

     

     

  • Hi Adam,

    Check if you have owner for all you objects.It prompts this error if you have don't have owner for particualr object .

    Thanks,

    SR

    Thanks,
    SR

  • I think I have tracked it down to an internal problem. Looking at the code for sp_helprotects, I found that there are columns in sysprotects that don't have a corresponding record in sysusers for the grantor column. I'm new to this enviroment, but I'm guessing someone granted permissions to an object and then that user got dropped, so the refernce back to the grantor is gone. Hope this helps someone else in the future.

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

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