Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 user logins

Author  Topic 

amcdba
Starting Member

1 Post

Posted - 2003-08-21 : 04:15:37
My problem is how do I create a procedure which updates a users password on a table and at database level?

scenario i have:

a table called system_users which contains a userid and password for valid users to my system.

i'm implementing row level security, so I have also setup each of these users as database users.

e.g. system_users table contains: userid - FRED, password A. I have setup a user FRED, password A with public access to the my database.

This works without problems, so users who login only see the data they should.



Frank Kalis
Constraint Violating Yak Guru

413 Posts

Posted - 2003-08-21 : 04:47:09
are you talking of sp_password or sp_adduser ?

Cheers,
Frank
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-08-21 : 07:49:21
quote:
Originally posted by amcdba
i'm implementing row level security, so I have also setup each of these users as database users.


I'm not sure what this means, but it sounds suspect to me. Don't try and reinvent the wheel, use the tools that are already part of the ANSI-SQL standard.

For example, if you have a table, that was created by dbo, called dbo.amcdba and you have a user, "Fred", who should only see the certain rows of that table, then create a view for Fred.

create view dbo.Fred_amcdba as select <col_list> form dbo.amcba where <predicate>

Then, grant fred Select on dbo.fred_amcdba ... Read up on ownership chains.

Jay White
{0}
Go to Top of Page
   

- Advertisement -