My Oracle Support Banner

Executing a Dynamic Statement in a Pro*C Client ALTER SESSION is not Taken Into Account (Doc ID 352513.1)

Last updated on FEBRUARY 15, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Precompilers - Version 10.2 and later
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
Information in this document applies to any platform.
***Checked for relevance on 23-Apr-2010***


Symptoms

In a 10.2.0 Pro*C program the "alter session set NLS_DATE_FORMAT" doesn't work, when the "alter session set NLS_DATE_FORMAT" is executed in a dynamic statement

e.g.

ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS
select sysdate from dual in a C Host variable declared as "char"

returns
DATE: --15-NOV-05--

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!


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.