在Oracle 11g 以前,我们可以从spfile来创建pfile,或者利用pfile来创建spfile。 在Oracle 11g中,在管理spfile方面得到增强,可以从memory来创建pfile和spfile。
语法如下:
CREATE PFILE [= 'pfile_name' ]
FROM { { SPFILE [= 'spfile_name'] } | MEMORY } ;
CREATE SPFILE [= 'spfile_name' ]
FROM { { PFILE [= 'pfile_name' ] } | MEMORY } ;
示例:
[15:43 oracle@dave /u01/backup]$ora si
SQL*Plus: Release 11.2.0.3.0 Production onFri Oct 12 15:43:22 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise EditionRelease 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Miningand Real Application Testing options
SQL> create pfile from memory;
File created.
SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-32002: cannot createSPFILE already being used by the instance
--对于open 状态的实例,不能从memory创建spfile。
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 730714112 bytes
Fixed Size 2231952 bytes
Variable Size 285213040 bytes
Database Buffers 419430400 bytes
Redo Buffers 23838720 bytes
Database mounted.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
MOUNTED
SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-32002: cannot createSPFILE already being used by the instance
--mount 状态也不可以使用
SQL> startup nomount force;
ORACLE instance started.
Total System Global Area 730714112 bytes
Fixed Size 2231952 bytes
Variable Size 285213040 bytes
Database Buffers 419430400 bytes
Redo Buffers 23838720 bytes
SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-32002: cannot createSPFILE already being used by the instance
--nomount 状态也不可以
SQL> shutdown abort;
ORACLE instance shut down.
SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-00922: missing or invalid option
--数据库关闭后,语法不可以用。
我们用pfile启动数据库,在来创建spfile:
SQL> startuppfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initdave.ora'
ORACLE instance started.
Total System Global Area 730714112 bytes
Fixed Size 2231952 bytes
Variable Size 285213040 bytes
Database Buffers 419430400 bytes
Redo Buffers 23838720 bytes
Database mounted.
Database opened.
SQL> create spfile from memory;
File created.
--这次创建成功。
注意:
(1)如果是RAC 环境,那么生成的脚本会包含所有节点的参数。
(2)执行这个命令需要使用sysdba或sysoper角色来执行。
在Oracle 11g 以前,我们可以从spfile来创建pfile,或者利用pfile来创建spfile。 在Oracle 11g中,在管理spfile方面得到增强,可以从memory来创建pfile和spfile。
语法如下:
CREATE PFILE [= 'pfile_name' ]
FROM { { SPFILE [= 'spfile_name'] } | MEMORY } ;
CREATE SPFILE [= 'spfile_name' ]
FROM { { PFILE [= 'pfile_name' ] } | MEMORY } ;
示例:
[15:43 oracle@dave /u01/backup]$ora si
SQL*Plus: Release 11.2.0.3.0 Production onFri Oct 12 15:43:22 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise EditionRelease 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Miningand Real Application Testing options
SQL> create pfile from memory;
File created.
SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-32002: cannot createSPFILE already being used by the instance
--对于open 状态的实例,不能从memory创建spfile。
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 730714112 bytes
Fixed Size 2231952 bytes
Variable Size 285213040 bytes
Database Buffers 419430400 bytes
Redo Buffers 23838720 bytes
Database mounted.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
MOUNTED
SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-32002: cannot createSPFILE already being used by the instance
--mount 状态也不可以使用
SQL> startup nomount force;
ORACLE instance started.
Total System Global Area 730714112 bytes
Fixed Size 2231952 bytes
Variable Size 285213040 bytes
Database Buffers 419430400 bytes
Redo Buffers 23838720 bytes
SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-32002: cannot createSPFILE already being used by the instance
--nomount 状态也不可以
SQL> shutdown abort;
ORACLE instance shut down.
SQL> create spfile from memory;
create spfile from memory
*
ERROR at line 1:
ORA-00922: missing or invalid option
--数据库关闭后,语法不可以用。
我们用pfile启动数据库,在来创建spfile:
SQL> startuppfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initdave.ora'
ORACLE instance started.
Total System Global Area 730714112 bytes
Fixed Size 2231952 bytes
Variable Size 285213040 bytes
Database Buffers 419430400 bytes
Redo Buffers 23838720 bytes
Database mounted.
Database opened.
SQL> create spfile from memory;
File created.
--这次创建成功。
注意:
(1)如果是RAC 环境,那么生成的脚本会包含所有节点的参数。
(2)执行这个命令需要使用sysdba或sysoper角色来执行。
分享到:
相关推荐
在oracle10g上创建spfile.doc 当spfile丢失时的解决方案
Oracle培训资料030710g11g参数SPFILE.ppt
ORA-32001:write to spfile requested but no spfile is in use请求写入spfile,但没有使用spfile的解决方法 在输入以下语句中报了这样的错误: SQL>alter system set control_files=’/u01/app/oracle/oradata/prod/...
BLOG_【故障处理】Oracle_lhr_ORA-01565 告警日志报“ORA-01565 Unable To open Spfile”.pdf
原创文档详细说明ORACLE10G参数文件PFILE与SPFILE, 超级详细
创建spfile并修改数据库连接数
15 管理用户 目标 15-2 用户和安全 15-3 数据库方案 15-4 检查创建用户 15-5 创建新用户:数据库验证 15-6 创建新用户:操作系统验证 15-8 改变用户的表空间限额 15-9 删除用户 15-10 获取用户的信息 15-11 小结 15-...
SPDocumentLibrary and SPFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 SPGroup, SPUser, and Other Security Types . 69 SPControl and SPContext . . . . . . . . . . . . . ....
針對oracle 的參數檔spfile&pfile的分析討論
【故障处理】修改SPFILE无权限.pdf【故障处理】修改SPFILE无权限.pdf
RAC中创建spfile的各种方法,有截图,说明,对新人帮助很大
oracle spfile/pfile详解; 深入spfile 及 pfile的区别
SPFILE参数错误
我使用的Oracle11g,当我敲下如下一段命令后,就让我傻眼了。。 alter system set sga_max_size=960M scope=spfile; shutdown immediate startup 此时的startup报错了,错误为: SQL> startup ORA-00844: ...
Oracle-01-01-06 7 1.1.7 SHG-Oracle-01-01-07 8 1.1.8 SHG-Oracle-01-01-08 10 1.2 口令 11 1.2.1 SHG-Oracle-01-02-01 11 1.2.2 SHG-Oracle-01-02-02 12 1.2.3 SHG-Oracle-01-02-03 14 1.2.4 SHG-Oracle-01-02-04 ...
11gR2迁移OCR votingFile Spfile,里面有详细的步骤,大家可以看一下
Oracle 9i SPFILE的使用
Oracle9i引入了具有延续性的初始化参数文件SPFILE(Server Parameter FILE),所谓延续性是指对初始化参数的在线修改可以直接作用到参数文件中,这样所有被修改的参数将永久生效。本文将为大家介绍Oracle中SPFILE...
NULL 博文链接:https://hidefromall.iteye.com/blog/371031