ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 10G--Rename Tablespace rules(zt)

10G--Rename Tablespace rules(zt)

原创 Linux操作系统 作者:vongates 时间:2019-07-01 10:09:04 0 删除 编辑

Another great new feature in tablespace management is rename tablespace.

Tablespace Rename Overview

In Oracle 10g, you can simply rename a tablespace TBS01 to TBS02 by issuing the following command:

     ALTER TABLESPACE tbs01 RENAME TO tbs02;

However, you must follow the rules when renaming a tablespace:

      • You must set compatibility level to at least 10.0.1.
      • You cannot rename the SYSTEM or SYSAUX tablespaces.
      • You cannot rename an offline tablespace.
      • You cannot rename a tablespace that contains offline datafiles.
      • Renaming a tablespace does not changes its tablespace identifier.
      • Renaming a tablespace does not change the name of its datafiles.

Tablespace Rename Benefits

Tablespace rename provides the following benefits:

      • It simplifies the process of tablespace migration within a database.
      • It simplifies the process of transporting a tablespace between two databases.

Example 1: Rename a tablespace within a database. In Oracle9i or earlier releases, you must take the following steps to rename a tablespace from OLD_TBS to NEW_TBS:

      1. Create a new tablespace NEW_TBS.
      2. Copy all objects from OLD_TBS to NEW_TBS.
      3. Drop tablespace OLD_TBS.


In Oracle 10g, you can accomplish the same thing in one step:

      • Rename tablespace OLD_TBS to NEW_TBS.
     ALTER TABLESPACE RENAME old_tbs to new_tbs;
others: temp tablespace group,bigfile tablespace please reference:
http://www.dbazine.com/olc/olc-articles/ault2

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51797/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-09-11

  • 博文量
    449
  • 访问量
    292658