Oracle-修改DB_NAME-和-DBID
Oracle 修改DB_NAME 和 DBIDOracle 修改DB_NAME 和 DBID
一. 相关概念
关于DB_NAME,INSTANCE_NAME 的定义,参考我的Blog:
DBID,SID,DB_NAME,DB_DOMAIN,INSTANCE_NAME,DB_UNIQUE_NAME,SERVICE_NAMES 及监听参数的说明
doc.guandang.net
关于NID命令的使用,参考Blog:
How to Change the DBID and the DBNAME by using NID [ID 224266.1]
doc.guandang.net
在这篇blog里提到了一下信息:
The NID (New Database ID)is a new utility introduced with Oracle 9.2. The NID utility allows you to change only the DBNAME, or only the DBID or both DBNAME and DBID in the same command.
-- 我们可以使用NID 命令只修改DBNAME, 或者只修改DBID,或者2个都修改。
他们的区别如下:
1. If you change the DBID you must open the database with the RESETLOGS option, which re-creates the online redo logs and resets their sequence to 1.
-- 修改DBID,必须要用resetlogs 打开数据库。 这个在之前的DBID 的介绍里说过,因为DBID 存在与数据文件,redo log 和控制文件。 所以如果修改了DBID, 则必须要使用resetlogs打开。
2. If you change the DBNAME without changing the DBID then this does not require you to open with the RESETLOGS option, so database backups and archived logs are not invalidated. You must change the DB_NAME initialization parameter after a database name change to reflect the new name. Also, you may have to re-create the Oracle password file. If you restore an old backup of the control file (before the name change, then you should use the initialization parameter file and password file from before the database name change.
关于NID 修改DBID 和DBNAME的具体3种用法,参考之前的那片文章。
在这里还有一点要注意, 就是orapwSID 和 initSID.ora 是和INSTANCE_NAME 对应的,如果这个参数修改了,那么这2个文件也需要修改并与INSTANCE_NAME 对应。 修改这个参数也很简单,就是在init 文件里指定一个名称即可,如:*.INSTANCE_NAME=orcl
二. 修改DBID, DBNAME步骤
在这里,只演示一下修改DBID 和 DBNAME的操作。 并不修改INSTANE_NAME.
步骤如下:
1. Backup of the database.
2. Shutdown IMMEDIATE of the database
3. STARTUP MOUNT
4. Open one session and run NID with sysdba privileges
% nid TARGET=SYS/password@test_db DBNAME=test_db2
- the value of DBNAME is the new dbname of the database
5. After DBNEWID successfully changes the DBID,Shutdown IMMEDIATE of the database
6. Set the DB_NAME initialization parameter in the initialization parameter file to the new database name.
7. Create a new password file.
8. Startup of the database with open resetlogs
在修改之前,先看一下数据库的参数:
SQL> select name,dbid,db_unique_name from v$database;
NAME DBID DB_UNIQUE_NAME
--------- ---------
修改oracle instance name和db name_计算机软件及应用_IT/计算机_专业资料。修改 oracle 实例名(sid)和数据库名(db_name) 2010-10-25 12:09:26 分类: ...
修改oracle实例名(sid)和数据库名(db_name)_IT/计算机_专业资料。修改oracle实例名(sid)和数据库名(db_name)实例名(sid)和数据库名 和数据库名(db_name) ...
9I 修改 DBID 和 DBNAME 总结(原创 ) 9I 修改 DBID 和 DBNAME 总结 原创 ...(装数据库时已经装上拉直接用就可以) 参考 http://downloadwest.oracle.com/...
实例名(sid)和数据库名 和数据库名(db_name) 修改 oracle 实例名 和数据库名有时我们需要修改数据库的 sid 和 dbname,除了使用 rman 进行备份恢复之外, 也可以...
DBNEWID工具初体验之db_name和dbid的更改_by小龙_IT/计算机_专业资料。... ORACLE_SID,INSTANCE_NA... 4页 免费 请问如何更改网卡的Inte... 2页 ...
命令中,当你想将数据库名字改为SOFT568X时,应写成dbname=soft568X 1.5执行后...dbid,name from v$database; 2.更改instance_name 2.1 net stop oracle...
oracle DB_NAME、INSTANCE_NAME、ORACLE_SID_IT认证_资格考试/认证_教育专区。...所以更改 DB_NAME 不能仅仅修改 parameter,还需要用 nid 来进行更改,并且更改...
之后程序会对控制文件,数据文件进行修改: Control ...ORACLEORADATATESTUNDOTBS01.DBF - dbid changed, ...1.6 停库再到mount状态下改db_name: sql>...
Oracle的ORACLE_SID、INSTANCE_NAME、DB_NAME、SERVER NAME、TNSNAME的区别_...数据库将 INSTANCE_NAME 参数写入了 参数文件,这就导致了当我们修改参数文件名称...
(2)修改数据库参数文件中的 DB_NAME 参数的值为新的数据库名。 (3)以 NOMOUNT 方式启动实例,修建控制文件(有关创建控制文件的命令语法,请参考 oracle 文档) 4...
热门文档