ORA-01843 When Generating ASH Report (文档 ID 1147253.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.1.0.3 and later

Information in this document applies to any platform.

***Checked for relevance on 17-Jul-2012***

SYMPTOMS

On : 10.1.0.3 version, RDBMS

When attempting to generate ASH report:

SQL> @?/rdbms/admin/ashrpt.sql

the following error occurs:

ASH Samples in this Workload Repository schema
(to_char((sysdate - to_date(:oldest_smaple, 'DD-Mon-YY HH24:MI:SS'))*1440,
ERROR at line 3:
ORA-01843: not a valid month

CAUSE

The issue is caused by setting nls_language to a language which does not use "MON" mask as date format.

In this example; nls_date_format and nls_date_language are not set explicitly, and nls_language is set to 'SIMPLIFIED CHINESE', which does not use "MON" mask.

Test case:

SQL> alter session set NLS_LANGUAGE='SIMPLIFIED CHINESE';
Session altered.

SQL> select min(sample_time), max(sample_time)
2 from dba_hist_active_sess_history;

MIN(SAMPLE_TIME) MAX(SAMPLE_TIME)
---------------------------------------------------------------------------
29-6月 -10 01.31.31.595 下午 04-7月 -10 08.00.45.965 上午

SQL> alter session set NLS_LANGUAGE='AMERICAN';
Session altered.

SQL> select min(sample_time), max(sample_time)
2 from dba_hist_active_sess_history
3 ;

MIN(SAMPLE_TIME) MAX(SAMPLE_TIME)
---------------------------------------------------------------------------
29-JUN-10 01.31.31.595 PM 04-JUL-10 08.00.45.965 AM

SOLUTION

To implement the solution, please execute the following steps:

Please set nls_language to AMERICAN and re-generate the ASH report:

SQL> alter session set nls_language='AMERICAN';
SQL> @?/rdbms/admin/ashrpt.sql
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值