forall-insert over dblink does not work ...
455587Jul 11 2006 — edited Jul 13 2006Hi,
I want to send data from one database into another one using a dblink. In my PL/SQL func I have a BULK COLLECT select from some tables storing the results in some TABLE OF variables. There is no NULL in the variables. This works properly.
I use a FORALL loop to transfer the bulk data into a table in the other database via a dblink. In this case I get the following error message:
ORA-01400: cannot insert NULL into ("SCHEMA_NAME"."TABLE_NAME"."FIELD_NAME")
When I rewrite the FORALL to a normal FOR loop using the same TABLE OF variables, the data transfer works perfectly.
I also created a test table in the same database where the PL/SQL code runs. The test table had exactly the same structure and constraints as the original table. Also this test was successful.
Question: Isn't it possible to use FORALL to insert data over a database into a table in another database?
We are using the database version 10.1.0.4.0 and PL/SQL release 10.1.0.4.0.
Thanks