Skip to Main Content
  • Questions
  • ORA-02070: database DBLINK does not support subqueries in this context when updating SQL Server via gateway

Breadcrumb

Dev Live Dev Intro

This month we are celebrating Developers at AskTOM. We welcome Developers of all levels of experience to join us at our FREE Developer Live events coming in August. Just click on the left to register today! If you are brand new to Database Technology, then we also have got you covered. Just click on the right for your comprehensive FREE training program to kick start your Oracle Database Development journey!

Question and Answer

Chris Saxon

Thanks for the question, IFTIKHAR.

Asked: May 31, 2020 - 8:48 am UTC

Answered by: Chris Saxon - Last updated: June 01, 2020 - 3:31 pm UTC

Category: SQL - Version: 11G

Viewed 100+ times

You Asked

Hi Tom,

I am trying to update MS SQL Server table from Oracle via dblink. Using 11g on Oracle with Gateway HS configuration i can query of SQL Server table from Oracle but cannot update as below is detail error is showing.


Error starting at line : 3 in command -
UPDATE FTEST.PAYMENTH@DBLINK
SET "APPSTATUS_0"=1
WHERE "NUM_0"=  'PPFT10202000001'
Error at Command Line : 5 Column : 17
Error report -
SQL Error: ORA-02070: database DBLINK does not support some function in this context
02070. 00000 -  "database %s%s does not support %s in this context"
*Cause:    The remote database does not support the named capability in
           the context in which it is used.
*Action:   Simplify the SQL statement.




In SQL Server table "Paymenth" having NUM_0 & UPDTICK_0 columns. NUM_0 is NVARCHAR where UPDTICK_0 is INTEGER. I can use UPDTICK_0 in where condition and can proceed for the update but cannot use NVARCHAR in where condition and getting above error. see the below example with INTEGER column condidition in where clause.

UPDATE FTEST.PAYMENTH@DBLINK
SET "APPSTATUS_0"=2
WHERE "UPDTICK_0"=9

85 rows updated.


please advise to use NVARCHAR in where clause while updating MS SQL Server table from Oracle.

and we said...

There is a known bug related to this issue. See MOS note 457473.1.

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database