Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL database access for specific records in a table(s)

Status
Not open for further replies.

ghnat

MIS
Apr 8, 2003
28
0
0
CA
Sorry if this seems like a basic question ... I'm a newbie at SQL admin.

Running MSSQL 2000 on a win2k server with a database consisting of various linked tables having multiple customer information.

I would like to setup a user ID to have access to this database but only so they can view specific (their own customer data) records within the database tables.

I see the user table column access option in permissions but not for specific database records/rows?

ie ... If user ID is xxx then they can only see customer xxx records in the database!

Any assistance would be greatly appreciated

Thanks

ghnat




 
One way may be to create views and/or stored procedures that you grant access to based on the user. Of course this would mean that the records would have to have some unique ID or value that you could build the SPs or views on.

Thanks

J. Kusch
 
SQL does not support vertical permissions.

You need to use views and/or procs as Jay said.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
Actually, Denny, SQL does support vertical permissions (columns). It just doesn't support horizontal (row) permissions unless you use a view or SP.

Except where Replication allows horizontal filtering.

@=)

Of course, I suspect that's what you meant in the first place but used the wrong word. @=)



Catadmin - MCDBA, MCSA
Beware the error of pre-emptive poultry inventory!
 
Your right. I used vertical instead of horizontal.

Vertical is supported, horizontal is not.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top