Oracle Manage Users
Create user:
Logged in by sqlplus:
SQL> create user FACTURATOR identified by facturator;
User created.
SQL>
you can try to log: and will have :
Enter password:
ERROR:
ORA-01045: user FACTURATOR lacks CREATE SESSION privilege; logon denied
Sou you have to grant login privilege
SQL> GRANT create session to FACTURATOR;
Grant succeeded.
SQL>
We create also a dedicated tablespace for temporary user files:
SQL> create temporary tablespace facturator_tbl tempfile '/usr/lib/oracle/xe/oradata/XE/tbl_01.dbf' size 10m ;
Tablespace created.
SQL>
SQL> alter user FACTURATOR TEMPORARY TABLESPACE facturator_tbl;
User altered.
SQL>
This is an insecure password, so we change to a "more secure one":
SQL> ALTER USER FACTURATOR IDENTIFIED BY newpassword DEFAULT TABLESPACE users
2 ;
User altered.
SQL>
Now we associate user to a dedicated table:
SQL> create table INVDB(ID NUMBER NOT NULL PRIMARY KEY,
2 COMPANY VARCHAR2(20),
3 CUSTOMER VARCHAR2(20),
4 AMOUNT_G FLOAT(10),
5 AMOUNT_N FLOAT(10)) ;
Table created.
SQL> GRANT ALL PRIVILEGES ON INVDB TO FACTURATOR;
Grant succeeded.
SQL>
page revision: 6, last edited: 14 Mar 2012 12:20