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.
| Author |
Topic |
|
weitzhandler
Yak Posting Veteran
64 Posts |
Posted - 2009-03-09 : 21:41:01
|
I have username & pwd colsI want that the user should never be able to access the pwd colI will only create a sproc 'spValidateUser' that will return all the cols from User and it will return N'<secret>' AS Password , if un and pwd params much.Is there a way?Shimmy |
|
|
guptam
Posting Yak Master
161 Posts |
Posted - 2009-03-09 : 23:11:09
|
| You can encrypt the password; is this SQL 2000 or 2005?-- Mohit K. GuptaB.Sc. CS, Minor JapaneseMCITP: Database AdministratorMCTS: SQL Server 2005http://sqllearnings.blogspot.com/ |
 |
|
|
weitzhandler
Yak Posting Veteran
64 Posts |
Posted - 2009-03-09 : 23:54:14
|
| I do encrypt, I thought there is a way to avoid the user from watching the encrypted passwords.forget it, not importantShimmy |
 |
|
|
guptam
Posting Yak Master
161 Posts |
Posted - 2009-03-10 : 01:11:58
|
| Heh ;-). Only thing I think is deny select on the column but I never done it. So don't know if it is a possibility...-- Mohit K. GuptaB.Sc. CS, Minor JapaneseMCITP: Database AdministratorMCTS: SQL Server 2005http://sqllearnings.blogspot.com/ |
 |
|
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2009-03-10 : 01:15:38
|
| mr.guptam how can we deny column for a table |
 |
|
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2009-03-10 : 01:17:32
|
| create a view and restrict the user to access only the view ,not table |
 |
|
|
guptam
Posting Yak Master
161 Posts |
Posted - 2009-03-10 : 01:19:37
|
| DENY SELECT ON OBJECT::dbo.TableName(ColumnName) TO DBUserNameGOThanks.-- Mohit K. GuptaB.Sc. CS, Minor JapaneseMCITP: Database AdministratorMCTS: SQL Server 2005http://sqllearnings.blogspot.com/ |
 |
|
|
guptam
Posting Yak Master
161 Posts |
Posted - 2009-03-10 : 01:20:38
|
| With view the user still has to have access to the underlying object; if they do not the view will fail. Thanks.-- Mohit K. GuptaB.Sc. CS, Minor JapaneseMCITP: Database AdministratorMCTS: SQL Server 2005http://sqllearnings.blogspot.com/ |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-10 : 02:53:41
|
| but you can exclude the column form view definition altogether |
 |
|
|
|
|
|