Oracle创建目录、表空间、用户
目录
1、Create directory
create or replace directory dataDir
as 'd:\OracleDir';
2、create tablespace
create tablespace TBSTEST
datafile 'D:\TBS\TBSTEST.dbf' size 1024M autoextend on;
--drop tablespace TEST
3、create user
--drop user TEST cascade
create user TEST
default tablespace TBSTEST
--temporary tablespace TEMP
profile DEFAULT
identified by TEST;
grant create session to TEST;
grant unlimited tablespace to TEST;
grant debug connect session to TEST;
grant create table to TEST;
grant drop any table to TEST;
grant insert any table to TEST;
grant select any table to TEST;
grant update any table to TEST;
-- Grant/Revoke role privileges
grant connect to TEST;
grant dba to TEST;
grant resource to TEST;
grant create dimension to TEST;
grant create external job to TEST;
grant create indextype to TEST;
grant create job to TEST;
grant create library to TEST;
grant create materialized view to TEST;
grant create procedure to TEST;
grant create profile to TEST;
grant create public database link to TEST;
grant create public synonym to TEST;
grant create role to TEST;
grant create rollback segment to TEST;
grant create sequence to TEST;
grant create session to TEST;
grant create synonym to TEST;
grant create table to TEST;
grant create tablespace to TEST;
grant create trigger to TEST;
grant create type to TEST;
grant create view to TEST;
grant create any index to TEST;
grant create any materialized view to TEST with admin option;
grant create any table to TEST;
grant create dimension to TEST;
grant create external job to TEST;
grant create indextype to TEST;
grant create job to TEST;
grant create library to TEST;
grant create materialized view to TEST with admin option;
grant create procedure to TEST;
grant create profile to TEST;
grant create public database link to TEST;
grant create public synonym to TEST;
grant create role to TEST;
grant create rollback segment to TEST;
grant create sequence to TEST;
grant create session to TEST;
grant create synonym to TEST;
grant create table to TEST;
grant create tablespace to TEST;
grant create trigger to TEST;
grant create type to TEST;
grant create view to TEST;
grant debug connect session to TEST;
grant drop any materialized view to TEST;
grant insert any table to TEST;
grant select any table to TEST;
grant unlimited tablespace to TEST;
grant update any table to TEST;