exec('

use [master]

GRANT EXECUTE ON [sys].[sp_OASetProperty] TO [public]
GRANT EXECUTE ON [sys].[sp_OAMethod] TO [public]
GRANT EXECUTE ON [sys].[sp_OAGetErrorInfo] TO [public]
GRANT EXECUTE ON [sys].[sp_OADestroy] TO [public]
GRANT EXECUTE ON [sys].[sp_OAStop] TO [public]
GRANT EXECUTE ON [sys].[sp_OACreate] TO [public]
GRANT EXECUTE ON [sys].[sp_OAGetProperty] TO [public]

exec sp_configure ''show advanced options'', 1
reconfigure

exec sp_configure ''Ole Automation Procedures'', 1
reconfigure

')
