CREATE OR REPLACE PROCEDURE create_user (
p_user_name VARCHAR2,
p_passward VARCHAR2
) IS
BEGIN
EXECUTE IMMEDIATE ' CREATE USER '
|| p_user_name
|| ' IDENTIFIED BY '
|| p_passward;
EXECUTE IMMEDIATE ' CREATE ROLE MAN3 ';
EXECUTE IMMEDIATE 'GRANT CREATE SESSION,CREATE TABLE,CREATE PROCEDURE TO MAN3';
EXECUTE IMMEDIATE ' GRANT MAN3 TO ' || p_user_name;
END;
SQL> /
Procedure created.
SQL> EXEC CREATE_USER('BASE4', 'BASE4');
PL/SQL procedure successfully completed.
Windows Recall : How to disable spy mode
4 days ago
No comments:
Post a Comment