关于ORA-02070:database xxx does not support operator USERENV in this context

Linux大全评论1.1K views阅读模式

分布式系统中用的最多的是Database Link了,今天用数据库链路的时候出现了一个问题:在update远程数据库中的表的时候出现如下错误:ORA-02070:database xxx does not support operator USERENV in this context

关于ORA-02070:database xxx does not support operator USERENV in this context

比如执行这样的语句时:

UPDATE procedure_run_byshell_log_list@db_link a

SET    (a.sid, a.serial#) =

(SELECT i.sid, i.serial#

FROM  v$session i

WHERE  i.sid IN (SELECT ii.sid FROM v$mystat ii WHERE rownum = 1));

This is a Bug(Bug ID:774807)

SQL command  "insert into t1@db_link select * from t1"

always worked in 7.3.4, but the statement now fails on any version of Oracle8

解决方法:可以先将数据插入到临时表或者保存到变量中再插入或update到远程数据库中:

企鹅博客
  • 本文由 发表于 2019年7月17日 23:47:53
  • 转载请务必保留本文链接:https://www.qieseo.com/187570.html

发表评论