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 2005 Forums
 Other SQL Server Topics (2005)
 UDA Grant Permission problem

Author  Topic 

coolerbob
Aged Yak Warrior

841 Posts

Posted - 2008-04-30 : 05:09:56
When I try and grant execute permission to an assembly like this:
GRANT EXECUTE ON ASSEMBLY::[UDAs] TO [lgnMyLogin]

I get this error:
Incorrect syntax near 'EXECUTE...'.

Any ideas?

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-04-30 : 21:43:16
Is lgnMyLogin a valid user of the db?
Go to Top of Page

coolerbob
Aged Yak Warrior

841 Posts

Posted - 2008-05-01 : 04:18:52
yes
seems to have something to do with this:
http://blogs.msdn.com/sqlprogrammability/archive/2007/02/22/why-cannot-i-grant-execute-permission-on-assemblies-anymore.aspx
sounds complicated!

ANSWER:
So here's what we ended up doing after reading the second last post here:
http://blogs.msdn.com/sqlprogrammability/

We haven't got to grips with the whole "CLR Integration Security" thing yet.
And with SP2, MS took away the ability to grant execute permission on UDA's.
The loopwhole is that they didn't take grant execute permission away on the database that the UDA sits in. So by doing GRANT EXECUTE on the entire database for your login, you still can get your login to have permission to execute your UDA without trying to fathom how "CLR Integration Security" works. It's a bit drastic, but it works!
Go to Top of Page
   

- Advertisement -