1. RAC修改spfile位置
  2. [root@rac1 ~]# su - oracle
  3. [oracle@rac1 ~]$ sqlplus  / as sysdba
  4. SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 8 22:36:39 2014
  5. Copyright (c) 1982, 2011, Oracle.  All rights reserved.
  6. Connected to:
  7. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
  8. With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
  9. Data Mining and Real Application Testing options
  10. SQL> select status from gv$instance;
  11. STATUS
  12. ------------------------
  13. OPEN
  14. OPEN
  15. SQL> show parameter db_name
  16. NAME                                 TYPE                   VALUE
  17. ------------------------------------ ---------------------- ------------------------------
  18. db_name                              string                  orcl
  19. 1.查看当前的DATABASE spfile 位置
  20. SQL> show parameter spfile
  21. NAME                                 TYPE        VALUE
  22. ------------------------------------ ----------- ------------------------------
  23. spfile                               string      +ORCLDG/orcl/spfileorcl.ora
  24. 2.备份 pfile
  25. [oracle@rac1 ~]$ cd $ORACLE_HOME/dbs
  26. [oracle@rac1 ~]$ more initorcl1.ora
  27. spfile='+ORCLDG/orcl/spfileorcl.ora'
  28. [oracle@rac1 ~]$ cp initorcl1.ora  initorcl1.orabak
  29. 3.重新在指定路径创建 spfile
  30. [oracle@rac1 ~]$ sqlplus / as sysdba
  31. SQL> create  pfile from spfile;
  32. SQL> create spfile='+ORCL_FRA' from pfile;
  33. 4.查看新创建spfile位置
  34. [oracle@rac1 ~]$ su - grid
  35. [grid@yyzfrac1 ~]$ asmcmd
  36. ASMCMD> lsdg
  37. State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
  38. MOUNTED  NORMAL  N         512   4096  1048576      6144     5218             2048            1585              0             Y  OCRDG/
  39. MOUNTED  EXTERN  N         512   4096  1048576    204800   204704                0          204704              0             N  ORCLDG/
  40. MOUNTED  EXTERN  N         512   4096  1048576    204800   204704                0          204704              0             N  ORCL_FRA/
  41. ASMCMD> cd ORCL_FRA
  42. ASMCMD> ls
  43. ORCL/
  44. ASMCMD> cd orcl
  45. ASMCMD> ls
  46. CONTROLFILE/
  47. PARAMETERFILE/
  48. control01.ctl
  49. control02.ctl
  50. ASMCMD> cd PARAMETERFILE/
  51. ASMCMD> ls
  52. spfile.258.836345535
  53. 5.指定新的spfile别名
  54. ASMCMD>mkalias +ORCL_FRA/ORCL/PARAMETERFILE/spfile.258.836345535   +ORCL_FRA/ORCL/spfileorcl.ora
  55. 6.用srvctl修改新的rac数据库spfile 位置
  56. [oracle@yyzfrac2 dbs]$ srvctl  modify database -d orcl -p +orcl_fra/orcl/spfileorcl.ora
  57. 7.删除原来的spfile
  58. [oracle@rac1 ~]$ sqlplus / as sysdba
  59. SQL>alter diskgroup orcldg drop file '+orcldg/orcl/spfileorcl.ora';
  60. 8.分别在两个节点中更新initorcl1.ora initorcl2.ora
  61. 内容为spfile='+orcl_fra/orcl/spfileorcl.ora'
  62. 9.重新启动数据库
  63. [oracle@rac1 ~]$srvctl stop database -d orcl
  64. [oracle@rac1 ~]$srvctl start database -d orcl
  65. 10.在两节点查看spfile位置
  66. SQL> set line 3000
  67. SQL> show parameter spfile
  68. NAME                                 TYPE        VALUE
  69. ------------------------------------ ----------- ------------------------------
  70. spfile                               string      +ORCL_FRA/orcl/spfileorcl.ora
  71. 转:http://blog.csdn.net/evils798/article/details/18014645

最新文章

  1. des加密解密——java加密,php解密
  2. Microsoft SQL Server Compact 4.0&&ADO.NET Entity Framework 4.1&&MVC3
  3. boost -- scoped_lock V.S. mutex lock/unlock —— why scoped_lock is recommanded?
  4. 显示SQL Server分配的全部内存
  5. [图文详解] Sublime Text在Windows/Ubuntu/Mac OSX中配置使用CTags
  6. OpenGL ES学习笔记(一)——基本用法、绘制流程与着色器编译
  7. lambda形式(转)
  8. 网络请求的null值处理
  9. C#常用控件缩写
  10. [Swust OJ 1094]--中位数(巧用set,堆排序)
  11. paping使用来测试联通&网站由于tcp协议导致的无法通信问题超时问题
  12. 洛谷P1856 [USACO5.5]矩形周长Picture
  13. 【伯乐在线】100个高质量Java开发者博客
  14. MySQL编码不一致导致查询结果为空
  15. Docker 快速入门之 Dockerfile
  16. Springboot定时任务原理及如何动态创建定时任务
  17. kotlin 语法跟 java 的不同
  18. JAVA中循环删除list中元素的方法总结(同上篇)
  19. maven解决omitted for duplicate(依赖冲突)
  20. LSTM输入层、隐含层及输出层参数理解【转载】

热门文章

  1. Rreact Native 常见错误总结
  2. Spring Cloud 与 Spring boot - 转载
  3. KNN 算法,以及与Kmeans的简单对比
  4. ssh登录CentOS服务器(Aliyun)
  5. python下的复杂网络编程包networkx的使用(摘抄)
  6. 【C#笔札】1 string类型
  7. day13作业
  8. request.setAttribute("username", username);//一定要保存,OGNL才能获取${username}
  9. 由PostgreSQL的区域与字符集说起(转)
  10. linux, windows, mac, ios等平台GCC预编译宏判断