Welcome 微信登录

首页 / 数据库 / MySQL / Oracle 11g 新特性 -- 管理 SPFILE 说明

在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 ProductionWith 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 bytesFixed Size                  2231952 bytesVariable Size           285213040 bytesDatabase Buffers          419430400 bytesRedo Buffers             23838720 bytesDatabase 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 bytesFixed Size                  2231952 bytesVariable Size           285213040 bytesDatabase Buffers          419430400 bytesRedo Buffers             23838720 bytesSQL> 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 bytesFixed Size                  2231952 bytesVariable Size           285213040 bytesDatabase Buffers          419430400 bytesRedo Buffers             23838720 bytesDatabase mounted.Database opened.SQL> create spfile from memory; File created.--这次创建成功。 注意:    (1)如果是RAC 环境,那么生成的脚本会包含所有节点的参数。   (2)执行这个命令需要使用sysdba或sysoper角色来执行。Oracle 11g 新特性 -- Invisible Indexes(不可见的索引) 说明Linux下安装多个DB2副本相关资讯      Oracle 11g  Oracle 11g 新特性 
  • Oracle 11g导入到10g引起的错误  (11/16/2015 10:55:27)
  • Oracle 11g 导库导不出空表问题  (08/19/2015 19:55:58)
  • Oracle 11g统计信息收集--多列统计  (07/24/2015 10:32:39)
  • Oracle 11gClone安装方法  (08/24/2015 20:25:41)
  • Oracle 11g中和SQL TUNING相关的新  (08/12/2015 11:22:52)
  • Oracle 11g数据泵详解  (07/08/2015 08:29:51)
本文评论 查看全部评论 (0)
表情: 姓名: 字数