Home All Groups Group Topic Archive Search About

Check permission to run a statement

Author
3 Aug 2006 9:52 AM
cold80
Do you think there's a way in SQL Server 2000/2005 to check if you have
the permissions to run a specific SQL statement without running it? I'm
trying to write a small application that executes SQL scripts, but I
would like to check if the user has the rights to do all the operations
of the script before launching it. I could use a transaction, but the
commands could change the database structure, so the rollback of the
transaction can't be a real solution...

Thanks

Cold

Author
3 Aug 2006 10:31 AM
Uri Dimant
Hi
Take a look at PERMISSIONS function in the BOL


Show quote
"cold80" <sebastiano.gazz***@gmail.com> wrote in message
news:1154598749.162824.85960@m79g2000cwm.googlegroups.com...
> Do you think there's a way in SQL Server 2000/2005 to check if you have
> the permissions to run a specific SQL statement without running it? I'm
> trying to write a small application that executes SQL scripts, but I
> would like to check if the user has the rights to do all the operations
> of the script before launching it. I could use a transaction, but the
> commands could change the database structure, so the rollback of the
> transaction can't be a real solution...
>
> Thanks
>
> Cold
>

AddThis Social Bookmark Button