Power User Access to Certain Views Only (sql14)

IC IC 236 Reputation points
2020-12-21T12:53:13.897+00:00

Good day,

I was told to give a specific business user access to DW Tables (sql14), i would like to give read access to specefic views only. (Not Tables)
Please Assist on how to go about it

Regards

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,961 questions
0 comments No comments
{count} votes

Accepted answer
  1. IC IC 236 Reputation points
    2020-12-22T07:16:48.897+00:00

    Thank You, the user is using qlikview to connect
    i dont have knowledge regarding qlikview but i want to limit as mush as possible.
    I will select the deny option and see if user complains?

    If using qlikview would i need to deny for linked server, is it only in ssms that user can view linked server.

    thoughts please ?


4 additional answers

Sort by: Most helpful
  1. Guoxiong 8,206 Reputation points
    2020-12-21T14:43:32.723+00:00
    -- Create a login
    USE master;
    GO
    CREATE LOGIN [ReadOnlyUser] WITH PASSWORD = 'Strong_Password';
    GO
    -- Create a user for that login
    USE [AdventureWorks2017];
    GO
    CREATE USER [ReadOnlyUser] FOR LOGIN [ReadOnlyUser];
    GO
    -- Grant a read-only permission on a specific view to the user
    GRANT SELECT ON [HumanResources].[vEmployee] TO [ReadOnlyUser]
    GO
    
    0 comments No comments

  2. IC IC 236 Reputation points
    2020-12-21T14:57:14.233+00:00

    Thank You,

    I have a simlar script going, howver the user can see the linked servers & other databases even though theres no tabls to select
    is there a way, the user logs in and only see the Views Folder?

    Regards
    strong text

    0 comments No comments

  3. Erland Sommarskog 112.7K Reputation points MVP
    2020-12-21T22:28:21.03+00:00

    You can say

    DENY VIEW ANY DATABASE TO ThisUser

    But in this case, the user will not find the database in Object Explorer directly, but first have to open a query window and move to the database.

    Linked servers are not securables, so there is no way to hide them. But unless you have set up a proxy account that is common for all user, this user cannot make any use of the linked server.

    0 comments No comments

  4. IC IC 236 Reputation points
    2020-12-23T08:11:55.41+00:00

    Thank You very much All

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.