From: Nigel A on
I need to allow some users to run a script once a month that involves
calling 'sp_send_dbmail' to communicate progress. What is the best practice
method for giving users access to a system SP like this? I guess I can
probably go into each ones server account and do it there?

TIA
Nigel Ainscoe

From: ML on
Put the users in the same database role with the execute permission for that
procedure. You could also create a special procedure as a wrapper around the
sp_send_dbmail so that you can also restrict what the users can do with
sp_send_dbmail.

In other words: it depends on what you actually need. If the above
suggestions don't solve your problem then, please, provide more information
regarding your business requirements.


ML

---
Matija Lah, SQL Server MVP
http://milambda.blogspot.com/
From: Nigel A on
Thank you, for that.

The users were running a script I had written that relies on them to change
a parameter. I have decided that the better solution is to create this as a
stored procedure and and grant them execute rights on the stored procedure.
Thay can then call the sp with the appropriate parameter.

The more I thought about the question I had asked, the more I realised that
I was trying to solve the wrong problem.

Regards,
Nigel Ainscoe


"ML" <ML(a)discussions.microsoft.com> wrote in message
news:80ADEED7-B006-433A-BB2B-60119601608C(a)microsoft.com...
> Put the users in the same database role with the execute permission for
> that
> procedure. You could also create a special procedure as a wrapper around
> the
> sp_send_dbmail so that you can also restrict what the users can do with
> sp_send_dbmail.
>
> In other words: it depends on what you actually need. If the above
> suggestions don't solve your problem then, please, provide more
> information
> regarding your business requirements.
>
>
> ML
>
> ---
> Matija Lah, SQL Server MVP
> http://milambda.blogspot.com/
>

From: ML on
I think you've made the best decision.


> The more I thought about the question I had asked, the more I realised that
> I was trying to solve the wrong problem.

Sometimes reading back your own question produces the answer.
I should know, I practice this every day. :)


ML

---
Matija Lah, SQL Server MVP
http://milambda.blogspot.com/
 | 
Pages: 1
Prev: Row To Column
Next: Copy Data (attempt 2)