Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with dblink insert to remote database

Status
Not open for further replies.

gertvangaever

Technical User
Apr 3, 2002
37
BE
Hi!

I have database A and database B
I want to update table 'tsfilled' from user 'rapport' in database B, via database A.
So I created a dblink in database A.
It's a public database link, logging in to user 'rapport' ('fixed user') in database B.

When I log in as sys, and I thry the following:
desc tsfilled@ora_rapport, it works!
So that means tsfilled is fully accesible (I would think)

When I try an update, however I get an error!

SQL> insert into tsfilled@ora_rapport
2 (datum, ts_name, ts_size)
3 select SYSDATE, tablespace_name, sum(bytes)
4 from dba_data_files
5 group by tablespace_name;
(datum, ts_name, ts_size)
*
ERROR at line 2:
ORA-02070: database ORA_RAPPORT does not support operator USERENV in this context

I can't find much information about ORA-02070, so can any1 help me please?

Tnx
Gert

 
also strange is the following:

1 insert into tsfilled@ora_rapport
2 (ts_name, ts_free)
3* values ('TESTTT', 5464654)
SQL> /

1 row created.

This seems OK, but when I look at the table in database B, it is NOT updated...

 
Gert,

have you tried using something other than SYSDATE in your insert statement or omitting this column. This is a guess but it is a difference between your successful insert and the one which doesn't work.

Ed
 
2 Notes:

1: The ability to desc a table only means you have some permissions on it, not necessarily insert or update..

2: The actual error message ( in more detail) and a hint for correcting it from Oracle Docs:

ORA-02070

ORA-02070
database name does not support str in this context

Cause:The remote database does not support the named capability in the context in which it was used.

Action:Simplify the SQL statement.

Hope it helps...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top