通过 dblink 将所有内容插入表中..这可能吗?

发布于 2024-12-27 18:03:11 字数 561 浏览 1 评论 0原文

当我执行以下命令时:

INSERT ALL INTO table@database_link(columnName) VALUES (columnValue)
SELECT columnValue FROM localTable;

出现错误

SQL 错误:ORA-02021:远程不允许 DDL 操作 数据库 02021. 00000 - “远程数据库上不允许进行 DDL 操作” *原因:尝试在远程数据库上使用 DDL 操作。 例如,“CREATE TABLE 表名@remotedbname ...”。 *操作:要更改远程数据库结构,您必须连接到 具有适当权限的远程数据库。

请注意,当我执行常规操作(而不是全部插入)时...插入通过数据库链接进行。 (补助金有效)。

两个表上也没有触发器。

我明确需要 INSERT ALL INTO,以允许插入到多个表中。

是否不允许对数据库链接表进行 INSERT ALL INTO 操作?

When I execute the following:

INSERT ALL INTO table@database_link(columnName) VALUES (columnValue)
SELECT columnValue FROM localTable;

I get an error

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 tablename@remotedbname ...".
*Action: To alter the remote database structure, you must connect to the
remote database with the appropriate privileges.

Note that when I do a regular (not an insert ALL into) ... the insert works over the database link. (Grants are valid).

There are also NO triggers on either tables.

And I explicitly need the INSERT ALL INTO, to allow for the ability to insert into multiple tables.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

累赘 2025-01-03 18:03:11

此消息有点误导,但无论如何根据 Oracle SQL参考

您无法对远程表执行多表插入。

This message is a little misleading but anyway according to the Oracle SQL Reference

You cannot perform a multitable insert into a remote table.

最终幸福 2025-01-03 18:03:11

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

不幸的是没有。请注意此列表中的第二项:

多表插入的限制

您只能对表执行多表插入,而不能对视图或
物化视图。

您无法对远程表执行多表插入。

执行操作时不能指定表集合表达式
多表插入。

在多表插入中,所有 insert_into_clause 不能组合
指定超过 999 个目标列。

多表插入在真实应用集群中不是并行的
环境,或者是否有任何目标表是索引组织的,或者如果有
目标表上定义了一个位图索引。

多表插入语句不支持计划稳定性。

多表插入语句的子查询不能使用序列。

来源:Oracle 9i 文档

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

Unfortunately not. Note the second item in this list:

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.

Source: Oracle 9i documentation

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文