RAC修改数据库的spfile位置
2024-08-28 09:19:44
- RAC修改spfile位置
- [root@rac1 ~]# su - oracle
- [oracle@rac1 ~]$ sqlplus / as sysdba
- SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 8 22:36:39 2014
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
- Data Mining and Real Application Testing options
- SQL> select status from gv$instance;
- STATUS
- ------------------------
- OPEN
- OPEN
- SQL> show parameter db_name
- NAME TYPE VALUE
- ------------------------------------ ---------------------- ------------------------------
- db_name string orcl
- 1.查看当前的DATABASE spfile 位置
- SQL> show parameter spfile
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- spfile string +ORCLDG/orcl/spfileorcl.ora
- 2.备份 pfile
- [oracle@rac1 ~]$ cd $ORACLE_HOME/dbs
- [oracle@rac1 ~]$ more initorcl1.ora
- spfile='+ORCLDG/orcl/spfileorcl.ora'
- [oracle@rac1 ~]$ cp initorcl1.ora initorcl1.orabak
- 3.重新在指定路径创建 spfile
- [oracle@rac1 ~]$ sqlplus / as sysdba
- SQL> create pfile from spfile;
- SQL> create spfile='+ORCL_FRA' from pfile;
- 4.查看新创建spfile位置
- [oracle@rac1 ~]$ su - grid
- [grid@yyzfrac1 ~]$ asmcmd
- ASMCMD> lsdg
- State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
- MOUNTED NORMAL N 512 4096 1048576 6144 5218 2048 1585 0 Y OCRDG/
- MOUNTED EXTERN N 512 4096 1048576 204800 204704 0 204704 0 N ORCLDG/
- MOUNTED EXTERN N 512 4096 1048576 204800 204704 0 204704 0 N ORCL_FRA/
- ASMCMD> cd ORCL_FRA
- ASMCMD> ls
- ORCL/
- ASMCMD> cd orcl
- ASMCMD> ls
- CONTROLFILE/
- PARAMETERFILE/
- control01.ctl
- control02.ctl
- ASMCMD> cd PARAMETERFILE/
- ASMCMD> ls
- spfile.258.836345535
- 5.指定新的spfile别名
- ASMCMD>mkalias +ORCL_FRA/ORCL/PARAMETERFILE/spfile.258.836345535 +ORCL_FRA/ORCL/spfileorcl.ora
- 6.用srvctl修改新的rac数据库spfile 位置
- [oracle@yyzfrac2 dbs]$ srvctl modify database -d orcl -p +orcl_fra/orcl/spfileorcl.ora
- 7.删除原来的spfile
- [oracle@rac1 ~]$ sqlplus / as sysdba
- SQL>alter diskgroup orcldg drop file '+orcldg/orcl/spfileorcl.ora';
- 8.分别在两个节点中更新initorcl1.ora initorcl2.ora
- 内容为spfile='+orcl_fra/orcl/spfileorcl.ora'
- 9.重新启动数据库
- [oracle@rac1 ~]$srvctl stop database -d orcl
- [oracle@rac1 ~]$srvctl start database -d orcl
- 10.在两节点查看spfile位置
- SQL> set line 3000
- SQL> show parameter spfile
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- spfile string +ORCL_FRA/orcl/spfileorcl.ora
- 转:http://blog.csdn.net/evils798/article/details/18014645
最新文章
- des加密解密——java加密,php解密
- Microsoft SQL Server Compact 4.0&;&;ADO.NET Entity Framework 4.1&;&;MVC3
- boost -- scoped_lock V.S. mutex lock/unlock —— why scoped_lock is recommanded?
- 显示SQL Server分配的全部内存
- [图文详解] Sublime Text在Windows/Ubuntu/Mac OSX中配置使用CTags
- OpenGL ES学习笔记(一)——基本用法、绘制流程与着色器编译
- lambda形式(转)
- 网络请求的null值处理
- C#常用控件缩写
- [Swust OJ 1094]--中位数(巧用set,堆排序)
- paping使用来测试联通&;网站由于tcp协议导致的无法通信问题超时问题
- 洛谷P1856 [USACO5.5]矩形周长Picture
- 【伯乐在线】100个高质量Java开发者博客
- MySQL编码不一致导致查询结果为空
- Docker 快速入门之 Dockerfile
- Springboot定时任务原理及如何动态创建定时任务
- kotlin 语法跟 java 的不同
- JAVA中循环删除list中元素的方法总结(同上篇)
- maven解决omitted for duplicate(依赖冲突)
- LSTM输入层、隐含层及输出层参数理解【转载】
热门文章
- Rreact Native 常见错误总结
- Spring Cloud 与 Spring boot - 转载
- KNN 算法,以及与Kmeans的简单对比
- ssh登录CentOS服务器(Aliyun)
- python下的复杂网络编程包networkx的使用(摘抄)
- 【C#笔札】1 string类型
- day13作业
- request.setAttribute(";username";, username);//一定要保存,OGNL才能获取${username}
- 由PostgreSQL的区域与字符集说起(转)
- linux, windows, mac, ios等平台GCC预编译宏判断