11g asm pfile & spfile
admin
2023-04-21 05:02:52
0

默认数据库安装完成,在ORACLE_HOME/dbs目录下并未发现ASM的pfile和spfile,手动创建pfile和pfile如下:


$ exit
# su - grid
$ srvctl config asm
ASM home: /oracle/app/product/11.2.0
ASM listener: LISTENER
Spfile: +DATADG/asm/asmparameterfile/registry.253.970045839   ##此文件并不存在
ASM diskgroup discovery string: 
$ 

$ cd $ORACLE_HOME/dbs
##目录下并没有ASM的pfile和spfile
$ ls
ab_+ASM.dat  hc_+ASM.dat  init.ora     orapw+ASM
$ 

##手动指定spfile 的路径
$srvctl modify asm -p /oracle/app/product/11.2.0/dbs/spfile+ASM.ora

$ srvctl config asm
ASM home: /oracle/app/product/11.2.0
ASM listener: LISTENER
Spfile: /oracle/app/product/11.2.0/dbs/spfile+ASM.ora
ASM diskgroup discovery string: 
$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 16 08:50:26 2018

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option
##创建spfile
SQL> create spfile from memory;

File created.

SQL> 
##查看spfile 是否生成
SQL> !ls -l
total 56
-rw-rw----    1 grid     oinstall       1676 Mar 07 10:02 ab_+ASM.dat
-rw-rw----    1 grid     oinstall       1544 Mar 16 08:44 hc_+ASM.dat
-rw-r--r--    1 grid     oinstall       2851 May 15 2009  init.ora
-rw-r-----    1 grid     oinstall       1536 Mar 06 09:10 orapw+ASM
-rw-r-----    1 grid     oinstall      11776 Mar 16 08:50 spfile+ASM.ora   ##文件已生成

SQL> 

$ which crsctl
/oracle/app/product/11.2.0/bin/crsctl
$ exit
##重启数据库
# /oracle/app/product/11.2.0/bin/crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'mng'
CRS-2673: Attempting to stop 'ora.mngdb.db' on 'mng'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'mng'
CRS-2677: Stop of 'ora.mngdb.db' on 'mng' succeeded
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'mng'
CRS-2677: Stop of 'ora.DATA.dg' on 'mng' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'mng'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'mng' succeeded
CRS-2677: Stop of 'ora.asm' on 'mng' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'mng'
CRS-2677: Stop of 'ora.cssd' on 'mng' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'mng'
CRS-2677: Stop of 'ora.evmd' on 'mng' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'mng' has completed
CRS-4133: Oracle High Availability Services has been stopped.
#  /oracle/app/product/11.2.0/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.

# su - grid
$ srsqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 16 08:54:14 2018

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option

##发现已经可以检测到spfile
SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /oracle/app/product/11.2.0/dbs
                                                 /spfile+ASM.ora
SQL> 
##创建pfile
SQL> create pfile from spfile;

File created.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option
$ cd $ORACLE_HOME/dbs
$ ls -l
##pfile已经发现
total 72
-rw-rw----    1 grid     oinstall       1676 Mar 16 08:53 ab_+ASM.dat
-rw-rw----    1 grid     oinstall       1544 Mar 16 08:53 hc_+ASM.dat
-rw-r--r--    1 grid     oinstall       5242 Mar 16 08:54 init+ASM.ora
-rw-r--r--    1 grid     oinstall       2851 May 15 2009  init.ora
-rw-r-----    1 grid     oinstall       1536 Mar 06 09:10 orapw+ASM
-rw-r-----    1 grid     oinstall      11776 Mar 16 08:50 spfile+ASM.ora
$ more init+ASM.ora   ##pfile读写
*._aggregation_optimization_settings=0
*._always_anti_join='CHOOSE'
*._always_semi_join='CHOOSE'
*._and_pruning_enabled=TRUE
...略..........................

相关内容

热门资讯

玩家分享攻略“决胜奕福辅助器?... 家人们!今天小编来为大家解答决胜奕福透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪里买很...
【特稿】“人工智能时代”领衔德... “人工智能时代”领衔德国年度十大热词 李函林 德国语言协会近日公布2025年度十大热词,其中热度最高...
AI和算力的升级大幅提高了轮式... 一、从“看见”到“看懂” · 传统方式:依赖预先编程的规则和简单的传感器(如磁条、二维码)进行导航,...
【第一财经】“新青鸟拼三张真的... 【第一财经】“新青鸟拼三张真的有挂吗?”(果然有透视挂)您好,新青鸟拼三张这个游戏其实有挂的,确实是...
【今日要闻】“富豪麻将开挂器?... 网上科普关于“富豪麻将有没有挂”话题很是火热,小编也是针对富豪麻将作*弊开挂的方法以及开挂对应的知识...
最新引进“新圣游炸/金/花有没... 家人们!今天小编来为大家解答新圣游炸/金/花透视挂怎么安装这个问题咨询软件客服徽9752949的挂在...
最新引进“新皇豪牛牛到底有挂吗... 最新引进“新皇豪牛牛到底有挂吗?”(必胜开挂神器)您好,新皇豪牛牛这个游戏其实有挂的,确实是有挂的,...
玩家分享攻略“鱼扑克有挂吗?”... 网上科普关于“鱼扑克有没有挂”话题很是火热,小编也是针对鱼扑克作*弊开挂的方法以及开挂对应的知识点,...
最新引进“微乐陕西挖坑开挂器?... 网上科普关于“微乐陕西挖坑有没有挂”话题很是火热,小编也是针对微乐陕西挖坑作*弊开挂的方法以及开挂对...
终于了解“九酷牛牛到底是不是挂... 终于了解“九酷牛牛到底是不是挂?”(透视曝光猫腻)您好,九酷牛牛这个游戏其实有挂的,确实是有挂的,需...