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 |
|
DavidChel
Constraint Violating Yak Guru
474 Posts |
Posted - 2008-08-29 : 10:55:53
|
| So, I created a user defined function to use in my queries. Everything runs fine as the admin. However, when I try to use the UDF as a read only user which I use for reporting (only has db_datareader) permissions) it can't run. I've looked in the user properties under database access and nothing is jumping out at me as well as googling for the answer. How can I limit the reporting login's abilities while granting it the right to use the UDF I created? |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-08-29 : 11:16:15
|
| GRANT EXECUTE ON OBJECT::yourUDFname TO yourUser;_______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
 |
|
|
DavidChel
Constraint Violating Yak Guru
474 Posts |
Posted - 2008-08-29 : 11:17:39
|
| I think I may have found it. I opened the properties of the UDF and it had separate permissions. I added permissions to that object for the reports login and it worked. Is there any way to include those rights in the create script? |
 |
|
|
DavidChel
Constraint Violating Yak Guru
474 Posts |
Posted - 2008-08-29 : 11:22:46
|
So, this works. GRANT EXECUTE ON GETSHIPPEDNOTINVOICEDQTYTO reports Thanks spirit. |
 |
|
|
|
|
|