Re: Setting Up SQL Security



dsfseattle (dsfseattle@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
I have setup in sql server via Enterprise Manager a user. I pretty much
want that user to have complete access to a database. The application
is Darwin. What I would like to do is limit the companies that this
user would access. For example, company 1 would be off limits, whereas
company 2 through 5 would be available. Any direction would be
appreciated.

As suggested by Codeman and Uri you can use views to implement this.
However, you should be aware of that row-level security implemented
in this way, is not 100% foolproof. A skilled user may still be table
to dig out facts about the companies he is not permitted to see. It's
not that he can see the data directly, but he take information from
query plans, and error messages.

Depending on your situation you may be willing to take the risk that
this happens. But if it's impedient that no information whatsoever is
disclosed, you should consider using different databases instead.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: How to protect SQL Server Express database from reverse engineerin
    ... prevent anyone from reverse engineering our database. ... I say within reasonable limits, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.security)
  • Re: Problem with my SQL 2000 Maintenance plans.
    ... I wouldn't use maint plan for this. ... using the most recent update of Books Online). ... If you do have a problem in the database, you want to be alerted so you can do ... >> option will most probably be removed in next version of SQL Server. ...
    (microsoft.public.sqlserver.server)
  • Re: sp_fkeys stored procedue is very slow
    ... tables and columns that 'table1' depends on ... Are there many tables in the database? ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: how to create database
    ... ' Connection string, change server and database! ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.data.oledb)
  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)