修改oracle系统参数spfile导致数据库无法启动解决

本文介绍如何解决因错误配置日期格式导致的ORA-01821错误。通过重新创建SPFILE并调整启动参数来恢复正常数据库运行。

错误示范:

SQL> alter system set nls_date_format='yyyy-mm-dd 24hh:mi:ss' scope=spfile;
System altered.
我更改了数据库的日期格式后,重启后,数据库打开不了了。
ORA-01821: date format not recognized,有没有人知道怎么改回去。
大意 hh24 写成了24hh

解决步骤:

1.可能需要重配netca,启动监听到实例。

 

2.startup pfile=/u01/app/oracle/admin/orcl/pfile/init.ora.6272016162851;

 

ORACLE instance started.

Total System Global Area 672256000 bytes
Fixed Size 2216384 bytes
Variable Size 402656832 bytes
Database Buffers 264241152 bytes
Redo Buffers 3141632 bytes
Database mounted.
Database opened.


3.SQL> create spfile from pfile='/u01/app/oracle/admin/orcl/pfile/init.ora.6272016162851';  (重建spfile)

File created.

4.SQL> shutdown normal;


Database closed.
Database dismounted.
ORACLE instance shut down.


 5.SQL> startup;


ORACLE instance started.

Total System Global Area 672256000 bytes
Fixed Size 2216384 bytes
Variable Size 402656832 bytes
Database Buffers 264241152 bytes
Redo Buffers 3141632 bytes
Database mounted.
Database opened.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值