nid可以用来修改db_id与db_name,修改之前最好冷备一下 1.关闭监听,正常关闭Oracle [oracle@node3 ~]$ lsnrctl stop LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 19-FEB-2019 09:35:04 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) The command completed successfully SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. 2.重启数据库到mount状态 SQL> startup mount force ORACLE instance started. Total System Global Area 2.1379E+10 bytes Fixed Size 2262656 bytes Variable Size 2.0401E+10 bytes Database Buffers 939524096 bytes Redo Buffers 36073472 bytes Database mounted. 3.nid修改数据库名称 nid target=sys/xxx dbname=BDDEV1 logfile=nid_0219.log 查看日志文件: [oracle@node3 ~]$ more nid_0219.log DBNEWID: Release 11.2.0.4.0 - Production on Tue Feb 19 09:33:15 2019 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Connected to database BDDEV2 (DBID=2430401913) Connected to server version 11.2.0 Control Files in database: /opt/app/oracle/oradata/BDDEV1/control01.ctl /opt/app/oracle/fast_recovery_area/BDDEV1/control02.ctl Changing database ID from 2430401913 to 2391707803 Changing database name from BDDEV2 to BDDEV1 Control File /opt/app/oracle/oradata/BDDEV1/control01.ctl - modified Control File /opt/app/oracle/fast_recovery_area/BDDEV1/control02.ctl - modified Datafile /opt/app/oracle/oradata/BDDEV1/system01.db - dbid changed, wrote new name Datafile /opt/app/oracle/oradata/BDDEV1/sysaux01.db - dbid changed, wrote new name Datafile /opt/app/oracle/oradata/BDDEV1/undotbs01.db - dbid changed, wrote new name Datafile /opt/app/oracle/oradata/BDDEV1/users01.db - dbid changed, wrote new name Datafile /opt/app/oracle/oradata/BDDEV1/tbs_soe.db - dbid changed, wrote new name Datafile /opt/app/oracle/oradata/BDDEV1/temp01.db - dbid changed, wrote new name Control File /opt/app/oracle/oradata/BDDEV1/control01.ctl - dbid changed, wrote new name Control File /opt/app/oracle/fast_recovery_area/BDDEV1/control02.ctl - dbid changed, wrote new name Instance shut down Database name changed to BDDEV1. Modify parameter file and generate a new password file before restarting. Database ID for database BDDEV1 changed to 2391707803. All previous backups and archived redo logs for this database are unusable. Database is not aware of previous backups and archived logs in Recovery Area. Database has been shutdown, open database with RESETLOGS option. Succesfully changed database name and ID. DBNEWID - Completed succesfully. 如果日志文件中有报错信息,比如:NID-00135: There are 1 active threads,则可能是因为没有正常关闭数据库导致的。 4.修改参数文件中db_name后,启动Oracle SQL> startup nomount ORACLE instance started. Total System Global Area 1185853440 bytes Fixed Size 2252664 bytes Variable Size 436207752 bytes Database Buffers 738197504 bytes Redo Buffers 9195520 bytes SQL> alter system set db_name=BDDEV1 scope=spfile; System altered. SQL> shutdown immediate ORA-01507: database not mounted ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 1185853440 bytes Fixed Size 2252664 bytes Variable Size 436207752 bytes Database Buffers 738197504 bytes Redo Buffers 9195520 bytes Database mounted. resetlogs方式打开数据库: SQL> alter database open resetlogs; Database altered. 5.打开监听 lsnrctl start
nid修改数据库名称
来源:这里教程网
时间:2026-03-03 13:00:09
作者:
编辑推荐:
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- Oracle 19C 下载和安装
Oracle 19C 下载和安装
26-03-03 - Linux 安装 Oracle 11g——手工建库(RAC)
Linux 安装 Oracle 11g——手工建库(RAC)
26-03-03 - ORACLE RMAN备份--差异增量与累积增量的策略实例图
ORACLE RMAN备份--差异增量与累积增量的策略实例图
26-03-03 - 使用正则表达式对数字字符串字段排序
使用正则表达式对数字字符串字段排序
26-03-03 - [20190226]删除tab$记录的恢复6.txt
[20190226]删除tab$记录的恢复6.txt
26-03-03 - 为何Oracle Database 12R2输入正确的用户名密码口令验证依然不能通过?
- Oracle Data Guard 部署调试试验【一主一备/单机】
Oracle Data Guard 部署调试试验【一主一备/单机】
26-03-03 - Oracle的SCN显示问题
Oracle的SCN显示问题
26-03-03 - WRH$_ACTIVE_SESSION_HISTORY未自动清理导致SYSAUX空间过度增长的处理方法
- Debian监控业务指标配置(手把手教你用Prometheus+Grafana搭建Debian系统性能监控平台)
