Home >Database >Mysql Tutorial >Oracle 下 spfile和pfile使用笔记

Oracle 下 spfile和pfile使用笔记

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:51:13964browse

查看系统是以pfile还是spfile启动Select isspecified,count(*) from v$spparameter group by isspecified;如果isspecified里有true,表明用

查看系统是以pfile还是spfile启动
Select isspecified,count(*) from v$spparameter group by isspecified;
如果isspecified里有true,表明用spfile进行了指定配置
如果全为false,则表明用pfile启动

使用SPfile的好处
Spfile改正了pfile管理混乱的问题,,在多结点的环境里,pfile会有多个image
启动时候需要跟踪最新的image。这是个烦琐的过程。
用spfile以后,所有参数改变都写到spfile里面(只要定义scope=spfile或both),参数配置有个权威的来源。

查看spfile location
show parameter spfile

从spfile获取pfile
Create pfile='d:pfileSID.ora' from spfile;
Create pfile='d:pfileSID.ora' from spfile='spfile_location';

从pfile获取spfile
Create spfile from pfile='Your_pfile_location'
Create spfile='spfile_location' from pfile='Your_pfile_location'

动态修改参数
alter system set parameter=Value scope=spfile|both|memory

Startup nomount的时候需要读去spfile或pfile,两者共存,spfile优先

强制用pfile启动
SQL>startup pfile='Your_Pfile.ora'
startup spfile='/data/Oracle/product/10.2.0/db_1/dbs/dbs/spfile_mqq.ora' force

通过pfile连接到spfile启动
修改pfile文件

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn