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.
Halim, a Georgia Tech graduate Senior Database Engineer/Data Architect based in Atlanta, USA, is an Oracle OCP DBA and Developer, Certified Cloud Architect Professional, and OCI Autonomous Database Specialist. With extensive expertise in database design, configuration, tuning, capacity planning, RAC, DG, scripting, Python, APEX, and PL/SQL, he combines technical mastery with a passion for innovation. Notably, Halim secured 16th place worldwide in PL/SQL Challenge Cup Playoff on the year 2010.
Friday, September 11, 2009
Subscribe to:
Post Comments (Atom)
My Blog List
-
-
-
ASSM states3 weeks ago
-
UKOUG Discover 20241 month ago
-
-
-
-
-
-
-
-
Moving Sideways8 years ago
-
-
Upcoming Events...11 years ago
-
No comments:
Post a Comment