|
CREATE OR replace PROCEDURE Create_new_user(p_username VARCHAR2)
IS BEGIN EXECUTE IMMEDIATE 'CREATE USER '|| p_username|| ' identified BY atos DEFAULT tablespace USERS temporary tablespace TEMP profile DEFAULT' ; -- EXECUTE IMMEDIATE 'grant/Revoke role privileges EXECUTE IMMEDIATE 'grant CONNECT TO '|| p_username|| ''; EXECUTE IMMEDIATE 'grant RESOURCE TO '|| p_username|| ''; -- EXECUTE IMMEDIATE 'grant/Revoke system privileges EXECUTE IMMEDIATE 'grant CREATE PROCEDURE TO '|| p_username|| ''; EXECUTE IMMEDIATE 'grant CREATE sequence TO '|| p_username|| ''; EXECUTE IMMEDIATE 'grant CREATE synonym TO '|| p_username|| ''; EXECUTE IMMEDIATE 'grant CREATE TABLE TO '|| p_username|| ''; EXECUTE IMMEDIATE 'grant CREATE TRIGGER TO '|| p_username|| ''; EXECUTE IMMEDIATE 'grant CREATE view TO '|| p_username|| ''; EXECUTE IMMEDIATE 'grant unlimited tablespace TO '|| p_username|| ''; END create_new_user; |
quinta-feira, 28 de fevereiro de 2013
Procedure CREATE_NEW_USER
Procedure para criar usuário
Assinar:
Postar comentários
(
Atom
)
Nenhum comentário :
Postar um comentário