42000 An owner referenced by user does not have EXECUTE PROCEDURE access to XXXXXX

Problem:

-- As User test1

replace procedure ITDLMDMerchandisingT.SP_test(out t integer)

begin

call ITDLMDMerchandisingT.droptable_ifexists('ITDLMDMerchandisingT.test');

set t=4;

end;

call ITDLMDMerchandisingT.SP_test(t);

Executed as Single statement. Failed [3523 : 42000] SP_TEST:An owner referenced by user does not have EXECUTE PROCEDURE access to ITDLMDMerchandisingT.droptable_ifexists.

Cause:

In Teradata the owner of the object even need to have execute grant to its own object. Here User test1 have the privilege to execute procedure on database ITDLMDMerchandisingT but the database ITDLMDMerchandisingT does not have grant on execute procedure on its own object.

Solution:

Provide the grant:

GRANT EXECUTE PROCEDURE ON ITDLMDMerchandisingT To ITDLMDMerchandisingT;