Oracle修改db_name方法
admin
2023-05-13 21:22:20
0

------- 修改数据库db_name的方法 

SQL>  startup mount 

ORACLE instance started.


Total System Global Area  413372416 bytes

Fixed Size    2213896 bytes

Variable Size  335546360 bytes

Database Buffers   71303168 bytes

Redo Buffers    4308992 bytes

Database mounted.

SQL> quit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining,

Oracle Database Vault and Real Application Testing options

[oracle@OEL6 dbs]$ nid target=sys/yuanlei@orcl2 dbname=orcl


DBNEWID: Release 11.2.0.1.0 - Production on Tue Aug 19 22:22:39 2014


Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


Connected to database ORCL2 (DBID=836865814)


Connected to server version 11.2.0


Control Files in database:

    /u01/app/oracle/oradata/orcl2/control01.ctl

    /u01/app/oracle/oradata/orcl2/control02.ctl


Change database ID and database name ORCL2 to ORCL? (Y/[N]) => y


Proceeding with operation

Changing database ID from 836865814 to 1383851439

Changing database name from ORCL2 to ORCL

    Control File /u01/app/oracle/oradata/orcl2/control01.ctl - modified

    Control File /u01/app/oracle/oradata/orcl2/control02.ctl - modified

    Datafile /u01/app/oracle/oradata/orcl2/system01.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/sysaux01.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/undotbs01.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/users01.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/example01.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/tbs_yl01.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/tbs_yl02.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/tbs_yl03.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/tbs_yl04.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/tbs_yl05.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/tbs_yl06.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/tbs_yl07.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/tbs_yl08.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/rcatalog.db - dbid changed, wrote new name

    Datafile /u01/app/oracle/oradata/orcl2/temp01.db - dbid changed, wrote new name

    Control File /u01/app/oracle/oradata/orcl2/control01.ctl - dbid changed, wrote new name

    Control File /u01/app/oracle/oradata/orcl2/control02.ctl - dbid changed, wrote new name

    Instance shut down


Database name changed to ORCL.

Modify parameter file and generate a new password file before restarting.

Database ID for database ORCL changed to 1383851439.

All previous backups and archived redo logs for this database are unusable.

Database has been shutdown, open database with RESETLOGS option.

Succesfully changed database name and ID.

DBNEWID - Completed succesfully.


相关内容

热门资讯

中美是否在农业方面达成协议?外... 澎湃新闻记者 杨文钦 朱郑勇5月15日,外交部发言人郭嘉昆主持例行记者会。《纽约时报》记者提问,请问...
成都引众北斗授时服务器:解决电... 毫秒级误差,就可能让电网保护误动、5G基站干扰、金融交易错序。 在电力、通信、金融等关键基础设施中,...
京鲁牵手,共创“1+1>... “2026年央视春晚,用手灵活盘核桃的机器人,是我们公司的产品。目前,我们的机器人能在复杂环境中完成...
全国投资人,“抢夺”深圳大厂高... 白手起家的新故事。 来源:每日人物 文:谢韫力 编辑:张轻松 过去一年,北京、上海的投资人开始频繁出...
乐山一商场推行“宠物友好”,曝... 近日,四川乐山网友反映,当地世豪广场高调打造“宠物友好”商圈、投放相关宣传,却放任狗不拴绳以及狗上桌...
创新药试验数据有了“护身符”!... 今天(5月15日),新修订的《药品管理法实施条例》正式施行。这是条例实施二十多年来,首次全面修订。国...
河南证监局原党委委员、副局长楚... 日前,经中央纪委国家监委批准,中央纪委国家监委驻中国证券监督管理委员会纪检监察组与河南省漯河市监委对...
黄河科技学院召开2026年就业... 5月14日,黄河科技学院召开2026年就业工作推进暨升学工作表彰会,总结2026届毕业生阶段性就业与...
2026河南省文化旅游发展大会... 【大河财立方记者司高妍张克瑶文图】5月15日,河南省政府新闻办举行2026河南省文化旅游发展大会新闻...
凤凰记者实拍:空军一号飞离北京 5月15日下午,美国总统特朗普结束对中国的国事访问,乘专机空军一号离开北京。凤凰卫视记者在现场拍到空...