有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何从oracle的my machine dateformat设置中清除从my machine数据库连接获得的dateformat集

如何从我的计算机清除从我的计算机oracle数据库连接中设置的日期格式

正如在this帖子中一样,我已经更改了调用SP的sql devoper,它工作正常,但在tomcat服务器上不起作用

但它是从另一台机器上运行的,和我转移到另一台机器上的代码一样,它就像一个魔咒一样工作

是否有办法为此配置/清除任何设置


共 (1) 个答案

  1. # 1 楼答案

    让我们试试这个-它不适合评论

    从这个URL:http://www.dba-oracle.com/t_ora_01843_not_a_valid_month.htm

    Resolving ORA-01843 includes bad data issues.  The reason a ORA-01843 occurs includes these reasons
    
    •Using an incorrect NLS_DATE_FORMAT 
     This happens a lot when you see data coming from US 
     (where the Month is normally written before the day)
     but the format in the application is still the "European" style.
     (where the day is written before the month). 
    
    •Using a incorrect NLS_DATE_FORMAT:
     Such as trying to insert a "written" month name but are using a "numeric" month in the mask.
    

    NLS设置是语言环境的一部分(正如tomcat所看到的)。区域设置是环境的一部分。这意味着命令

    locale  
    

    如果在问题服务器上的tomcat进程中运行,该命令将不会给出与在工作服务器上的tomcat进程中运行时完全相同的结果。我不确定tomcat是不是问题所在。但是,这是一个区域设置。安装新软件没有帮助

    登录到服务器A(作为运行tomcat的用户),然后键入:locale

    登录到服务器B(作为运行tomcat的用户),然后键入:locale

    输出是否完全相同?Oracle对区域设置非常敏感。要使它们相同,请使用工作服务器的区域设置