Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

MS SQL7 - problem

  • 25-10-2000 9:25am
    #1
    Closed Accounts Posts: 9


    Lets look in this simply SP:


    CREATE procedure test
    as
    Declare @cmd nvarchar(1000)

    SET @cmd=N'Select * from Users'

    exec sp_executesql @cmd


    User has rights only for executing SP in my DB. So my question is: why he can not execute this SP??? (error with permision on Users table). It is strange and now I have to add SELECT permision on USERS table for this user. This SP is running without problems:


    CREATE procedure test1
    as
    Select * from Users


    So why 'test' isn't running ???
    Users' table owner is dbo.


Comments

  • Closed Accounts Posts: 218 ✭✭Void


    From the SQL Server 7.0 help files on sp_executesql:

    Permissions
    Execute permissions default to the public role.

    Dunno if this is any help, but I think sp_executesql is a bit wierd. I reckon they did this deliberately because sp_executesql let's you run dynamically built sql statements, and is therefore a security risk.


Advertisement