Tbs_P2 : 改变表空间特性
2016-06-17 16:31
543 查看
SQL>conn system/oracle --创建手动段管理的表空间SQL>altersystem set db_create_file_dest ='/oradata';SQL>createtablespace tbs_manualsegs segment space management manual; --确定新表空间的存在SQL>selecttablespace_name, segment_space_management from dba_tablespacesWheretablespace_name='TBS_MANUALSEGS'; --在表空间中创建表和索引SQL>createtable t_mantab (c1 number) tablespace tbs_manualsegs;SQL>createindex i_mantab on t_mantab(c1) tablespace manualsegs; --新建自动段表空间SQL>createtablespace tbs_autosegs; --将对象移入新的表空间SQL>altertable t_mantab move tablespace tbs_autosegs;SQL>alterindex i_mantab rebuild online tablesapcetbs_autosegs; --删除原来的表空间SQL>droptablespace tbs_manualsegs including contents and datafiles; --将新的表空间重命名为原来的名称。(应用软件的需要)SQL>altertablesapce tbs_autosegs rename to tbs_manualsegs; --通过删除表空间进行清理,首先用以下命令SQL>droptablespace tbs_manualsegs; --由于表空间非空,将引发错误,应该对此进行纠正。SQL>drop tablespace tbs_manualsegs including contents and datafiles;
相关文章推荐
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- Oracle Containers for J2EE远程安全漏洞(CVE-2014-0413)
- Oracle 10g R2不能使用EM的问题
- 表空间操作
- PreparedStatement中in子句的处理
- VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本
- oracle sql日期比较
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- OS block size和Oracle block size,查找OS Blocksize的方法
- oracle中创建数据库和表空间的几点总结
- 数据库自动备份脚本
- 如何安装SQL Server 2008 Management Studio Express
- Windows7下获得System权限问题解决方法
- oracle的nvl函数的使用介绍
- 解决oracle用户连接失败的解决方法
- oracle的一些tips技巧
- Oracle 下的开发日积月累
- Oracle存储过程之数据库中获取数据实例
- Windows下ORACLE 10g完全卸载的方法分析