Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2875015
  • 博文数量: 200
  • 博客积分: 2413
  • 博客等级: 大尉
  • 技术积分: 3067
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-01 22:07
文章分类

全部博文(200)

文章存档

2018年(2)

2017年(8)

2016年(35)

2015年(14)

2014年(20)

2013年(24)

2012年(53)

2011年(44)

分类: Oracle

2013-01-04 16:12:09

Ora-02069 When Using a Local Function While Updating a Remote Table [ID 342320.1]转到底部转到底部
修改时间:2012-12-14类型:PROBLEM状态:MODERATED优先级:3
没有任何注释注释 (0)为此文档评级通过电子邮件发送此文档的链接在新窗口中打开文档可打印页

In this Document






This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
Applies to: Oracle Server - Enterprise Edition - Version 9.2.0.1 to 11.2.0.2 [Release 9.2 to 11.2]
Information in this document applies to any platform.


Symptoms

In Oracle Server executing the following update:

update t1
set c1=c1
where c2=pkg_date.Fn_GetDate;


where pkg_date.Fn_GetDate is a function of a local package that returns a sysdate,
and t1 is a synonym that points to a remote table, defined through a database link.

returns

"ORA-02069: global_names parameter must be set to TRUE for this operation"
on the function pkg_date.Fn_GetDate on the where condition.

 

Changes Cause

Because of a limitation, it is not possible to use a local function when doing a dml operation on a remote table .When this is attempted, the ora-2069 is raised.

Solution

These are possible workaround to avoid the ora-2069 error in the described scenario

1. Use global_names=true.  This can be done on a session basis: "alter
    session set global_names=true".  If you are having problems getting this
    to work, it is no doubt a configuration problem.  Please open a separate
    TAR for this if you can't figure it out.

2. Put the function to be used at the remote site.

3. Put a wrapper function at the remote site which calls the actual function
    over a database link back to the local site.

4. Include in the "from" the "dual" table. You'll have a Cartesian product (with dual) and the functions will be applied in the calling side, hence some performance issues can be raised.

阅读(2140) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~