对这些东西都没什么整体概念,以下是东抄西抄的。
1,Select isspecified,count(*) from v$spparameter group by isspecified;
如果isspecified里有true,表明用spfile进行了指定配置
如果全为false,则表明用pfile启动
2,spfile是二进制的
3,http://snakeskin.javaeye.com/blog/155136
db_buffer_size=db_block_buffers*db_block_size, db_block_size为数据库默认值, 不要修改
pfile不要有SGA_TARGET这个参数, 也不要有db_cache_size这个参数, SGA_MAX_SIZE也不需要
1)创建pfile
SQL>create pfile from spfile
这样就在d:/oracle/product/10.1.0/db_1/database目录下面多1个文件INITorcl.ORA
或者copy d:/oracle/product/10.1.0/admin/orcl/pfile/init.ora.XXXXXXXX到上述目录, 名字改成INITorcl.ORA
init.ora.XXXX也是个pfile文件, 不妨试着用这个文件启动你的数据库
SQL>startup pfile='d:/oracle/product/10.1.0/admin/orcl/pfile/init.ora.XXXXXXXX'
特别是你改动参数导致数据库无法启动的情况下, 用这个文件恢复你的spfile将非常有用
SQL>create spfile from pfile='d:/oracle/product/10.1.0/admin/orcl/pfile/init.ora.XXXXXXXX'
2)修改pfile的内容
修改后主要内容为
sga_target=1700000000(1.7G左右)
lock_sga=true
pre_aggregate_tagert=250000000(250M左右)
workarea_size_policy=auto
pre_page_sga=true
sga_max_size=1720000000(1.72G左右)
3)根据pfile启动数据库
SQL>startup pfile='d:/oracle/product/10.1.0/db_1/database/INITorcl.ORA'
如果不能启动, 可能是某些参数的原因, 那么就修改INIToracl.ORA的配置文件, 直到能正常启动为止.
4,http://www.orafaq.com/node/5
What is the difference between a PFILE and SPFILE:
A PFILE is a static, client-side text file that must be updated with
a standard text editor like "notepad" or "vi". This file normally
reside on the server, however, you need a local copy if you want to
start Oracle from a remote machine. DBA's commonly refer to this file
as the INIT.ORA file.
An SPFILE (Server Parameter File), on the other hand, is a
persistent server-side binary file that can only be modified with the
"ALTER SYSTEM SET" command. This means you no longer need a local copy
of the pfile to start the database from a remote machine. Editing an
SPFILE will corrupt it, and you will not be able to start your database
anymore.
5,怎样查看一个参数修改是否需要重启数据库
select name,value ,ISSYS_MODIFIABLE from v$parameter
如果ISSYS_MODIFIABLE 返回的是false,说明该参数无法用alter system语句动态修改,需要重启数据库
6,用命令修改参数
alter system set java_pool_size=2 scope=spfile ;
scope=spfile 的修改是需要重启数据库
scope=both 实时生效和写入spfile,不需要重启数据库
scope=memory 实时生效,但不写spfile,这样如果重启数据库,则恢复原来的参数值
每个参数能修改的scope是不一样的,可以查询v$parameter了解参数能被修改的类型
见http://bbs.chinaunix.net/archiver/?tid-974075.html
10,
http://www.cnblogs.com/jacktu/archive/2008/02/27/1083232.html
http://topic.csdn.net/u/20090227/16/fb3d88ed-f2ca-44ed-8097-dc363054515c.html