Oracle crear rol y asignárselo a usuario


-- http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9013.htm#i2077938
$sqlplus "/as sysdba"
create role programador;
GRANT CONNECT TO programador;
GRANT create session, alter session TO programador;
GRANT create procedure to programador;
GRANT execute any procedure to programador;
GRANT create table TO programador;
GRANT create sequence TO programador;
Grant create trigger to programador;
Grant create type to programador;
grant create view to programador;
grant create any index, create indextype to programador;
grant debug connect session to programador;
grant debug any procedure to programador;


-- CREATE USER username IDENTIFIED BY apassword;
-- GRANT role_name TO user_name;

-- en 11g la tablespace users ya viene hecha, si queremos podemos crear otra tablespace con
CREATE SMALLFILE TABLESPACE USERS DATAFILE 'u01/app/oracle/oradata/ORCL/espacio.dbf' SIZE 50g;

-- el size puede ser unlimited


ALTER DATABASE DEFAULT TABLESPACE USERS;
ALTER USER user_name QUOTA UNLIMITED ON USERS;