Haz uso de la clausula execute immediate.
Código SQL:
Ver originalCREATE OR REPLACE PROCEDURE P_CREAR_USER
(
p_usuario IN VARCHAR2,
p_contrasena IN varchar2
) AS
v_id_v VARCHAR2(10);
BEGIN
EXECUTE IMMEDIATE 'CREATE USER ' ||p_usuario|| ' IDENTIFIED BY ' ||p_contrasena||
' DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON USERS';
EXECUTE IMMEDIATE 'CREATE ROLE usuario';
EXECUTE IMMEDIATE 'GRANT CREATE session, CREATE VIEW,
ALTER TABLE, ALTER VIEW,
TO usuario';
EXECUTE IMMEDIATE 'GRANT usuario TO '||p_usuario;
END P_CREAR_USER;
/