Tbs_P2 : 改变表空间特性

发布时间:2020-07-16 23:33:03 作者:PengChonggui
来源:网络 阅读:271

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_tablespaces

Wheretablespace_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;


推荐阅读:
  1. oracle中如何使用iostat
  2. 想带几个徒弟,C#.NET开发技术方面的,把自己积累的软件技术传授给高徒[非网络带人]

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

oracle system management

上一篇:VisualSVN Server分级授权管理工具分享

下一篇:JavaScript~~实现鼠标右键&左键点击

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》