首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

oracle 札记 三

2012-09-24 
oracle 笔记 三三? 表空间??创建表空间: create? tablespace? &{tablespaceName} datafile d:/.... /name.

oracle 笔记 三

三? 表空间
?
?创建表空间: create? tablespace? &{tablespaceName} datafile d:/.... /name.dbf size 20m uniform 128k


?改变表空间的状态:alter tablespace &tpName? offline
???? alter tablespace &tpName? online
??
?只读表空间:
???? alter tablespace &tpName read only
???? alter tablespace &tpName read write

?拓展表空间:?
??? 1 增加数据文件 alter tablespace &tpName add datafile d:\...\new.dbf size 20m;
??? 2 增加数据文件的大小: alter tablespasce &tpname d:\...\test.dbf resize 40m;
??? 3 设置自动增长: alter tablespace &tpname datafile? d:\...\test.dbf autoextend on? next 10m maxsize 500;
??? sp: datafile 最大500 m
?
?*查看表空间数据文件的信息: select * from dba_data_files;
????????? 如: select tablespace_name from dba_data_files where file_name='d:/.../test.dbf'?

?查询表空间拥有的表:?select * from all_tables where tablespace_name = &tpName;

?查询表属于那个表空间:?select tablespace_name, table_name from user_tables where table_name=&name;

热点排行