oracle 创建表空间,修改表空间,删除表空间

//创建数据表空间
create tablespace test(表空间名字)
logging
--datafile 'D:\oracle\product\10.2.0\oradata\mzjx\mzjx.dbf'
datafile 'D:\oracle tablespace\test.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;

 

 

//创建临时表空间
create temporary tablespace test_temp(临时表空间名称)
--tempfile 'D:\oracle\product\10.2.0\oradata\mzjx\mzjx_temp01.dbf'
datafile 'D:\oracle tablespace\test_temp.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;


修改表空间大小
alter database
datafile 'D:\oracle tablespace\test.dbf'
autoextend on next 50m maxsize 10240m;

 

删除表空间
drop tablespace test
including contents and datafiles cascade constraints

including contents:指删除表空间中的segments;

including contents and datafiles :指删除segments和datafiles;

cascade constraints:删除所有与该空间相关的完整性约束条件。

 

如果你没有通过drop 表空间而是直接从硬盘中删除dbf 文件这样再次登陆的时候就会报

oracle ora-01033:oracle initialization or shutdown in progress

如果你遇到这样的问题你可以访问如下网站

你严格按照这个方法做就可以了。

http://281107072.iteye.com/blog/627359
//创建用户并指定表空间
create user szjx identified by szjx
default tablespace test
temporary tablespace test_temp;

//给用户授予权限
grant connect,dba,resource to szjx;

 

导入数据

 imp szjx/12345678@orcl file=D:/szjx.dmp full=y

导出数据

 exp szjx/12345678@orcl file=D:/szjx.dmp

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值