通过 alter system 方式修改Oracle9i数据库的参数时,引起的一个错误,命令如下:
SQL> startup nomount
ORACLE 例程已经启动。
ORACLE 例程已经启动。
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
SQL> alter system set sga_max_size=500M scope=spfile;
系统已更改。
SQL> alter system set db_cache_size=300M scope=spfile;
系统已更改。
SQL> alter system set pga_aggregate_target=200 scope=spfile;
系统已更改。
SQL> shutdown immediate
ORACLE 例程已经关闭。
ORACLE 例程已经关闭。
SQL> startup nomount
ORA-00093: pga_aggregate_target must be between 10M and 4096G-1
ORA-00093: pga_aggregate_target must be between 10M and 4096G-1
这时,我才发现,前面修改的 pga_aggregate_target=200 ,少了一个“M”。
没有办法,创建pfile到指定位置,例如“c:\oracle\dbs\initorcl.ora”。
SQL>create pfile='c:\oracle\dbs\initorcl.ora' from spfile;
然后文本编辑器打开initorcl.ora文件,找到 pga_aggregate_target ,修改为正确数值,然后用该pfile启动数据库。
SQL>startup nomount pfile='c:\oracle\dbs\initorcl.ora'
打算修改其他参数,结果报另一个错误
SQL> alter system set shared_pool_size=100M scope=spfile;
alter system set shared_pool_size=100M scope=spfile
*
第 1 行出现错误:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup
alter system set shared_pool_size=100M scope=spfile
*
第 1 行出现错误:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup
晕,自己还没切换到spfile启动,马上新建spfile。
SQL>create spfile from pfile='c:\oracle\dbs\initorcl.ora';
SQL> shutdown immediate
ORACLE 例程已经关闭。
SQL> startup
ORACLE 例程已经启动。
Total System Global Area 529604068 bytes
Fixed Size 454116 bytes
Variable Size 209715200 bytes
Database Buffers 318767104 bytes
Redo Buffers 667648 bytes
数据库装载完毕。
数据库已经打开。
SQL>
Fixed Size 454116 bytes
Variable Size 209715200 bytes
Database Buffers 318767104 bytes
Redo Buffers 667648 bytes
数据库装载完毕。
数据库已经打开。
SQL>
参数修改完成,数据库恢复正常。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9399028/viewspace-695082/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9399028/viewspace-695082/