//创建数据表空间 SINOTRANS
?
create tablespace SINOTRANS
logging?
datafile 'E:\oracle\product\10.2.0\oradata\orcl\ZhongWaiYun.dbf'?
size 100m?
autoextend on?
next 32m maxsize 2048m?
extent management local;
?
create tablespace gabriel datafile '/home/oracle/oradata/mostdt2/gabriel01.dbf' size 5G
?
//创建数据表临时空间?
create temporary tablespace myc2
tempfile 'F:\oracle\product\10.2.0\myc7.dbf'?
size 100m?
autoextend on?
next 32m maxsize 2048m?
extent management local;?
?
?
//创建用户并指定密码?
?
create user myc7 identified by myc7
?
//授予message用户DBA角色的所有权限?
?
GRANT DBA TO myc7
?
?
//给用户授予权限?
?
grant connect,resource to myc7(db2:指定所有权限)?
?
//删除表空间
SQL>drop tablespace SINOTRANSincluding contents and datafiles;
--干掉主键被外表关联的表空间
SQL> drop tablespace mytbs02
2 including contents and datafiles cascade constraints;
?
//修改表空间
SQL>alter tablespace myts03 rename to myts03_new;
?
//删除用户
drop user myc9 cascade;?
?
//cascade参数是级联删除该用户所有对象,经常遇到如用户有对象而未加此参数则用户删不了的问题,所以习惯性的加此参数?