日期:2014-05-16 浏览次数:20385 次
三? 表空间
?
?创建表空间: 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;