oracel表空间的学习

1.--创建大文件表空间
create  bigfile tablespace big_table_01
datafile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\XIANWEI\big_table_xianwei01.DBF'
size 500M autoextend on;


2.--创多数据文件的表空间
create tablespace table_xianwei_01
datafile
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\XIANWEI\table_xianwei_01.DBF' size 10M,
'D:\ORACLE\PRODUCT\10.2.0\ORADATA\XIANWEI\table_xianwei_02.DBF' size 10M autoextend on next 1M maxsize unlimited;

 

--3.删除表空间
drop tablespace big_table_01
including contents

and datafiles 

cascade constraints;

 

--4.查看TABLE-XINAWEI_01表空间的数据文件
select * from  dba_data_files where tablespace_name ='TABLE_XIANWEI_01'

 

--5.显示标准块大小
show parameter db_block_size;

 

 

--6.创建非标准块大小,是标准块大小的整数倍 eg. db_16K_cache_size
show parameter db_16K_cache_size;
alter system set db_16K_cache_size=8M;

 

--7.如何把表空间设置成只读的,防修忙乱
alter tablespace table_xianwei_01 read only;

 

--8 把表空间改成读写
alter tablespace table_xianwei_01 read write;

 

--9.创建表时指定到那个表空间
create table tt (name varchar2(20),age number(2))tablespace table_xianwei_01;

 

 

 --10.限制sys用户只有50M的使用空间
 alter user sys quota 50M on table_xianwei_01;

 

 

 -- 11 如何使一个表空间离线
 alter tablespace table_xianwei_01 offline;
 alter tablespace table_xianwei_01 online;
 alter database recover tablespace table_xianwei_01;


 -- 12 表空间改名
 alter tablespace table_xianwei_01 rename to table_xianwei_02;
 select * from dba_data_files;

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值