1,创建表空间:
SQL> create tablespace bobtablespace datafile '/oracle/bob/bob1.dbf' size 100m,'/oracle/bob/bob2.dbf' size 100m;
2,创建本地表空间:
SQL> create tablespace user_data datafile '/oracle/bob/user1.dbf' size 200m extent management local uniform size 10m;
3,创建临时表空间:
SQL> create temporary tablespace temp_bob tempfile '/oracle/bob/temp_bob.dbf' size 200m;
4,显示用户表空间:
SQL> select TABLESPACE_NAME from user_tablespaces;
5,online/offline表空间:
SQL> alter tablespace USER_DATA offline;
SQL> alter tablespace USER_DATA online;
6,只读表空间:
SQL> alter tablespace USER_DATA read only(只读);
SQL> alter tablespace USER_DATA read write(读写);
7,删除表空间:
SQL> drop tablespace USER_DATA including contents;
8,允许表空间文件自动扩展:
SQL> alter tablespace BOBTABLESPACE add datafile '/oracle/bob/bob3.dbf'
2 size 200m
3 autoextend on next 10m maxsize 500m;
9,手动修改数据文件大小:
SQL> alter database datafile '/oracle/bob/bob1.dbf' resize 200m;
阅读(2358) | 评论(0) | 转发(0) |