Originally posted by liorjsb
I have the permissions to do it outside the stored procedure.

For inside a stored procedure, make sure that you have the
permission directly granted to you, not just based on role.