1. Create a temporary table space
CREATE Temporary tablespace test_temp
Tempfile ' C:\oracle\product\10.1.0\oradata\orcl\test_temp01.dbf '
SIZE 32M
Autoextend on
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL
2. Create a user table space
CREATE tablespace Test_data
LOGGING
DataFile ' C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\TEST_DATA01. DBF '
SIZE 32M
Autoextend on
NEXT 32M MAXSIZE 2048M
EXTENT MANAGEMENT LOCAL;
3. Create a user and specify a tablespace
CREATE USER username identified by password
DEFAULT tablespace Test_data
Temporary tablespace test_temp;
4. Authorization to the user
GRANT
Create SESSION, create any TABLE, create any VIEW, create any INDEX, create any PROCEDURE,
Alter any TABLE, alter any PROCEDURE,
Drop any TABLE, drop no VIEW, drop any INDEX, drop any PROCEDURE,
SELECT any table, INSERT any table, UPDATE all table, DELETE any table
to username;
5. delegating role to username, that is , enabling username This user to manage and use role the resources that are owned
GRANT role to username;
6. View all users and other commands
View All Users
SELECT * from Dba_users;
SELECT * from All_users;
SELECT * from User_users;
View User system permissions
View User system permissions
SELECT * from Dba_sys_privs;
SELECT * from User_sys_privs;
View user object or role permissions
View User Object permissions
SELECT * from Dba_tab_privs;
SELECT * from All_tab_privs;
SELECT * from User_tab_privs;
View all roles
View All Users
SELECT * from Dba_roles;
To view the roles owned by a user or role
To view the roles owned by a user or role
SELECT * from Dba_role_privs;
SELECT * from User_role_privs;
Oracle Create tablespace, create user and so on