Toad World® Forums

FW: toad problem


#1

One of my co-workers has a problem with the default date format

As you can see in the screen shot below EXECUTE LOGIN SCRIPTS is NOT checked.

But somehow she is getting her session NLS_DATE_FORMAT changed.

I presume there must be some registry key somewhere that has this. But I could
not find it. When I login as her on my machine the NLS_DATE_FORMAT is correct.
But on her machine it is wrong so it must be a machine specific thing.

image001.png


#2

Morning Erwin,

One of my co-workers has a problem with the default date format

As you can see in the screen shot below EXECUTE LOGIN
SCRIPTS is NOT checked.

But somehow she is getting her session NLS_DATE_FORMAT changed.

F5 (run a script) uses NLS_DATE_FORMAT from the database.
F9 (run a statement) used the date format defined in options->Data
Grids->Data.
Is this what you are seeing perhaps?

I presume there must be some registry key somewhere that has
this. But I could not find it. When I login as her on my
machine the NLS_DATE_FORMAT is correct. But on her machine
it is wrong so it must be a machine specific thing.

Registry settings are at HKLM/software/oracle/HOMEn - where ‘n’ varies
according to how many homes you have installed. By default, there is not
a setting defined for NLS_DATE_FORMAT so you will get the Oracle default
DD-MON-YY.

HTH

Cheers,
Norm. [TeamT]

Cheers,
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk


#3

Just an update. It seems to have gotten crazier.

Here are some symptoms.

  1. she has several homes

    • one of the homes (the one she is not to use) does not
      Change the NLS_DATE_FORMAT
    • two of the homes she should use (don’t ask why there are two)
      Cause the NLS_DATE_FORMAT to change
  2. when she executes SQL*Plus she also has the problem

  3. but here is the kicker. When she executes SQL*Plus from TOAD
    The problem goes away.

I will have somebody who understands DOS/WINDOWS, the REGISTRY etc. look into it.


#4

Erwin,

  1. she has several homes
  • one of the homes (the one she is not to use) does not
    Change the NLS_DATE_FORMAT
  • two of the homes she should use (don’t ask why there are two)
    Cause the NLS_DATE_FORMAT to change
  1. when she executes SQL*Plus she also has the problem

I’ve just added a NLS_DATE_FORMAT setting to my registry and executed
sql*plus with “SELECT SYSDATE FROM DUAL”. The setting I chose for
NLS_DATE_FORM
result came out as follows:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing
options

SQL> select sysdate from dual;

SYSDATE


#5

mine works fine with alter session e.g.

SQL> ALTER SESSION SET NLS_DATE_FORMAT=‘DD-MON-YYYY HH24:MI:SS’;
Session altered.

SQL> select sysdate from dual;

SYSDATE


#6

There is no problem with the ALTER SESSION. The problem is that we are trying to
find out where in one of my co-workers machines this is done because her
NLS_DATE_FORMAT is “wrong” (different from everybody else’s).
It only came to light because she was using a badly written view which did not
have a FORMAT string in a TO_DATE function. The simplest thing would have been
to fix the view and ignore her problem. But we want her machine to be fixed.