在rac中修改db_name的步骤与单实例步骤差不多,主要是要修改一些与cluster相关的参数。
停止所有实例,然后把其中一个实例启动到mount状态下:
SQL> startup mount
ORACLE instance started.
Total System Global Area 1476395008 bytes
Fixed Size 2030200 bytes
Variable Size 268436872 bytes
Database Buffers 1191182336 bytes
Redo Buffers 14745600 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
尝试用NID修改数据库名称:
bash-3.00$ nid target=sys/testrac dbname=pretrade logfile=~/nid1.log
查看日志:
bash-3.00$ more nid1.log
DBNEWID: Release 10.2.0.3.0 - Production on 星期四 9月 27 23:00:44 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to database TRADEDB (DBID=4181457554)
NID-00120: Database should be mounted exclusively
Change of database name failed during validation - database is intact.
DBNEWID - Completed with validation errors.
发现有报错,这个因为当前数据库是rac,需要修改cluster_database=false,这也就是用nid修改rac数据库名称与修改单实例数据库名称的一个主要区别。
接着修改参数继续尝试:
bash-3.00$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.3.0 - Production on 星期四 9月 27 23:01:09 2007
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> alter system set cluster_database=false scope=spfile.
System altered.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1476395008 bytes
Fixed Size 2030200 bytes
相关文章
ORACLE11GORA-600[kkdcacrptn_kxcp]错误解决方法
Oralce开发技巧总结
10grac重启服务器的方法
在RAC中用NID修改数据库名称
Oracle索引原理方法学习
oracle11G表空间加密方法学习
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