遇到ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations錯誤,altertablerename

來源:互聯網
上載者:User

遇到ORA-14047: ALTER TABLE|INDEX RENAME may not be combined with other operations錯誤,altertablerename

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

[oracle@rhel63single ~]$ sqlplus lc0029999/aaaaaaSQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 10 00:11:32 2015Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> 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 operationsSQL> 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 operationsSQL> show userUSER 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 rename2.specifiying the schema name of the target


也就是說,不要帶目標表的schema

 

值得注意的是,即使是在相同的一個schema下,目標錶帶有相同的schema名稱,也是不允許的,如下:

SQL> show userUSER 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 operationsSQL> 

但是源表可以帶schema資訊,如下:

SQL>  alter table lc0029999.t11 rename to tt1;Table altered.SQL> 

 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.