Re: Help with user accounts

From: Dejan Sarka (dejan_please_reply_to_newsgroups.sarka_at_avtenta.si)
Date: 11/04/04


Date: Thu, 4 Nov 2004 08:23:26 +0100

Check
http://vyaskn.tripod.com/row_level_security_in_sql_server_databases.htm.

-- 
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com
"John Harbison" <JohnH@desertmicro.net> wrote in message
news:%231TwA$cwEHA.2908@tk2msftngp13.phx.gbl...
> To add more clarification:
>
> Lets assume I have the following tables:
>
> CUSTOMER:
>
> ID             CUSTOMER_NAME       COMPANY
> =====================================================================
> 1               Customer 1                       1
> 2               Customer 2                       1
> 3               Customer 3                       1
> 4               Customer 4                       2
> 5               Customer 5                       2
> 6               Customer 6                       2
> 7               Customer 7                       1
> 8               Customer 8                       2
> 9               Customer 9                       2
> 10             Customer 10                     2
>
>
> USERS:
>
> ID             USER_NAME
> =======================================
> 1               User 1
> 2               User 2
> 3               User 3
> 4               User 4
>
>
> COMPANY:
>
> ID               COMPANY_NAME
> ==========================================
> 1                   Company 1
> 2                   Company 2
>
>
> SECURITY:
>
> USERID       COMPANY_ID
> ========================================
> 1                       1
> 1                       2
> 2                       1
> 3                       2
> 4                       1
> 4                       2
>
>
> Ok the application would know that if User 4 is pulling a list from the
> CUSTOMER table to show the customers for both companies.  Likewise if User
2
> preformed the same action they should only see customers from Company 1.
>
> My question is how to I get this same functionality from say Query
Analyzer?
>
>
> "John Harbison" <JohnH@desertmicro.net> wrote in message
> news:eZH9VUcwEHA.3528@tk2msftngp13.phx.gbl...
> > Is there a way to filter at the server level what data is returned to
> > clients by user?  I know that I can create a user account and assign
what
> > columns/tables the user account has access to, but what if I want them
to
> > have full access to a table, but only certain records in that table.
Any
> > ideas?
> >
> >
>
>


Relevant Pages

  • Re: indexing
    ... I would pick up a book that explain what indexes are, how they are used and how you use profiler to ... >>Tibor Karaszi, SQL Server MVP ... >>> I have two tables called customer and invoice. ... >>> based on the customer numbers that match in the invoices ...
    (microsoft.public.sqlserver.server)
  • Re: Select query results into local varchar variable
    ... > SQL Server MVP ... The results variable would be used for an email message. ... enter a customer name.. ... Basically a shortened version without the PTY LTD ...
    (microsoft.public.sqlserver.programming)
  • Re: Snapshot Relational Data into New Tables
    ... > Now consider a simplified version of what a naive schema for a Customer ... > but that isn't telling you any extra information about Mr John Doe. ... > The only situation I can think of is stuff like server and application logs. ... > SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: Searching a table for whats NOT there ?
    ... SQL Server MVP ... "Mike Walker" wrote in message ... > I know how to get any accounts that do not have a Customer Number, ... > How can I create a SQL statement that will check to see if the customer> number in the AccountTable ...
    (microsoft.public.sqlserver.programming)
  • Re: Selcting the alpabetical next row
    ... SQL Server MVP ... "Olav" wrote in message ... > I have a customer database where i display 1 customer at a time with all ... I have a next button so that the user can display the ...
    (microsoft.public.sqlserver.programming)