下面修改数据库的SID和db_name

  1. [root@oracle ~]# su - ora11g
  2. db11@oracle /home/ora11g$
  3. db11@oracle  /home/ora11g$ sqlplus /as sysdba
  4. SQL*Plus:Release11.2.0.4.0Production on MonMar3007:39:362015
  5. Copyright(c)1982,2013,Oracle.All rights reserved.
  6. Connected to:
  7. OracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
  8. With the Partitioning, OLAP,DataMiningandRealApplicationTesting options
  9. SQL>select name, dbid,log_mode,open_mode from v$database;
  10. NAME DBID LOG_MODE OPEN_MODE
  11. ---------------------------------------------------
  12. DB11 1400765095 ARCHIVELOG READ WRITE

启动到mount状态

  1. SQL> shutdown immediate;
  2. Database closed.
  3. Database dismounted.
  4. ORACLE instance shut down.
  5. SQL> startup mount
  6. ORACLE instance started.
  7. TotalSystemGlobalArea835104768 bytes
  8. FixedSize2257840 bytes
  9. VariableSize507513936 bytes
  10. DatabaseBuffers322961408 bytes
  11. RedoBuffers2371584 bytes
  12. Database mounted.
  13. SQL>exit
  14. DisconnectedfromOracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
  15. With the Partitioning, OLAP,DataMiningandRealApplicationTesting options

执行命令

  1. db11@oracle /home/ora11g$ nid target=sys/oracle dbname=newdb11 setname=yes
  2. DBNEWID:Release11.2.0.4.0-Production on MonMar3007:44:262015
  3. Copyright(c)1982,2011,Oracleand/or its affiliates.All rights reserved.
  4. Connected to database DB11 (DBID=1400765095)
  5. Connected to server version 11.2.0
  6. ControlFilesin database:
  7. /u01/app/oracle11g/oradata/DB11/controlfile/o1_mf_bcc2h7dx_.ctl
  8. Change database name of database DB11 to NEWDB11?(Y/[N])=> Y
  9. Proceedingwith operation
  10. Changing database name from DB11 to NEWDB11
  11. ControlFile/u01/app/oracle11g/oradata/DB11/controlfile/o1_mf_bcc2h7dx_.ctl - modified
  12. Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_system_bcc2dp1d_.db - wrote new name
  13. Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_sysaux_bcc2dp2c_.db - wrote new name
  14. Datafile/u01/app/oracle11g/oradata/DB11/datafile/fdstore.db - wrote new name
  15. Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_users_bcc2dp33_.db - wrote new name
  16. Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_new_user_bcp23qgn_.db - wrote new name
  17. Datafile/u01/app/oracle11g/oradata/DB11/datafile/undotbs2.db - wrote new name
  18. Datafile/u01/app/oracle11g/oradata/DB11/datafile/o1_mf_temp_bcc2hld2_.tm - wrote new name
  19. ControlFile/u01/app/oracle11g/oradata/DB11/controlfile/o1_mf_bcc2h7dx_.ctl - wrote new name
  20. Instance shut down
  21. Database name changed to NEWDB11.
  22. Modify parameter file and generate a new password file before restarting.
  23. Succesfully changed database name.
  24. DBNEWID -Completed succesfully.

数据库中修改db_name

  1. db11@oracle /u01/app/oracle11g/product/11.2.0/dbhome_1/dbs$ sqlplus /as sysdba
  2. SQL*Plus:Release11.2.0.4.0Production on MonMar3007:58:332015
  3. Copyright(c)1982,2013,Oracle.All rights reserved.
  4. Connected to an idle instance.
  5. SQL> startup nomount
  6. ORACLE instance started.
  7. TotalSystemGlobalArea835104768 bytes
  8. FixedSize2257840 bytes
  9. VariableSize507513936 bytes
  10. DatabaseBuffers322961408 bytes
  11. RedoBuffers2371584 bytes
  12. SQL>set line 200
  13. SQL> show parameter db_name
  14. SQL> show parameter db_name
  15. NAME TYPE VALUE
  16. ----------------------------------------------------------------------------------------
  17. db_name string db11
  18. SQL> alter system set db_name=newdb11 scope=spfile;
  19. System altered.
  20. SQL> startup mount force
  21. ORACLE instance started.
  22. TotalSystemGlobalArea835104768 bytes
  23. FixedSize2257840 bytes
  24. VariableSize507513936 bytes
  25. DatabaseBuffers322961408 bytes
  26. RedoBuffers2371584 bytes
  27. Database mounted.
  28. SQL>exit
  29. DisconnectedfromOracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
  30. With the Partitioning, OLAP,DataMiningandRealApplicationTesting options

创建新的密码文件

  1. db11@oracle /home/ora11g$ 
  2. db11@oracle  /home/ora11g$ orapwd file=$ORACLE_HOME/dbs/orapwnewdb11 password=oracle entries=10
  3.  
  4. 创建参数文件
  5.  
  6. db11@oracle  /home/ora11g$ export ORACLE_SID=newdb11
  7. SQL> create spfile from pfile;
  8. File created.
  9. SQL>exit
  10. DisconnectedfromOracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
  11. With the Partitioning, OLAP,DataMiningandRealApplicationTesting options
  12. 根据原参数文件,修改成新的参数文件,具体操作略

