oracle file参数,oracle的参数以及pfile和spfile
對(duì)這些東西都沒(méi)什么整體概念,以下是東抄西抄的。
1,Select isspecified,count(*) from v$spparameter group by isspecified;
如果isspecified里有true,表明用spfile進(jìn)行了指定配置
如果全為false,則表明用pfile啟動(dòng)2,spfile是二進(jìn)制的
3,http://snakeskin.javaeye.com/blog/155136
db_buffer_size=db_block_buffers*db_block_size, db_block_size為數(shù)據(jù)庫(kù)默認(rèn)值, 不要修改
pfile不要有SGA_TARGET這個(gè)參數(shù), 也不要有db_cache_size這個(gè)參數(shù), SGA_MAX_SIZE也不需要
1)創(chuàng)建pfileSQL>create pfile from spfile
這樣就在d:/oracle/product/10.1.0/db_1/database目錄下面多1個(gè)文件INITorcl.ORA
或者copy d:/oracle/product/10.1.0/admin/orcl/pfile/init.ora.XXXXXXXX到上述目錄, 名字改成INITorcl.ORA
init.ora.XXXX也是個(gè)pfile文件, 不妨試著用這個(gè)文件啟動(dòng)你的數(shù)據(jù)庫(kù)
SQL>startup pfile='d:/oracle/product/10.1.0/admin/orcl/pfile/init.ora.XXXXXXXX'
特別是你改動(dòng)參數(shù)導(dǎo)致數(shù)據(jù)庫(kù)無(wú)法啟動(dòng)的情況下, 用這個(gè)文件恢復(fù)你的spfile將非常有用
SQL>create spfile from pfile='d:/oracle/product/10.1.0/admin/orcl/pfile/init.ora.XXXXXXXX'
2)修改pfile的內(nèi)容修改后主要內(nèi)容為
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)根據(jù)pfile啟動(dòng)數(shù)據(jù)庫(kù)SQL>startup pfile='d:/oracle/product/10.1.0/db_1/database/INITorcl.ORA'
如果不能啟動(dòng), 可能是某些參數(shù)的原因, 那么就修改INIToracl.ORA的配置文件, 直到能正常啟動(dòng)為止.
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,怎樣查看一個(gè)參數(shù)修改是否需要重啟數(shù)據(jù)庫(kù)
select name,value ,ISSYS_MODIFIABLE from v$parameter
如果ISSYS_MODIFIABLE 返回的是false,說(shuō)明該參數(shù)無(wú)法用alter system語(yǔ)句動(dòng)態(tài)修改,需要重啟數(shù)據(jù)庫(kù)
6,用命令修改參數(shù)
alter system set java_pool_size=2 scope=spfile ;
scope=spfile 的修改是需要重啟數(shù)據(jù)庫(kù)
scope=both 實(shí)時(shí)生效和寫(xiě)入spfile,不需要重啟數(shù)據(jù)庫(kù)
scope=memory 實(shí)時(shí)生效,但不寫(xiě)spfile,這樣如果重啟數(shù)據(jù)庫(kù),則恢復(fù)原來(lái)的參數(shù)值
每個(gè)參數(shù)能修改的scope是不一樣的,可以查詢(xún)v$parameter了解參數(shù)能被修改的類(lèi)型
見(jiàn)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
總結(jié)
以上是生活随笔為你收集整理的oracle file参数,oracle的参数以及pfile和spfile的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Git学习笔记;Git bash 库同步
- 下一篇: Python学习笔记:Day 3编写OR