查询oracle rac实例名,ORACLE RAC 修改实例名(实际操作记录分享)

备份全库和spfile

backup as compressed backupset database plus archivelog;

expdp dbank/dbank directory=dmp_dir dumpfile=dbank_2015623.dmp logfile=dbank.log parallel=5 SCHEMAS=DBANK

Create pfile from spfile;

收集数据库信息

$DB_HOME/bin/srvctl config database -d -a

$DB_HOME/bin/srvctl config service -d

创建一个新的pfile

Create pfile from spfile;

关闭所有节点

crsctl stop cluster -all

重命名或编辑实例名称和其他参数使用实例名称。

For example: instance_name, service_names

创建新的实例之一Sid名字节点新密码文件。复制密码文件到其他节点和重命名它与相应的新的SID的名字。

If Data guard is in use, copy the password file from the primary $ORACLE_HOMEs to the standby server and rename it with the corresponding standby SID name.

Startup the database with new pfile file and create a spfile using new pfile.

Remove the old instance name and add a new instance name using srvctl command. ( Follow below for all instances whose names are changed )

$ srvctl remove instance -d -i

$ srvctl add instance -d -i -n

Configure the services back (if necessary)

$ srvctl modify service -d -s

Start the database

$ srvctl start database -d

SQL> select instance_name,status from gv$instance

Check tnsnames.ora, if INSTANCE_NAME is used, rename it accordingly.

For example:

net_service_name=

(DESCRIPTION=

(ADDRESS=...)

(ADDRESS=...)

(CONNECT_DATA=

(SERVICE_NAME=sales.us.example.com)

(INSTANCE_NAME=sales1)))

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值