启动新的数据库名的数据库

  1. newdb11@oracle /home/ora11g$ export ORACLE_SID=newdb11
  2. newdb11@oracle  /home/ora11g$ sqlplus /as sysdba
  3. SQL*Plus:Release11.2.0.4.0Production on MonMar3008:16:162015
  4. Copyright(c)1982,2013,Oracle.All rights reserved.
  5. Connected to:
  6. OracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction
  7. With the Partitioning, OLAP,DataMiningandRealApplicationTesting options
  8. SQL> startup
  9. ORACLE instance started.
  10. TotalSystemGlobalArea835104768 bytes
  11. FixedSize2257840 bytes
  12. VariableSize507513936 bytes
  13. DatabaseBuffers322961408 bytes
  14. RedoBuffers2371584 bytes
  15. Database mounted.
  16. Database opened.
  17. SQL>
  18. SQL>select instance_name,status from v$instance;
  19. INSTANCE_NAME STATUS
  20. ----------------------------
  21. newdb11 OPEN

OK。。。启动成功

DBNEWNAME工具介绍的更多相关文章

  1. 《连载 | 物联网框架ServerSuperIO教程》- 14.配制工具介绍,以及设备驱动、视图驱动、服务实例的挂载

    注:ServerSuperIO二次开发套件授权码申请---截止到:2016-12-09 1.C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍 <连载 | 物联网框架Server ...

  2. json、javaBean、xml互转的几种工具介绍

    json.javaBean.xml互转的几种工具介绍 转载至:http://blog.csdn.net/sdyy321/article/details/7024236 工作中经常要用到Json.Jav ...

  3. Linux性能工具介绍

    l  Linux性能工具介绍 p  CPU高 p  磁盘I/O p  网络 p  内存 p  应用程序跟踪 l  操作系统与应用程序的关系比喻为“唇亡齿寒”一点不为过 l  应用程序的性能问题/功能问 ...

  4. Android APP压力测试(一)之Monkey工具介绍

    Android APP压力测试(一) 之Monkey工具介绍 前言 本文主要介绍Monkey工具.Monkey测试是Android平台自动化测试的一种手段,通过Monkey程序模拟用户触摸屏幕.滑动. ...

  5. Android系统性能调优工具介绍

    http://blog.csdn.net/innost/article/details/9008691 经作者授权,发表Tieto某青年牛的一篇<程序员>大作. Android系统性能调优 ...

  6. 简要介绍Apache、php、mysql安装和工具介绍

    1 安装Apache 网站:www.Apache.org下载相应的Apache,目前下载了近期的:httpd-2.2.15-win32-x86-openssl-0.9.8msi 安装简要步骤如下图: ...

  7. [原创]Java静态代码检查工具介绍

    [原创]Java静态代码检查工具介绍 一  什么是静态代码检查? 静态代码分析是指无需运行被测代码,仅通过分析或检查源程序的语法.结构.过程.接口等来检查程序的正确性,找出代码隐藏的错误和缺陷,如参数 ...

  8. RUF MVC5 Repositories Framework Generator代码生成工具介绍和使用

    RUF MVC5 Repositories Framework Generator代码生成工具介绍和使用 功能介绍 这个项目经过了大半年的持续更新到目前的阶段基本稳定 所有源代码都是开源的,在gith ...

  9. 用户管理 之 Linux 用户管理工具介绍

    Linux是一个多用户的操作系统,她有完美的用户管理工具,这些工具包括用户的查询.添加.修改,以及用户之间相互切换的工具等:通过这些工具,我们能安全.轻松的完成用户管理: 在这里我们要引入用户控制工具 ...

随机推荐

  1. SpringMVC前后端数据交互总结

    控制器 作为控制器,大体的作用是作为V端的数据接收并且交给M层去处理,然后负责管理V的跳转.SpringMVC的作用不外乎就是如此,主要分为:接收表单或者请求的值,定义过滤器,跳转页面:其实就是ser ...

  2. UP board 漫谈(1)——从Atom到UP Board

    title: UP board 漫谈(1)--从Atom到UP Board date: 2016-12-26 12:33:03 tags: UP board categories: 开发板 perma ...

  3. MyEclipse部署web项目到Tomcat出现An internal error occurred during: "Launching on Tomcat 7.x"的问题

    如果出现了上述的错误按照如下的3个步骤解决:1.首先关闭MyEclipse工作空间.2.然后删除工作空间下的文件."MyEclipse10\workspace.metadata.plugin ...

  4. 第一章 Shiro简介——《跟我学Shiro》(转)

    目录贴:跟我学Shiro目录贴 1.1  简介 Apache Shiro是Java的一个安全框架.目前,使用Apache Shiro的人越来越多,因为它相当简单,对比Spring Security,可 ...

  5. Lattice Reduction (LLL) 算法C代码实现

    废话不多说,大名鼎鼎的Lenstra-Lenstra-Lovasz(LLL) 算法.实现参考论文:Factoring Polynomials with Rational Coefficients, 作 ...

  6. tips~function pointer

    An simple example: #include<stdio.h> int plus(int a,int b) { return a+b; } int main() { int (* ...

  7. REDHAT一总复习1 ssh配置 禁用root用户SSH连接

    生成SSH公钥 $ ssh-keygen 生成的公钥安装到指定的服务器上,这里安装到desktop0上的student账户 $ ssh-copy-id desktop0 $ su - 禁用root用户 ...

  8. Android常用组件之ListView

    使用ListAdapter是ListView的适配器. 使用ListView.setAdapter()方法来设置ListView的适配器. 简单的使用 adapter = new ArrayAdapt ...

  9. linux 命令 之判断表达式

    摘自http://www.comptechdoc.org/os/linux/usersguide/linux_ugshellpro.html Tests There is a function pro ...

  10. solr基本入门

    一直想接触下搜索,虽然之前也玩了下solr,但一直没深入,所以也都忘得差不多了,现在solr都6.1了,发展真快.重新拾起,记录下也好,为以后出问题查找起来快一点. 1.搜索最重要的概念就是倒排索引, ...