ORA-02074 when Executing set_nls over a DB Link (Doc ID 132679.1)

Last updated on MAY 05, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.4 to 11.2.0.2 [Release 9.2 to 11.2]
Information in this document applies to any platform.

Symptoms

When calling the 'set_nls' in a remote procedure this causes an
ORA-02074: cannot set_nls in a distributed transaction

This can be shown with the following commands:

SQL> create database link su22v816
connect to system identified by manager
using 'su22v816';

SQL> create or replace procedure doit
as
begin
dbms_session.set_nls('NLS_LANGUAGE','dutch');
end;
/

SQL> exec doit@su22v816
BEGIN doit@su22v816; END;

*
ERROR at line 1:
ORA-02074: cannot SET NLS in a distributed transaction
ORA-06512: at "SYS.DBMS_SESSION", line 101
ORA-06512: at "SYSTEM.DOIT", line 4
ORA-06512: at line 1



SQL> exec doit

PL/SQL-procedure is geslaagd.

Changes

{CHANGE}

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms