暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

设置28401事件后启动数据库时报错ORA-49100

原创 Leo 2022-10-16
565

问题描述:设置28401事件后启动数据库时报错ORA-49100,如下所示:

数据库:oracle 11.2.0.4 64位

系统:centos 7.9 64位

20:36:27 SQL> alter system set event='28401 trace namecontext forever,level 1' scope=spfile;

 

System altered.

 

20:37:19 SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

20:37:43 SQL> startup

ORA-49601: syntax error: found "%s": expecting one of: "%s" etc..

20:37:49 SQL> startup

ORA-49100: Failed to process event statement [28401 trace namecontext forever,level 1]

ORA-49601: syntax error: found "FOREVER": expecting one of: "End-of-Statement" etc..

 

异常原因:设置28401事件语句错误,将“name context“写成”namecontext“.

处理方案:用spfile生成pfile,修改pfile后用pfile启动数据库,如下所示:

[oracle@leo ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jul 24 20:39:55 2022

 

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

 

Connected to an idle instance.

SQL> create pfile from spfile;

 

File created.

[oracle@leo dbs]$ ll

total 24

-rw-rw---- 1 oracle asmadmin 1544 Jul 24 20:37 hc_orcl.dat

-rw-r--r-- 1 oracle oinstall 2851 May 15  2009 init.ora

-rw-r--r-- 1 oracle asmadmin 1027 Jul 24 20:40 initorcl.ora

-rw-r----- 1 oracle asmadmin   24 Jul 17 00:23 lkORCL

-rw-r----- 1 oracle oinstall 1536 Jul 24 12:24 orapworcl

-rw-r----- 1 oracle asmadmin 3584 Jul 24 20:37 spfileorcl.ora

[oracle@leo dbs]$ vi initorcl.ora

将以下

*.event='28401 trace namecontext forever,level 1'

修改为:

*.event='28401 trace name context forever,level 1'

然后以pfile启动数据库

SQL> startup pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora';

ORACLE instance started.

 

Total System Global Area 3006406656 bytes

Fixed Size                  2257032 bytes

Variable Size             704647032 bytes

Database Buffers         2281701376 bytes

Redo Buffers               17801216 bytes

Database mounted.

Database opened.

SQL> create spfile from pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora';

 

File created.

 

SQL> show parameter pfile

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

spfile                               string

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论