ORACLE 10G创建表空间

---创建表空间
create tablespace 表空间名字 datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/01.dbf' size 4096M;
alter tablespace 表空间名字 add datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/02.dbf' size 4096M;
alter tablespace 表空间名字 add datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/03.dbf' size 4096M;
alter tablespace 表空间名字 add datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/04.dbf' size 4096M;
alter tablespace 表空间名字 add datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/05.dbf' size 4096M;
alter tablespace 表空间名字 add datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/06.dbf' size 4096M;
alter tablespace 表空间名字 add datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/07.dbf' size 4096M;
alter tablespace 表空间名字 add datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/08.dbf' size 4096M;
alter tablespace 表空间名字 add datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/09.dbf' size 2048M;
---创建表空间

alter tablespace SYSAUX add datafile 'F:/oracle/product/10.2.0/oradata/wsdata(数据库对象)/sysaux02.dbf' size 512M;


alter   database   datafile   'E:/oracle/product/10.2.0/oradata/pluto/ysstech01.dbf'    offline   drop

create undo tablespace UNDOTBS2 datafile 'E:/oracle/product/10.2.0/oradata/pluto/undotbs02.dbf' SIZE 300M AUTOEXTEND ON;

alter system set UNDO_TABLESPACE=UNDOTBS2

DBA_ROLLBACK_SEGS

drop tablespace UNDOTBS1


-- 如果undo表空间undotbs不能释放空间,重建之
-- 创建备用undo表空间
create undo tablespace newundotbs datafile '$ORA_DATA/newundotbs01.dbf' size 1000m
/
-- 切换undo表空间
alter system set undo_tablespace=newundotbs scope=spfile
/
shutdown immediate
/
startup
/
-- drop原表空间
drop tablespace undotbs including contents and datafiles
/
-- 创建原undo表空间
create undo tablespace undotbs datafile '$ORA_DATA/undotbs01.dbf' size 1000m
/
-- 切换undo表空间
alter system set undo_tablespace=undotbs scope=spfile
/
-- 关闭重起并把备用undo表空间drop
shutdown immediate
/
startup
/
drop tablespace newundotbs including contents and datafiles
/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值