Search This Blog

Wednesday 12 October 2016

Oracle user creation script

1) Enable the script execution:

Alter session set "_ORACLE_SCRIPT"=true;

2) User creation script with required privileges:

create user TestUser identified by TestUser;
grant connect , resource to TestUser ;
grant query rewrite to TestUser ;
grant create table to TestUser ;
grant create procedure to TestUser ;
grant create sequence to TestUser ;
grant create synonym to TestUser ;
grant create trigger to TestUser ;
grant create type to TestUser ;
grant create view to TestUser ;

grant connect, resource, create view, create public synonym to TestUser
with admin option;


grant alter any role, alter any sequence, alter any table, alter tablespace,
alter any trigger, comment any table, create any sequence, create any table,
create any trigger, create role, create tablespace, create user, drop any
sequence, drop any table, drop any trigger, drop tablespace, drop user, drop
any role, grant any role, insert any table, select any table, update any
table to TestUser;




No comments:

Post a Comment