DBNEWID工具使用二:更改DBNAME
二、使用DBNEWID修改DBNAME
1、檢視當前的DBNAME
SQL> select name from v$database;
SQL> select name from v$database;
NAME
---------
WWL
2、建立引數檔案
SQL> create pfile from spfile;
File created.
---------
WWL
2、建立引數檔案
SQL> create pfile from spfile;
File created.
3、關閉資料庫
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount pfile='/orasoft/product/10.2.0/db_1/dbs/initwwl.ora';
ORACLE instance started.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount pfile='/orasoft/product/10.2.0/db_1/dbs/initwwl.ora';
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 62916176 bytes
Database Buffers 218103808 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Fixed Size 1218992 bytes
Variable Size 62916176 bytes
Database Buffers 218103808 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
4、使用NID命令更改資料庫名稱,將原來的WWL更改為WWL01:
[oracle@ora10g dbs]$ nid target = sys/oracle DBNAME = WWL01 SETNAME=YES;
DBNEWID: Release 10.2.0.1.0 - Production on Wed Dec 7 00:28:17 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to database WWL (DBID=4286252909)
Connected to server version 10.2.0
Control Files in database:
/oradata/wwl/control01.ctl
/oradata/wwl/control02.ctl
/oradata/wwl/control03.ctl
/oradata/wwl/control01.ctl
/oradata/wwl/control02.ctl
/oradata/wwl/control03.ctl
Change database name of database WWL to WWL01? (Y/[N]) => Y
Proceeding with operation
Changing database name from WWL to WWL01
Control File /oradata/wwl/control01.ctl - modified
Control File /oradata/wwl/control02.ctl - modified
Control File /oradata/wwl/control03.ctl - modified
Datafile /oradata/wwl/system01.dbf - wrote new name
Datafile /data2/test_local_01.dbf - wrote new name
Datafile /oradata/wwl/sysaux01.dbf - wrote new name
Datafile /oradata/wwl/users01.dbf - wrote new name
Datafile /oradata/wwl/test01_01.dbf - wrote new name
Datafile /data2/test001_01.dbf - wrote new name
Datafile /data2/test001_02.dbf - wrote new name
Datafile /data2/test002_01.dbf - wrote new name
Datafile /data2/bigfile001.dbf - wrote new name
Datafile /data2/undotbs2_01.dbf - wrote new name
Datafile /oradata/wwl/temp01.dbf - wrote new name
Datafile /data2/temp01_01.dbf - wrote new name
Control File /oradata/wwl/control01.ctl - wrote new name
Control File /oradata/wwl/control02.ctl - wrote new name
Control File /oradata/wwl/control03.ctl - wrote new name
Instance shut down
Changing database name from WWL to WWL01
Control File /oradata/wwl/control01.ctl - modified
Control File /oradata/wwl/control02.ctl - modified
Control File /oradata/wwl/control03.ctl - modified
Datafile /oradata/wwl/system01.dbf - wrote new name
Datafile /data2/test_local_01.dbf - wrote new name
Datafile /oradata/wwl/sysaux01.dbf - wrote new name
Datafile /oradata/wwl/users01.dbf - wrote new name
Datafile /oradata/wwl/test01_01.dbf - wrote new name
Datafile /data2/test001_01.dbf - wrote new name
Datafile /data2/test001_02.dbf - wrote new name
Datafile /data2/test002_01.dbf - wrote new name
Datafile /data2/bigfile001.dbf - wrote new name
Datafile /data2/undotbs2_01.dbf - wrote new name
Datafile /oradata/wwl/temp01.dbf - wrote new name
Datafile /data2/temp01_01.dbf - wrote new name
Control File /oradata/wwl/control01.ctl - wrote new name
Control File /oradata/wwl/control02.ctl - wrote new name
Control File /oradata/wwl/control03.ctl - wrote new name
Instance shut down
Database name changed to WWL01.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID - Completed succesfully.
Modify parameter file and generate a new password file before restarting.
Succesfully changed database name.
DBNEWID - Completed succesfully.
5、登陸到資料庫檢查,發現DBNAME已經由原來的WWL修改為現在的WWL01
[oracle@ora10g dbs]$ sqlplus / as sysdba
[oracle@ora10g dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 7 00:26:44 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select dbid,name from v$database;
DBID NAME
---------- ---------
4286252909 WWL01
---------- ---------
4286252909 WWL01
SQL> exit
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20674423/viewspace-713742/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle nid修改dbnameOracle
- Use Nid to Change dbname(轉)
- Oracle rac使用nid和dbms_backup_restore包修改dbid和dbnameOracleREST
- win10系統使用自帶畫圖工具更改照片大小的方法Win10
- Windows下更改並使用NTPWindows
- Visual Studio系列教程:使用XAML工具建立使用者介面(二)
- Flutter 之使用 Event Bus 更改主題Flutter
- 更改使用者host留下的坑
- 從0到1使用Kubernetes系列(二)——安裝工具介紹
- 高併發&效能優化(二)------系統監控工具使用優化
- 如何使用不同的方式更改 Linux 使用者密碼Linux密碼
- HAC叢集更改IP(單節點更改、全部節點更改)
- Excel通用類工具(二)Excel
- 如何使用Movavi Photo Editor 6 for Mac更改影像的背景Mac
- 工具使用
- 二維碼生成工具類
- Java 中使用 google.zxing 快捷生成二維碼(附工具類原始碼)JavaGo原始碼
- 線上更改MySQL表結構工具gh-ost的特點介紹MySql
- dd工具使用
- snmpwalk工具使用
- vue中使用element ui時想要更改官方標籤的某些樣式時,一般不要在scoped中更改,要在全域性的style標籤中更改VueUI
- 二維碼相關工具類
- 二維碼生成工具 Simple QrCode
- Oracle更改預設日期格式 更改會話日期格式Oracle會話
- 在 Linux 中更改、刪除或禁用使用者密碼Linux密碼
- Mac使用技巧:怎樣在Mac電腦上更改密碼Mac密碼
- 修改了github使用者名稱後,部落格的更改Github
- NodeJS+Express搭建個人部落格-gulp自動化構建工具使用(二)NodeJSExpress
- Android NDK開發(二) 使用ndk-build構建工具進行NDK開發AndroidUI
- vscode 工具使用方式VSCode
- docker slim工具使用Docker
- dumpbin工具的使用
- doDBA工具的使用
- postman 工具使用TipsPostman
- Redis的使用(二)Redis
- 更改placeholder顏色
- MongoDB更改oplog大小MongoDB
- ubuntu 18.04 更改 hostnameUbuntu
- Myeclipse更改主題Eclipse