Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-02074: cannot SET NLS in a distributed transaction

485251Jun 19 2009 — edited Nov 12 2010
Hi,

Running a 9i stored procedure over the network from a C# application.

The procedure runs the following command which works just fine when the procedure is run from SQL+,
however it fails when running over the network from C#

begin dbms_session.set_nls('nls_date_format','''YYYY-MM-DD HH24:MI:SS'''); end;

with this error
ORA-02074: cannot SET NLS in a distributed transaction

Does anyone know how I can get around this?

Someone suggested in another thread that this dbms_session.set_nls command could be set as user login trigger. Could anyone give
any advice on how to do this? This would be an acceptable solution as this application will run from a specific user setup for this purpose.

Also am I likely to get the same error if I SET_NLS in a trigger

Regards
Dave
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2010
Added on Jun 19 2009
10 comments
9,203 views