2012-01-18 69 views
3

当我执行以下命令:通过dblink插入所有的表格是否可能?

INSERT ALL INTO [email protected]_link(columnName) VALUES (columnValue) 
SELECT columnValue FROM localTable; 

我得到一个错误

SQL Error: ORA-02021: DDL operations are not allowed on a remote database 02021. 00000 - "DDL operations are not allowed on a remote database" *Cause: An attempt was made to use a DDL operation on a remote database. For example, "CREATE TABLE [email protected] ...". *Action: To alter the remote database structure, you must connect to the remote database with the appropriate privileges.

需要注意的是,当我做一个普通(不是全部插入到)...插入工作过的数据库链接。 (补助金有效)。

这两个表上都没有触发器。

而且我明确需要INSERT ALL INTO来允许插入多个表的能力。

INSERT ALL INTO操作不允许进入数据库链接表吗?

回答

5

此消息是有点误导,但无论如何,根据the Oracle SQL Reference

You cannot perform a multitable insert into a remote table.

+0

是的...肯定是误导。 – vicsz 2012-01-18 21:53:08

1

Are INSERT ALL INTO operations not allowed into database link tables?

不幸的不是。注意第二个项目在此列表:

Restrictions on Multitable Inserts

You can perform multitable inserts only on tables, not on views or materialized views.

You cannot perform a multitable insert into a remote table.

You cannot specify a table collection expression when performing a multitable insert.

In a multitable insert, all of the insert_into_clauses cannot combine to specify more than 999 target columns.

Multitable inserts are not parallelized in a Real Application Clusters environment, or if any target table is index organized, or if any target table has a bitmap index defined on it.

Plan stability is not supported for multitable insert statements.

The subquery of the multitable insert statement cannot use a sequence.

来源:Oracle 9i documentation

相关问题