oracle11g rac 修改spfile

server/2024/9/24 0:15:08/

今天一套环境,发现2个节点的spfile不一致,正好有停机时间就修改spfile配置
SYS@orcl1>  show parameter spfile

NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
spfile                     string     /u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl1.ora
SYS@orcl1>  create pfile='/tmp/pfileorcl1.ora' from spfile;

File created.

SYS@orcl1> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
YS@orcl1> startup pfile='/tmp/pfileorcl1.ora'
ORACLE instance started.

Total System Global Area 3.2068E+10 bytes
Fixed Size            2269072 bytes
Variable Size         5301600368 bytes
Database Buffers     2.6642E+10 bytes
Redo Buffers          122351616 bytes
Database mounted.
Database opened.
SYS@orcl1> create spfile='+DATA' from pfile='/tmp/pfileorcl1.ora';
SYS@orcl1> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@orcl1> startup;    --无法直接启动
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/initorcl1.ora'
SYS@orcl1>

通过asmcmd -p登录环境查看spfile的目录:
+DATA/ORCL/PARAMETERFILE/spfile.430.1170258117
首先把/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl1.ora文件重新命名。用oracle用户修改配置
orcl1:/home/oracle@db1> srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances: orcl1,orcl2
Disk Groups: DATADG,FRA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
orcl1:/home/oracle@db1> srvctl modify database -d orcl -p '+DATA/ORCL/PARAMETERFILE/spfile.430.1170258117'
orcl1:/home/oracle@db1> srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/ORCL/PARAMETERFILE/spfile.430.1170258117
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances: orcl1,orcl2
Disk Groups: DATADG,FRA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
orcl1:/home/oracle@db1> srvctl start instance -d orcl -i orcl1
orcl1:/home/oracle@db1> export ORACLE_SID=orcl1
orcl1:/home/oracle@db1> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed May 29 15:46:09 2024

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 Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SYS@orcl1> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@orcl1> startup;   
ORACLE instance started.

Total System Global Area 3.2068E+10 bytes
Fixed Size            2269072 bytes
Variable Size         5301600368 bytes
Database Buffers     2.6642E+10 bytes
Redo Buffers          122351616 bytes
Database mounted.
Database opened.
SYS@orcl1>

节点二直接把/u01/app/oracle/product/11.2.0/db_1/dbs/spfileorcl2.ora文件重新命名即可启动数据库


http://www.ppmy.cn/server/45122.html

相关文章

基于CNN卷积神经网络的金融数据预测matlab仿真,对比BP,RBF,LSTM

目录 1.程序功能描述 2.测试软件版本以及运行结果展示 3.核心程序 4.本算法原理 4.1 反向传播网络(BP,多层感知器MLP) 4.2 径向基函数网络(RBF) 4.3 卷积神经网络(CNN) 4.4 长短期记忆网…

RFM模型-分析母婴类产品

1,场景描述 假设我们是某电商平台的数据分析师,负责分析母婴产品线的用户数据。母婴产品的购买行为具有一定的周期性和生命周期特征,如用户在不同怀孕阶段的需求不同,以及宝宝出生后的不同成长阶段需要不同的产品。 2&#xff0…

golang判断字符串是否base64编码的字符串 可准确判断是或否

非常简单的判断一个字符串是否base64编码的方法,就是使用正则base64自身的解码转码来判断,如果失败则一定不是base64编码,否则是base64编码: // 使用正则自身的解码转码来判断字符串是否是base64,可以判断一定不是。 f…

React hooks - useLayoutEffect

useLayoutEffect 用法区别 用法 useLayoutEffect 和 useEffect 的使用方式很相似: useLayoutEffect 接收一个函数和一个依赖项数组作为参数只有在数组中的依赖项发生改变时才会再次执行副作用函数useLayoutEffect 也可以返回一个清理函数 useEffect(()>{retur…

React 使用JSX或者TSX渲染页面

02 Rendering with JSX Your first JSX content In this section, we’ll implement the obligatory " Hello, World " JSX application. At this point, we’re just dipping our toes in the water; more in-depth examples will follow. We’ll also discuss wh…

备受推崇的公司文件加密文件推荐榜单

迄今为止,加密依然是最有效的用于保护数据、通讯安全的手段之一 在数字化时代,文件加密软件成为了保护个人和企业数据安全的重要工具。随着技术的不断进步,市场上涌现出了众多优秀的文件加密软件。 以下十款文件加密软件因其出色的性能、易…

电脑同时配置两个版本mysql数据库常见问题

1.配置时,要把bin中的mysql.exe和mysqld.exe 改个名字,不然两个版本会重复,当然,在初始化数据库的时候,如果时57版本的,就用mysql57(已经改名的)和mysqld57 代替 mysql 和 mysqld 例如 mysql -u root -p …

Metasploit渗透测试框架

Metasploit简介 Metasploit 是The Metasploit framework的简称,框架由多个module组成 是一款开源安全漏洞利用和测试工具,集成了各种平台上常见的漏洞,并持续保持更新。 metasploit涵盖了渗透测试中全过程,你可以在这个框架下利用现有的Pa…