Wednesday, March 20, 2013

Oracle: Create User

reference: http://docs.oracle.com/cd/B10500_01/server.920/a96521/privs.htm#21065

Determine Current SID in SQL PLUS

SELECT * from global_name;

Create User: 
CREATE USER james
    IDENTIFIED BY letmein
    DEFAULT TABLESPACE userspace
    TEMPORARY TABLESPACE temp;

grant CREATE VIEW, CREATE TABLE,  CREATE SYNONYM, CREATE PROCEDURE, UNLIMITED TABLESPACE, CREATE SEQUENCE to james;

SELECT GRANTEE, TABLE_NAME, COLUMN_NAME, PRIVILEGE
    FROM DBA_COL_PRIVS;

SELECT * FROM DBA_SYS_PRIVS where grantee = 'JAMES';
select * from user_sys_privs where username = 'JAMES';
select * from session_privs;


select username from dba_users where username = 'JAMES';


connection string:
jdbc:oracle:thin:@dw.my.company.com:1521:MYSID

No comments:

Post a Comment