SQL Server permissions per column invisible to users -


can set permission on columns in db , grant in way that's transparent users, let have following grant:

grant select on [dbo].[dim_table1](field1 , field2 , field4 ) [ndmrole] ;  -- column field3 missing, it's prohibited select user. 

if user tries do:

select * dim_table1  

she error saying field3 not allowed selected. there way make field invisible user or somehow make user doesn't error.

i don't want create additional views this. reason don't want create views there lot of users of systems different permissions , effort maintain complex mechanism, solution permissions easier.

yes can this. check out sp_column_privileges , column permission

 sp_column_privileges [ @table_name = ] 'table_name'   [ , [ @table_owner = ] 'table_owner' ]   [ , [ @table_qualifier = ] 'table_qualifier' ]   [ , [ @column_name = ] 'column' ] 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -