Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

INSERT ALL INTO a table over a dblink .. Is it possible?

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?

like image 814
vicsz Avatar asked Oct 20 '25 09:10

vicsz


1 Answers

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

You cannot perform a multitable insert into a remote table.

like image 188
Marcin Wroblewski Avatar answered Oct 22 '25 06:10

Marcin Wroblewski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!