情景:alter system set nls_date_format='yyyy-mm-dd hi24:mi:ss' scope=spfile;
shutdown immediate;
startup [nomount]; --error:日期格式无法识别
解决方法:
进入到相应目录下,使用strings可以看到文件中的相关内容。
c:/>strings spfileorcl.ora 可看到修改的错误参数
(以pfile启动后,再使用pfile创建spfile,再重启)--oracle默认使用spfile连接数据库
1、sqlplus / as sysdba
2、startup pfile=G:\Oracle\admin\test\pfile\init.ora.11202013161111;
3、create spfile from pfile='G:\Oracle\admin\test\pfile\init.ora.11202013161111'; --pfile的路径写全路径
4、shutdown immediate ---startup
重新修改:alter system set nls_date_format='yyyy-mm-dd hh24:mi:ss' scope=spfile;
重启后正常。