Excel/SQL Server - Limit Access To Authorised Data?

  • Hi

    Is there any way to impose data-level security if I open a Query database to Excel (Query) users?  The Query db holds client-related data & I would like to be able to restrict user access to their client data only.

    Thanks.

  • If you can build the query/procedure which contains the mechanism to determine "their clients" only, you can implement that.

     

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Yes, that is one of the ideas that I'm considering.  I've got the "idea" part ok - it's the next bit the "how" that's eluding me(!)  If I go down the Excel to Query db route I guess I need to control what's going on at the Excel level but I don't want to mess with the standard MS Query capability (I don't even know if it's possible to intercept the MS Query generated SQL in order to add licencing restrictions?) - or am I on the wrong track? 

    Any pointers on the "how" bit?

    Thanks.

  • You could start with a simple view test.

    Start sql Query analyser and build a query the has all the security-features in it wich you desire.

    E.g.

    Create Myview

    as

    Select mycol1 from sales S

    inner join SalesPeoples Sp

    on S.SP_Id = Sp.SP_Id

    inner join departments D

    on D.Dep_Id = Sp.Dep_Id

    Inner Join Employees E

    On E.Dep_Id = D.Dep_Id

    and E.UserId = Suser_Sname() -- windows id

    go

    Now take Excel and build a windows-authenticated connection and a query wich uses this view.

    Maybe this can be the start.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Yes - I see where you're going.

    Thanks for your help.

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

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