`
mikixiyou
  • 浏览: 1095848 次
  • 性别: Icon_minigender_1
  • 来自: 南京
博客专栏
C3c8d188-c0ab-3396-821d-b68331e21226
Oracle管理和开发
浏览量:352197
社区版块
存档分类
最新评论

使用nib修改Oracle数据库名称

阅读更多

有两个方法:一是将controlfile 转出来,修改数据库名称重建;另一个是使用nib 工具修改。我这里介绍nib 工具修改操作方法。

工具niboracle 9i 开始提供的,专门用于修改数据库名称。

(墙内链接: http://mikixiyou.iteye.com/blog/1530140 )

第一步,备份整库。

因为这种操作会有可能失败,所以必须要先备份。

第二步,将库正常关闭,再启动到mount 状态。

第三步,使用nib 修改数据库名称

修改命令为  nid target=sys/welcome1 dbname=webdb

修改完成后,提示数据库已经关闭,需要使用open resetlogs 方式打开。

第四步,打开数据库。

打开之前,需要新生成符合新数据库名称的初始化参数文件和密码文件。监听器文件也需要做针对性修改。

 

/u04/webdb_rman@db3=>webreader$nid target=sys/welcome1 dbname=webdb

 

DBNEWID: Release 10.2.0.4.0 - Production on Tue May 15 11:43:33 2012

 

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

 

Connected to database WEBREADER (DBID=4271057885)

 

Connected to server version 10.2.0

 

Control Files in database:

    +VG1/webdb/control01.ctl

    +VG1/webdb/control02.ctl

    +VG1/webdb/control03.ctl

 

Change database ID and database name WEBREADER to WEBDB? (Y/[N]) => Y

 

Proceeding with operation

Changing database ID from 4271057885 to 2506031974

Changing database name from WEBREADER to WEBDB

    Control File +VG1/webdb/control01.ctl - modified

    Control File +VG1/webdb/control02.ctl - modified

    Control File +VG1/webdb/control03.ctl - modified

    Datafile +VG1/webdb/system01.dbf - dbid changed, wrote new name

    Datafile +VG2/webdb/data_salebill05.dbf - dbid changed, wrote new name

    Datafile +VG1/webdb/sysaux01.dbf - dbid changed, wrote new name

    Datafile +VG1/webdb/users01.dbf - dbid changed, wrote new name

    Datafile +VG1/webdb/undotbs02.dbf - dbid changed, wrote new name

   ………………………

    Instance shut down

 

Database name changed to WEBDB.

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

Database ID for database WEBDB changed to 2506031974.

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.

 

/u04/webdb_rman@db3=>webreader$sqlplus / as sysdba

 

SQL*Plus: Release 10.2.0.4.0 - Production on Tue May 15 11:42:04 2012

 

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

 

Total System Global Area 5.1540E+10 bytes

Fixed Size                  2179936 bytes

Variable Size            6425676960 bytes

Database Buffers         4.5097E+10 bytes

Redo Buffers               14594048 bytes

Database mounted.

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

 

/u04/webdb_rman@db3=>webreader$export ORACLE_SID=webdb

/u04/webdb_rman@db3=>webdb$sqlplus / as sysdba

 

SQL*Plus: Release 10.2.0.4.0 - Production on Tue May 15 11:44:47 2012

 

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

 

Connected to an idle instance.

 

SQL> startup mount

ORACLE instance started.

 

Total System Global Area 5.1540E+10 bytes

Fixed Size                  2179936 bytes

Variable Size            6425676960 bytes

Database Buffers         4.5097E+10 bytes

Redo Buffers               14594048 bytes

Database mounted.

SQL> show parameter db_name

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_name                              string      webdb

SQL> alter database open resetlogs;

 

Database altered.

 

SQL> archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            +VG2

Oldest online log sequence     1

Next log sequence to archive   1

Current log sequence           1

SQL>


0
1
分享到:
评论

相关推荐

    使用NIB父类来创建UIVIEW

    通过使用NIB文件,开发者可以脱离代码,直观地设计UI元素,然后在运行时加载到应用中。本篇文章将深入探讨如何利用NIB文件作为父类来创建`UIView`,从而提高开发效率和代码可复用性。 首先,我们需要了解什么是`NIB...

    nib2objc源码

    nib2objc是一个开源工具,主要用于将Apple的Interface Builder(IB)文件转换为Objective-C代码,以便在Xcode项目中方便地使用。这个工具对于iOS和macOS开发者来说尤其有用,因为它自动化了手动编写代码来加载界面的...

    xib转nib脚本.zip

    使用这个脚本,开发者可以快速、方便地在XIB和NIB之间切换,而无需手动修改每个文件。这对于大型项目或有大量XIB文件的组件化开发来说,可以节省大量时间和精力。 总结来说,"xib转nib脚本.zip"提供了一个实用的...

    nib2objc工具

    nib2objc工具是一款针对iOS...通过使用nib2objc,开发者可以更高效地管理项目中的界面代码,提高开发效率,专注于更核心的业务逻辑。尽管存在一定的局限性,但在Objective-C的开发环境中,它依然是一个值得推荐的工具。

    半手工打造一個Viewer (配合NIB)

    在iOS和macOS开发中,开发者通常会使用NIB或Storyboard来定义应用程序的用户界面。 描述中提到的“NULL”可能是由于信息缺失,没有提供具体的细节。不过,我们可以推测博主可能在文章中讨论了以下内容: 1. **...

    IOS无nib文件实现tableview

    通过对这些文件的分析和学习,我们可以了解到如何在不使用nib或storyboard的情况下,完全通过代码实现UITableView的功能,以及如何与数据库进行交互。这对于提升iOS开发中的编程能力和灵活性是非常有益的。

    Nib文件是什么?Nib文件打开方法

    在Xcode中,开发者通常使用Interface Builder来创建和编辑Nib文件,它允许直观地拖放UI元素并设置属性,而无需编写任何代码。 Xcode本身并不直接支持打开已编译的Nib文件,因为这些文件在构建过程中会被转换成二...

    nib2objc 将XIB文件自动转换为Objective-C的源代码文件

    nib2objc是一个小巧的转换工具,可以将XIB文件自动转换为...使用的时候,首先下载的工程代码并用XCode编译一下,会生成一个命令行程序文件 nib2objc。然后如下所示执行转换 $ nib2objc WebView.xib > WebView.m

    nib开发 ui设计

    - **作用**:通过nib文件,开发者可以在Xcode的Interface Builder中构建界面,并将这些界面元素导出为nib文件供程序运行时加载使用。 #### 1.2 nib文件开发流程 - **设计界面**:在Xcode的Interface Builder中设计...

    IPHone 自己加载nib文件显示UITable的例子

    4. **加载`nib`**:在需要使用`UITableView`的地方,通过以下代码加载`nib`文件: ```swift let nibName = "CustomTableViewCell" let nib = UINib(nibName: nibName, bundle: nil) tableView.register(nib, ...

    addChildViewController transitionFromViewController nib storyboard

    可能包含了如何使用addChildViewController添加子控制器,如何利用transitionFromViewController进行视图间的动画过渡,以及如何通过nib或storyboard加载和管理用户界面。通过这样的练习,开发者可以深入理解iOS应用...

    MainMenu.nib

    MainMenu.nib

    IOS应用源码之【应用】NIB to Objective-C converter.rar

    `NIB to Objective-C converter`是将NIB文件转换为Objective-C代码的工具,这对于理解NIB文件的工作原理以及手动创建或修改UI组件很有帮助。下面我们将深入探讨这个转换过程、NIB文件的结构以及Objective-C在iOS开发...

    nib.sh shell文件

    nib.sh shell文件

    IOS应用源码之akosma-nib2objc-1.4-12-gcde9b9e.zip

    nib是NeXTSTEP和Objective-C中的界面构建工具,全称为“Interface Builder Document”,在iOS和macOS开发中广泛使用。nib文件存储了UI元素的布局和配置信息,通过Xcode的Interface Builder可视化设计。nib2objc工具...

    NibToXibConverter:简单的应用程序,将nib转换为xib

    这个工具对于那些拥有大量 nib 文件的项目,但又希望转向使用 xib 的开发者来说非常有用。它利用了Apple的ibtool命令行工具,这是一个内置在Xcode中的工具,能够处理 nib 和 xib 文件,包括编译和解包。 ibtool在...

    PyPI 官网下载 | example-pkg-nib-utils-0.0.1.tar.gz

    当我们看到"example-pkg-nib-utils-0.0.1.tar.gz"这个名称时,可以推测这是一个在PyPI上发布的Python库,名为“example-pkg-nib-utils”,版本为0.0.1,格式为tar.gz压缩文件。 1. **Python库的理解**: Python库...

    nib:一个最小的javascript文本编辑库

    发展该项目使用进行 TDD,使用进行演示和分发打包。 首先,首先在全局安装 TestEm 和 Gulp: $ sudo npm -g install testem gulp 然后,运行 npm install 以加载本地依赖项: $ npm install 发展: $ testem 这将...

Global site tag (gtag.js) - Google Analytics