DBNEWNAME工具介绍
下面修改数据库的SID和db_name
[root@oracle ~]# su - ora11g
db11@oracle /home/ora11g$
db11@oracle /home/ora11g$ sqlplus /as sysdba
SQL*Plus:Release11.2.0.4.0Production on MonMar3007:39:362015
Copyright(c)1982,2013,Oracle.All rights reserved.
Connected to:
OracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
With the Partitioning, OLAP,DataMiningandRealApplicationTesting options
SQL>select name, dbid,log_mode,open_mode from v$database;
NAME DBID LOG_MODE OPEN_MODE
---------------------------------------------------
DB11 1400765095 ARCHIVELOG READ WRITE
启动到mount状态
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
TotalSystemGlobalArea835104768 bytes
FixedSize2257840 bytes
VariableSize507513936 bytes
DatabaseBuffers322961408 bytes
RedoBuffers2371584 bytes
Database mounted.
SQL>exit
DisconnectedfromOracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
With the Partitioning, OLAP,DataMiningandRealApplicationTesting options
执行命令
db11@oracle /home/ora11g$ nid target=sys/oracle dbname=newdb11 setname=yes
DBNEWID:Release11.2.0.4.0-Production on MonMar3007:44:262015
Copyright(c)1982,2011,Oracleand/or its affiliates.All rights reserved.
Connected to database DB11 (DBID=1400765095)
Connected to server version 11.2.0
ControlFilesin database:
/u01/app/oracle11g/oradata/DB11/controlfile/o1_mf_bcc2h7dx_.ctl
Change database name of database DB11 to NEWDB11?(Y/[N])=> Y
Proceedingwith operation
Changing database name from DB11 to NEWDB11
ControlFile/u01/app/oracle11g/oradata/DB11/controlfile/o1_mf_bcc2h7dx_.ctl - modified
Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_system_bcc2dp1d_.db - wrote new name
Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_sysaux_bcc2dp2c_.db - wrote new name
Datafile/u01/app/oracle11g/oradata/DB11/datafile/fdstore.db - wrote new name
Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_users_bcc2dp33_.db - wrote new name
Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_new_user_bcp23qgn_.db - wrote new name
Datafile/u01/app/oracle11g/oradata/DB11/datafile/undotbs2.db - wrote new name
Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_temp_bcc2hld2_.tm - wrote new name
ControlFile/u01/app/oracle11g/oradata/DB11/controlfile/o1_mf_bcc2h7dx_.ctl - wrote new name
Instance shut down
Database name changed to NEWDB11.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID -Completed succesfully.
数据库中修改db_name
db11@oracle /u01/app/oracle11g/product/11.2.0/dbhome_1/dbs$ sqlplus /as sysdba
SQL*Plus:Release11.2.0.4.0Production on MonMar3007:58:332015
Copyright(c)1982,2013,Oracle.All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
TotalSystemGlobalArea835104768 bytes
FixedSize2257840 bytes
VariableSize507513936 bytes
DatabaseBuffers322961408 bytes
RedoBuffers2371584 bytes
SQL>set line 200
SQL> show parameter db_name
SQL> show parameter db_name
NAME TYPE VALUE
----------------------------------------------------------------------------------------
db_name string db11
SQL> alter system set db_name=newdb11 scope=spfile;
System altered.
SQL> startup mount force
ORACLE instance started.
TotalSystemGlobalArea835104768 bytes
FixedSize2257840 bytes
VariableSize507513936 bytes
DatabaseBuffers322961408 bytes
RedoBuffers2371584 bytes
Database mounted.
SQL>exit
DisconnectedfromOracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
With the Partitioning, OLAP,DataMiningandRealApplicationTesting options
创建新的密码文件
db11@oracle /home/ora11g$
db11@oracle /home/ora11g$ orapwd file=$ORACLE_HOME/dbs/orapwnewdb11 password=oracle entries=10
创建参数文件
db11@oracle /home/ora11g$ export ORACLE_SID=newdb11
SQL> create spfile from pfile;
File created.
SQL>exit
DisconnectedfromOracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
With the Partitioning, OLAP,DataMiningandRealApplicationTesting options
根据原参数文件,修改成新的参数文件,具体操作略
启动新的数据库名的数据库
newdb11@oracle /home/ora11g$ export ORACLE_SID=newdb11
newdb11@oracle /home/ora11g$ sqlplus /as sysdba
SQL*Plus:Release11.2.0.4.0Production on MonMar3008:16:162015
Copyright(c)1982,2013,Oracle.All rights reserved.
Connected to:
OracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
With the Partitioning, OLAP,DataMiningandRealApplicationTesting options
SQL> startup
ORACLE instance started.
TotalSystemGlobalArea835104768 bytes
FixedSize2257840 bytes
VariableSize507513936 bytes
DatabaseBuffers322961408 bytes
RedoBuffers2371584 bytes
Database mounted.
Database opened.
SQL>
SQL>select instance_name,status from v$instance;
INSTANCE_NAME STATUS
----------------------------
newdb11 OPEN
OK。。。启动成功
DBNEWNAME工具介绍的更多相关文章
- 《连载 | 物联网框架ServerSuperIO教程》- 14.配制工具介绍,以及设备驱动、视图驱动、服务实例的挂载
注:ServerSuperIO二次开发套件授权码申请---截止到:2016-12-09 1.C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍 <连载 | 物联网框架Server ...
- json、javaBean、xml互转的几种工具介绍
json.javaBean.xml互转的几种工具介绍 转载至:http://blog.csdn.net/sdyy321/article/details/7024236 工作中经常要用到Json.Jav ...
- Linux性能工具介绍
l Linux性能工具介绍 p CPU高 p 磁盘I/O p 网络 p 内存 p 应用程序跟踪 l 操作系统与应用程序的关系比喻为“唇亡齿寒”一点不为过 l 应用程序的性能问题/功能问 ...
- Android APP压力测试(一)之Monkey工具介绍
Android APP压力测试(一) 之Monkey工具介绍 前言 本文主要介绍Monkey工具.Monkey测试是Android平台自动化测试的一种手段,通过Monkey程序模拟用户触摸屏幕.滑动. ...
- Android系统性能调优工具介绍
http://blog.csdn.net/innost/article/details/9008691 经作者授权,发表Tieto某青年牛的一篇<程序员>大作. Android系统性能调优 ...
- 简要介绍Apache、php、mysql安装和工具介绍
1 安装Apache 网站:www.Apache.org下载相应的Apache,目前下载了近期的:httpd-2.2.15-win32-x86-openssl-0.9.8msi 安装简要步骤如下图: ...
- [原创]Java静态代码检查工具介绍
[原创]Java静态代码检查工具介绍 一 什么是静态代码检查? 静态代码分析是指无需运行被测代码,仅通过分析或检查源程序的语法.结构.过程.接口等来检查程序的正确性,找出代码隐藏的错误和缺陷,如参数 ...
- RUF MVC5 Repositories Framework Generator代码生成工具介绍和使用
RUF MVC5 Repositories Framework Generator代码生成工具介绍和使用 功能介绍 这个项目经过了大半年的持续更新到目前的阶段基本稳定 所有源代码都是开源的,在gith ...
- 用户管理 之 Linux 用户管理工具介绍
Linux是一个多用户的操作系统,她有完美的用户管理工具,这些工具包括用户的查询.添加.修改,以及用户之间相互切换的工具等:通过这些工具,我们能安全.轻松的完成用户管理: 在这里我们要引入用户控制工具 ...
随机推荐
- linux 时间同步的2种方法
转载自: http://blog.51yip.com/server/1474.html 由于硬件的原因,机器或多或少的根标准时间对不上,一个月的误差几秒到几分钟不等.对于服务器来说时间不准,会有很多麻 ...
- MyBatis传入多个参数的问题
一.单个参数: public List<XXBean> getXXBeanList(String xxCode); <select id="getXXXBeanList&q ...
- 关于tkCommand的各种事件的解释
superclass for callback/observer methods vtkCommand is an implementation of the observer/command des ...
- Id.value与document.getElementById("Id").value的区别
如果标签Id在Form表单里面的话,直接Id.value就不能用了,而是要用Form.Id.value来取值或设置值 所以最好用document.getElementById("Id&quo ...
- Oracle 如何扩展表空间
第一步:查看ORACLE表空间的使用情况:SELECT DBF.TABLESPACE_NAME, DBF.TOTALSPACE "总量(M)", DBF.T ...
- Block formatting context(块级格式化上下文)
今天看到豆瓣面试官的一篇文章,讲到关于CSS中的一个知识点:Block formatting context ,感觉这个确实挺有用,同时我也挺赞同作者的一些观点的,这里就不展开谈我的感受了, 此文只 ...
- GOPATH 使用总结
GOPATH 环境变量用于指定这样一些目录:除 $GOROOT 之外的包含 Go 项目源代码和二进制文件的目录.go install 和 go 工具会用到 GOPATH:作为编译后二进制的存放目的地 ...
- 动态令牌-(OTP,HOTP,TOTP)-基本原理
名词解释和基本介绍 OTP 是 One-Time Password的简写,表示一次性密码. HOTP 是HMAC-based One-Time Password的简写,表示基于HMAC算法加密的一次性 ...
- java基础 绘图技术.坦克大战 之java绘图坐标体系(二)
功能:在坐标系上绘制坦克 /* * 功能:坦克游戏的1.0 * 1. 画出坦克 * */ package com.tank; import javax.swing.*; import java.awt ...
- Android 系统工具类SystemUtils
包含的功能有: 获取系统中所有APP应用.获取用户安装的APP应用.根据包名和Activity启动类查询应用信息.跳转到WIFI设置.WIFI网络开关.移动网络开关.GPS开关 当前若关则打开 当前若 ...