My Oracle Support Banner

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

Last updated on FEBRUARY 15, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.4 to 11.2.0.2 [Release 9.2 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
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

To view full details, 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 a vibrant support community of peers and Oracle experts.