Oracle 12中没有spfile,oracle数据库12c的cluster中,dbs下指定spfile不生效

在11g的cluster中,我们往往用dbs下的初始化文件(pfile),来指定asm中实际存在的spfile

[oracle@ol6-112-rac1 dbs]$ cd /u01/app/oracle/product/11.2.0.4/db_1/dbs

[oracle@ol6-112-rac1 dbs]$ ls

hc_acfsdb.dat  hc_cdbrac_1.dat  hc_cdbrac_2.dat  initcdbrac_1.ora  initcdbrac_1.ora.orig  init.ora  orapwacfsdb  spfileacfsdb.ora

[oracle@ol6-121-rac1 dbs]$ cat initcdbrac_1.ora

SPFILE='+DATA/cdbrac/spfilecdbrac.ora'

[oracle@ol6-112-rac1 dbs]$

但是在12c中,如果我去修改dbs下的pfile指定spfile,这个设置就不会生效了,如我将文件指定到/tmp目录下,你会发现启动之后,它还是用到了asm上的spfile:

[oracle@ol6-121-rac1 dbs]$ cat initcdbrac_1.ora

SPFILE='/tmp/pfile.ora'

[oracle@ol6-121-rac1 dbs]$

[oracle@ol6-121-rac1 dbs]$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.1.0.1.0 Production on Thu Jun 23 11:24:12 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Advanced Analytics and Real Application Testing options

SQL> shutdown abort

ORACLE instance shut down.

SQL> startup nomount

ORACLE instance started.

Total System Global Area 1219260416 bytes

Fixed Size            2287768 bytes

Variable Size          838862696 bytes

Database Buffers      369098752 bytes

Redo Buffers            9011200 bytes

SQL> show parameter spfile

NAME                     TYPE     VALUE

------------------------------------ ----------- ------------------------------

spfile                     string     +DATA/cdbrac/spfilecdbrac.ora

SQL> exit

这是因为在12c的cluster中,spfile的信息已经固定在ocr中,不会去考虑dbs目录下的配置。

[oracle@ol6-121-rac1 dbs]$ srvctl config database -d cdbrac |grep spfile

Spfile: +DATA/cdbrac/spfilecdbrac.ora

[oracle@ol6-121-rac1 dbs]$

如果要修改spfile的路径,就必须修改ocr中的信息了:

[oracle@ol6-121-rac1 dbs]$ srvctl modify database -d cdbrac -spfile '/tmp/pfile.ora'

[oracle@ol6-121-rac1 dbs]$

[oracle@ol6-121-rac1 dbs]$

[oracle@ol6-121-rac1 dbs]$ sqlplus "/ as sysdba"

SQL*Plus: Release 12.1.0.1.0 Production on Thu Jun 23 11:27:48 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Advanced Analytics and Real Application Testing options

SQL> shutdown abort

ORACLE instance shut down.

SQL> startup nomount

ORACLE instance started.

Total System Global Area 1219260416 bytes

Fixed Size            2287768 bytes

Variable Size          838862696 bytes

Database Buffers      369098752 bytes

Redo Buffers            9011200 bytes

SQL>

SQL> show parameter spfile

NAME                     TYPE     VALUE

------------------------------------ ----------- ------------------------------

spfile                     string     /tmp/pfile.ora

SQL> shutdown abort

ORACLE instance shut down.

SQL> exit

oracle 12c舍弃dbs下用init.ora中写spfile的路径,我估计是因为12c中有flex cluster。也就是说,instance1 可以跑到节点2主机,那么在节点2主机的dbs目录下,如果按照原来的模式,是有initsid2.ora这个文件,就调不起来instance 1。所以干脆就废弃使用dbs目录下的init文件了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值