Oracle 数据文件管理
1、手工改变数据文件的大小
SQL>conn / as sysdba
SQL>Createtablespace exampletb Datafile 'E:\ examp01.dbf' size 10M ;
SQL>alter database datafile 'E:\examp01.dbf' resize 20m;
SQL>alter database datafile 'E:\examp01.dbf' resize 9m;
2、加入数据文件到表空间
SQL> alter tablespace exampletb add datafile 'E:\ examp02.dbf' size 10M;
3、从表空间中删除数据文件
SQL> alter tablespace exampletb drop datafile 'E:\ examp02.dbf';
4、将表空间设置为仅仅读模式和读写模式
SQL>CREATETABLE scott.student (id NUMBER(5), name VARCHAR2(10)) TABLESPACE exampletb;
SQL>insertinto scott.student(id,name) values(1, 'lucy');
SQL> alter tablespace exampletb read only;
SQL>insertinto scott.student(id,name) values(2, 'lily');
SQL>select* from scott.student;
SQL> alter tablespace exampletb read write。
SQL>insertinto scott.student(id,name) values(2, 'lily');
5、 将表空间设置为在线和离线
SQL> alter tablespace exampletb offline;
SQL>select* from scott.student;
SQL> alter tablespace exampletb online;
SQL>select* from scott.student;
6、查询表空间和数据文件
SQL>select * from v$tablespace;
SQL>select * from dba_tablespaces;
SQL>select * from v$datafile;
SQL> select * from dba_data_files;
相关文章
- 实现Oracle,Mysql,SqlServer数据库的codefirst的操作
- Oracle数据库安装图文操作步骤
- oracle的字符集检查工具CSSCAN(一)
- 【C/C++学院】(24)Oracle数据库编程--管理oracle
- oracle sql语言模糊查询--通配符like的使用教程
- ORACLE 一条语句统计记录总数及各状态数
- ORACLE——重做日志文件管理
- ORACLE序列总结
- Oracle 游标使用全解
- 使用Perl管理Oracle数据库
- 安装oracle 11g rac (11.2.03) 出现PRVF-5637 错误
- Oracle 审计管理
- Oracle EM 不能访问
- Oracle存储过程实现返回多个结果集 在构造函数方法中使用 dataset
- Oracle用户、权限、角色管理
- C# Oracle 连接与修改
- oracle db server 改动主机名时的注意事项
- 安装Oracle JDK 7.0与8.0 for Mac OS X后Eclipse启动报错的解决之道
- oracle 快照(snapshot) 管理
- ORACLE 数据库表空间的管理以及IM列式存储
- Oracle 管理多租户环境之CDB管理
- 【数据库管理】①① Oracle逻辑存储架构