SELECT permission was denied on View

  • Hi DBA,

    I created a view 'vw_AnnualSales_2016' on DB A, and this view is querying data from multiple tables which stored in DB B. I've granted user to has read access to 'vw_AnnualSales_2016' view. And user received below message from SQL SERVER

    The SELECT permission was denied on the object XXXXX

    This is due to user does not has read access to the tables on DB B. If I grant user to has read access to these tables, it will resolved the issue. However I don't want user can direct access to these tables, is there any workaround can be done ?

  • sqlbaby2 (1/10/2017)


    Hi DBA,

    I created a view 'vw_AnnualSales_2016' on DB A, and this view is querying data from multiple tables which stored in DB B. I've granted user to has read access to 'vw_AnnualSales_2016' view. And user received below message from SQL SERVER

    The SELECT permission was denied on the object XXXXX

    This is due to user does not has read access to the tables on DB B. If I grant user to has read access to these tables, it will resolved the issue. However I don't want user can direct access to these tables, is there any workaround can be done ?

    I'm not sure how you have things set up, but it might be a good idea to look up the following topic: Database Permission Chaining

    As I understand it, when such chaining is allowed, this kind of problem may resolve itself, but as I don't have the time to research it at the moment, I'll have to leave that to those more skilled than I am. I just have this gut feel on it, and figured I'd at least mention the topic. Someone on this forum is quite likely to understand it and be able to provide a better answer.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

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

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