Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Q: Updating a remote table with data from a Local Table
In article <lnsvcs88daacfvnqtqokkd97n88lhl1ouc_at_4ax.com>,
Alex Skolnick <anon_at_anon.com> wrote:
> Hi all you Oracle Gurus,
>
> I have a local table with records I want to move to a Remote table
> with the same table structure. I created a DATABASE LINK and that is
> working fine.
>
> I created my link with the following syntax:
> CREATE DATABASE LINK REMOTE_DB connect to username identified by
> password using 'remoteDATA';
>
Did you check that db link is working for select operations?
If it works, check if you have grant on insert into remote table.
I's also recommend to use list of columns in both insert and select
clauses of your statement, like
insert into test_acct_at_remote_db (c1,c2,c3,c4...)
select c1,c2,c3,c4 from local_db;
> When I use the insert command with the following syntax:
>
> INSERT INTO TEST_ACCT_at_REMOTE_DB SELECT * from LOCAL_DB;
>
> I get the following errors:
>
> INSERT INTO TEST_ACCT_at_REMOTE_DB SELECT * from LOCAL_DB;
> *
> ERROR at line 1:
> ORA-00604: error occurred at recursive SQL level 1
> ORA-01013: user requested cancel of current operation
> ORA-02063: preceding 2 lines from REMOTE_DB
>
> What am I doing wrong?
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Mar 16 2000 - 12:59:09 CST