标签:
1、创建普通表空间和用户
//创建临时表空间
create temporary tablespace oa_temp
tempfile ‘D:\app\Administrator\oradata\orcldjoa_temp.dbf‘
size 32m
autoextend on
next 32m maxsize 20480m
extent management local;
//创建数据表空间
create tablespace oa
logging
datafile ‘D:\app\Administrator\oradata\orcldjoa.dbf‘
size 32m
autoextend on
next 32m maxsize 20480m
extent management local;
//创建用户
create user oa identified by oa
default tablespace oa
temporary tablespace oa_temp;
//给用户添加权限
GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
DBA,CONNECT,RESOURCE,CREATE SESSION TO oa
drop user oa cascade;
drop tablespace oa including contents and datafiles;
drop tablespace oa_temp including contents and datafiles;
2、创建大表空间和用户
//创建临时表空间
create bigfile temporary tablespace sxybyj_temp
tempfile ‘E:\app\Administrator\oradata\orcl\sxybyj_temp.dbf‘
size 128m
autoextend on
extent management local
uniform size 128k
//创建数据表空间
create bigfile tablespace sxybyj
datafile ‘E:\app\Administrator\oradata\orcl\sxybyj.dbf‘
size 128m
autoextend on
extent management local
uniform size 128k
//创建用户
create user sxybyj identified by sxybyj
default tablespace sxybyj
temporary tablespace sxybyj_temp;
//给用户添加权限
GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
DBA,CONNECT,RESOURCE,CREATE SESSION TO sxybyj
drop user sxybyj cascade;
drop user test1 cascade;
drop tablespace sxybyj including contents and datafiles;
drop tablespace sxybyj_temp including contents and datafiles;
标签:
原文地址:http://www.cnblogs.com/tiandi/p/5004705.html