2012-01-18 44 views
3

私は次のコマンドを実行すると:テーブル全体をdblinkでINSERT INTOに挿入できますか?

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

を私は(ALLへの挿入ではない)通常の操作を行うとき...インサートが、データベース・リンクを介して機能することをエラー

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.

注意を取得。 (助成金は有効です)。

いずれの表にもNOトリガーがあります。

そして、私は明示的にINSERT ALL INTOが必要です。これは、複数のテーブルに挿入する機能を可能にするためです。

INSERT ALL INTO操作はデータベースリンクテーブルには許可されていませんか?

答えて

5

このメッセージは、少し誤解を招くおそれがありますが、とにかくthe Oracle SQL Reference

You cannot perform a multitable insert into a remote table.

+0

うん...確かに誤解を招くによります。 – vicsz

1

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

残念ながらそうではありません。このリストの2番目の項目に注意してください。

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

関連する問題