Tablespace_Rename表空间

How to Rename Tablespace In Oracle10g

A.1 重命名空间命令

TablespaceRename Overview

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

ALTER TABLESPACE tbs01 RENAME TO tbs02;

A.2 重命名空间限制

However, you must follow the rules whenrenaming a tablespace:

1)       You must set compatibility level to at least 10.0.1.

2)       You cannot rename the SYSTEM or SYSAUXtablespaces.

3)       You cannot rename an offline tablespace.

4)       You cannot rename a tablespace that containsoffline datafiles.

5)       Renaming a tablespace does not changes itstablespace identifier.

6)       Renaming a tablespace does not change the nameof its datafiles.

A.3 重命名空间使用场景

Tablespace Rename Benefits

Tablespace rename provides the followingbenefits:

1)       It simplifies the process of tablespacemigration within a database.

2)       It simplifies the process of transporting atablespace between two databases.


Examples

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

Create a new tablespace NEW_TBS.

Copy all objects from OLD_TBS to NEW_TBS.

Drop tablespace OLD_TBS.

In Oracle 10g, you can accomplish the same thing in one step andrename tablespace OLD_TBS to NEW_TBS.

ALTER TABLESPACE old_tbs RENAME TO new_tbs;

 

Example 2: Transport a tablespace betweentwo databases. In the following example (see figure 3.2), you cannot transporta tablespace TBS01 from database A to database B in the previous release ofOracle server because database B also has a tablespace called TBS01. In Oracle 10g, you can simply rename TBS01 to TBS02 in database B before transportingtablespace TBS01.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值