2

I have a database called sa-db, in this database I have a user called sa-clientap and I need to grant him permissions to execute the sp_configure, but when I try to do this, I get an error:

Permissions on server scoped catalog views or stored procedures or extended stored procedures can be granted only when the current database is master

This is what I tried:

GRANT EXEC [sys].[sp_configure] TO [sa-clientapp]

I already tried by code and by UID but the same error pops up.

How can I make this work?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Jp191290
  • 51
  • 8
  • 1
    You want that user to be able to alter settings that affect the entire server? Just grant them `ALTER SETTINGS` permission on the server and be done with it. If you don't want them to have that power, then letting them run `sp_configure` is the wrong thing. – Damien_The_Unbeliever Jun 19 '15 at 06:14
  • Yeah thought so too, so i ask around, the thing is the aplication just runs some update scripts, but yeah letting the aplication execute that type actions is kinda bad, thanks for the help – Jp191290 Jun 19 '15 at 16:23

1 Answers1

3

How about this....

use master
go
GRANT EXEC [sys].[sp_configure] TO [sa-clientapp];
go
TheMadDBA
  • 436
  • 3
  • 4
  • I don't see how... did you run that as a script? – TheMadDBA Jun 19 '15 at 16:22
  • Yeah, the same error that i wrote on the description pops up – Jp191290 Jun 19 '15 at 16:25
  • What about setting your current database to master in whatever tool you are using? If you have a permissions/typo you should be getting a different error than that. – TheMadDBA Jun 19 '15 at 16:27
  • Yeah, i was thinking that, but the user is just an aplication that execute some update scritps, i thoght that it could be done by just adding that permission to the user, but it seems that i need to grant him way to many permits for that, so ill just modify the instances manually, thanks for help anyway, cant upvote your aswer though new user on stack overflow – Jp191290 Jun 19 '15 at 16:40
  • 1
    Doh... I didn't even notice which procedure you were trying to grant execute on (tunnel vision). Damien is right... don't go down this road :-) – TheMadDBA Jun 19 '15 at 16:51