How to retreive Sql Rights from a tabel

  • Thread starter Thread starter Thierry
  • Start date Start date
T

Thierry

hi

has anyone know how i can retreive the sql right for an user for a Sql table
per column of this table

Thanks
thierry
 
Thierry, using Sql-DMO you can retrieve quite a bit of information on
permissions but AFAIK the most granular they come is on the table- I don't
believe you can grab them at the column level. You may be able to use
sp_helprotect 'objectname' to get what you need and it does have some column
information although it's not typically what you'd expect. The information
though has got to be in the system catalog so if no one here can answer for
sure, some of the sql server guys might know this - it's worth a try.
 
thaks for your reply.

have you a sample of code please ?

in fact i want to put an extended properties of each datacolumn of my
datatable (a flag same as readonly property) So in first time if i can't
know if the logged user can insert, update or delete for a specific table
it's good for me.

ps. the final user haven't admin rights on the database so could i use
sqldmo to extract information without admin rights ?

Thierry
 
Thierry - check out the class that I posted in the thread below "Getting
results set from sp_helpuser". The class in there can be used with the
sp_helpprotect, you just need to supstitute the name for sp_helptext. The
param names need to match as well but I believe they do. The rest of the
code should work identically.

As far as the permissions, I don't remember which are needed but I think
you're right about SqlDmo ones. Let me look, i'll have to get back to you
on it.
 
thanks i 'll looking that
W.G. Ryan - MVP said:
Thierry - check out the class that I posted in the thread below "Getting
results set from sp_helpuser". The class in there can be used with the
sp_helpprotect, you just need to supstitute the name for sp_helptext. The
param names need to match as well but I believe they do. The rest of the
code should work identically.

As far as the permissions, I don't remember which are needed but I think
you're right about SqlDmo ones. Let me look, i'll have to get back to you
on it.
 
Thierry:

I recieved an email from you last night but it only contained the text of
this thread. I wasn't sure if it was a mistake or not - I sent you back an
email though. If it was a mistake, no problem. If you meant to send me
something though, please resend it.

Thanks,

Bill
 
sorry it was a mistake
W.G. Ryan - MVP said:
Thierry:

I recieved an email from you last night but it only contained the text of
this thread. I wasn't sure if it was a mistake or not - I sent you back
an email though. If it was a mistake, no problem. If you meant to send
me something though, please resend it.

Thanks,

Bill
 
Back
Top