Re: Limiting views on data in a table

From: Mike Lerch (mlerchNOSPAMTHANKS_at_nycap.rr.com)
Date: 06/13/03


Date: Fri, 13 Jun 2003 13:40:56 -0400


On Fri, 13 Jun 2003 10:27:47 +0200, "Dejan Sarka"
<dejan_please_reply_to_newsgroups.sarka@avtenta.si> wrote:

>Mike,
>
>Maybe you could help yourself with the SUSER_SNAME() system function - it
>returns the Windows login the user uses to connect to SQL Server. You could
>use it in the WHERE clause of your single stored procedure for everybody to
>compare the current user t the user4 stored in the access table. This way
>even if the user comes to the SP directly (s)he won't be able to see
>anything but own rows.

I just thought of a catch: the reports will come from an intranet
app...the SQL Server is going to be accessed through an ASP.NET
process account, not the user's original login (though I was going to
pass the login name as a parameter in the stored procedure). Couldn't
they still access it directly and, when the procedure prompted them to
enter the criteria, just enter someone else's username?

This stuff gets so complex so fast!

Lerch



Relevant Pages

  • Re: How to get list of EventClasses in MSSQLServer2000
    ... statement inside a stored procedure has completed.') ... SQL Server statement or stored procedure.') ... Plan','Displays the plan tree of the Transact-SQL statement executed.') ... Login','Occurs when a SQL Server login is added or removed; ...
    (microsoft.public.sqlserver.security)
  • Re: SQL Server 2005: Checking if Login is connected to any databas
    ... there is no such stored procedure. ... SQL Server 2005 allows dropping login that has mapped users in database. ...
    (microsoft.public.sqlserver.security)
  • Re: How do I incorporate a stored procedure into a select statement [v2]?
    ... An alternative on SQL Server 2008 is to change the login id parameter of the stored procedure to table-valued parameter and handle multiple login deletes in the stored procedure. ...
    (microsoft.public.sqlserver.programming)
  • RE: Domain name change for user group security
    ... After you move a database from one server that is running SQL ... Make sure that there is a login in the sysxlogins table in the ... To add an integrated SQL Server login, ... but I'm not sure if there is a stored procedure ...
    (microsoft.public.sqlserver.security)
  • Re: Accessing FoxPro Free Table
    ... which the SQL Server service is running. ... account, ... > If you are creating a stored procedure and you want> to make sure that the procedure definition cannot be> viewed by other users, you can use the WITH ENCRYPTION> clause. ... The procedure definition is then stored in an> unreadable form. ...
    (microsoft.public.data.odbc)