Compilation error while creating a stored procedure

Database
Enthusiast

Compilation error while creating a stored procedure

I have written the following procedure but experiencing the permission issue. Can someone help me what permissions I need to compile the folloiwng procedure?
Error: SPL1078 - user is not authorized to use the DDL/DCL/Dynamic SQL statement
replace procedure test.sp_table_check (databasename varchar(50), tablename varchar(50), tabledef varchar(500) )
begin
declare texist integer;

set texist = 0;

select count(*) into :texist from dbc.tables where tablename=:tablename;

if texist = 0 then
call dbc.sysexecSQL(:tabledef);
end if;

end;

Error: SPL1078 - user is not authorized to use the DDL/DCL/Dynamic SQL statement