遇到ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations错误

遇到ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations错误

[oracle@rhel63single ~]$ sqlplus lc0029999/aaaaaa

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 10 00:11:32 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter table lc0039999.t1 rename to lc0039999.tt1;
alter table lc0039999.t1 rename to lc0039999.tt1
                                            *
ERROR at line 1:
ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations


SQL> alter table t1 rename to  lc0039999.tt1;
alter table t1 rename to  lc0039999.tt1
                                   *
ERROR at line 1:
ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations


SQL> show user
USER is "LC0029999"
SQL> 


查询mos,得到如下文章:ORA-14047: ALTER TABLE | INDEX RENAME May Not Be Combined With Other Operations (文档 ID 400398.1)
在该文章中,说明了报错的原因:

The combination of actions appear to be:
1.the actual table rename
2.specifiying the schema name of the target


也就是说,不要带目标表的schema

 

值得注意的是,即使是在相同的一个schema下,目标表带有相同的schema名称,也是不允许的,如下:

SQL> show user
USER is "LC0029999"
SQL> alter table lc0029999.t1 rename to lc0029999.tt1; 
alter table lc0029999.t1 rename to lc0029999.tt1
                                            *
ERROR at line 1:
ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations

SQL> 

但是源表可以带schema信息,如下:

SQL>  alter table lc0029999.t11 rename to tt1;

Table altered.

SQL> 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值