obclient icon indicating copy to clipboard operation
obclient copied to clipboard

[Feature]: Permanently change the NLS_DATE_FORMAT setting

Open jiugem opened this issue 1 year ago • 0 comments

Describe your use case

It is recommended that obclient first try to read OB related settings from the operating system environment variable NLS_DATE_FORMAT. See Oracle sqlplus behavior.

When the operating system does not set the time display format, select sysdate from dual; output: 11-March-24

After operating system configuration variables export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss" export NLS_TIMESTAMP_FORMAT="yyyy-mm-dd hh24:mi:ss"

select sysdate from dual; PLSQL, sqlplus output SYSDATE: 2024-03-11 13:05:31

Avoid script execution after obclient login database connection: ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'; ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS.FF6';

Describe the solution you'd like

I'm not sure how PLSQL DEVELOPER and SQLplus read related variables when obclient starts.

Describe alternatives you've considered

No response

Additional context

No response

jiugem avatar Mar 11 '24 06:03 jiugem