記一次通過DBNEWID工具修改DBID時的NID-00135: There are 1 active threads錯誤
ORACLE 10G
REDHAT 5.3 64BIT
錯誤原因:
通過DBNEWID 工具修改DBID
[@more@]由於通過RMAN的recover新建備用庫後需要將新庫的DBID進行修改,但是按照正常的操作執行到修改DBID的時候居然報錯,錯誤內容如下:
[oracle@qqdb bk]$ nid target=sys/sys123@back
DBNEWID: Release 10.2.0.1.0 - Production on Fri Dec 3 16:43:29 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to database BACK (DBID=4055002079)
NID-00135: There are 1 active threads
Change of database ID failed during validation - database is intact.
DBNEWID - Completed with validation errors.
通過檢查各個環節發現沒有什麼異常:
[oracle@qqdb bk]$ ps -ef|grep -u oracle
oracle 2650 1 0 15:47 ? 00:00:01 /u01/app/10.2.1/db_1/bin/tnslsnr LISTENER -inherit
root 3334 3295 0 15:53 pts/0 00:00:00 su - oracle
oracle 3335 3334 0 15:53 pts/0 00:00:00 -bash
root 3407 3376 0 15:54 pts/1 00:00:00 su - oracle
oracle 3408 3407 0 15:54 pts/1 00:00:01 -bash
oracle 3733 3335 0 16:26 pts/0 00:00:00 sqlplus as sysdba
oracle 3736 1 0 16:26 ? 00:00:00 ora_pmon_back
oracle 3738 1 0 16:26 ? 00:00:00 ora_psp0_back
oracle 3740 1 0 16:26 ? 00:00:00 ora_mman_back
oracle 3742 1 0 16:26 ? 00:00:00 ora_dbw0_back
oracle 3744 1 0 16:26 ? 00:00:00 ora_lgwr_back
oracle 3746 1 0 16:26 ? 00:00:01 ora_ckpt_back
oracle 3748 1 0 16:27 ? 00:00:00 ora_smon_back
oracle 3750 1 0 16:27 ? 00:00:00 ora_reco_back
oracle 3752 1 0 16:27 ? 00:00:00 ora_mmon_back
oracle 3754 1 0 16:27 ? 00:00:00 ora_mmnl_back
oracle 3830 3408 0 16:43 pts/1 00:00:00 ps -ef
oracle 3831 3408 0 16:43 pts/1 00:00:00 grep -u oracle
SQL> startup mount;
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 2019320 bytes
Variable Size 113246216 bytes
Database Buffers 50331648 bytes
Redo Buffers 2174976 bytes
Database mounted.
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL>
最後的解決方案:
原來在使用DBNEWID工具的時候首先要保證
1、資料庫處於mount狀態
2、資料庫處於歸檔狀態
SQL> archive log list;Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/10.2.1/db_1/dbs/arch
Oldest online log sequence 0
Next log sequence to archive 1
Current log sequence 1
3、歸檔目錄必須存在
[oracle@qqdb bk]$ cd /u01/app/10.2.1/db_1/dbs/arch
-bash: cd: /u01/app/10.2.1/db_1/dbs/arch: No such file or directory
4、資料檔案必須處於online狀態
FILE# STATUS NAME
---------- ------- ----------------------------------------
1 SYSTEM /u01/oradata/back/system01.dbf
2 ONLINE /u01/oradata/back/undotbs01.dbf
3 ONLINE /u01/oradata/back/sysaux01.dbf
4 ONLINE /u01/oradata/back/users01.dbf
5 ONLINE /u01/oradata/back/test_tran01.dbf
很明顯在我的環境中第三個要素沒有滿足,也就是歸檔目錄不存在。
下面指定一個存在的歸檔目錄:
[oracle@qqdb rman]$ pwd
/u02/rman
SQL> alter system set log_archive_dest_1='location=/u02/rman';
System altered.
SQL> alter database open;
Database altered.
SQL> alter system archive log current;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 2019320 bytes
Variable Size 113246216 bytes
Database Buffers 50331648 bytes
Redo Buffers 2174976 bytes
Database mounted.
然後重新執行,問題才得以解決:
[oracle@qqdb bk]$ nid target=sys/sys123@back
DBNEWID: Release 10.2.0.1.0 - Production on Fri Dec 3 16:50:30 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to database BACK (DBID=4055002079)
NID-00121: Database should not be open
Change of database ID failed during validation - database is intact.
DBNEWID - Completed with validation errors.
[oracle@qqdb bk]$ nid target=sys/sys123@back
DBNEWID: Release 10.2.0.1.0 - Production on Fri Dec 3 16:51:14 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to database BACK (DBID=4055002079)
Connected to server version 10.2.0
Control Files in database:
/u01/oradata/back/control01.ctl
/u01/oradata/back/control02.ctl
/u01/oradata/back/control03.ctl
Change database ID of database BACK? (Y/[N]) => y
Proceeding with operation
Changing database ID from 4055002079 to 4055580995
Control File /u01/oradata/back/control01.ctl - modified
Control File /u01/oradata/back/control02.ctl - modified
Control File /u01/oradata/back/control03.ctl - modified
Datafile /u01/oradata/back/system01.dbf - dbid changed
Datafile /u01/oradata/back/undotbs01.dbf - dbid changed
Datafile /u01/oradata/back/sysaux01.dbf - dbid changed
Datafile /u01/oradata/back/users01.dbf - dbid changed
Datafile /u01/oradata/back/temp01.dbf - dbid changed
Control File /u01/oradata/back/control01.ctl - dbid changed
Control File /u01/oradata/back/control02.ctl - dbid changed
Control File /u01/oradata/back/control03.ctl - dbid changed
Instance shut down
Database ID for database BACK changed to 4055580995.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database ID.
DBNEWID - Completed succesfully.
[oracle@qqdb bk]$
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10130206/viewspace-1042560/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- NID-00135: There are 1 active threads錯誤thread
- 11g DBNEWID工具修改DBID碰到的問題
- dbnewid修改dbid和庫名
- 通過dbms_backup_restore修改oracle的dbidRESTOracle
- 利用DBNEWID工具來修改DBNAME
- 記錄一次錯誤的使用當前時間new Date()引發的錯誤
- 記一次https通訊除錯過程HTTP除錯
- MongoDB的一次錯誤記錄MongoDB
- 記錄一次根據錯誤資訊無法定位錯誤的錯誤
- 記一次ora-04030錯誤的處理過程
- Oracle工具——DBNEWIDOracle
- oracle 之修改DBIDOracle
- git: 記一次push的錯誤,印象深刻Git
- 記錄一次數字和字串比較時候犯的錯誤字串
- DBNEWID 筆記筆記
- oracle 修改dbid和dbnameOracle
- 記一次ElementUI原始碼修改過程UI原始碼
- 記一次 oracle expdp 匯出錯誤Oracle
- 通過錯誤堆疊資訊和原始碼分析錯誤來源原始碼
- 通過記憶體鎖定,解決ORA-4031錯誤記憶體
- 通過錯誤的sql來測試推理sql的解析過程SQL
- 通過dbms_scheduler執行一個外部job時出現錯誤
- 錯誤處理:如何通過 error、deferred、panic 等處理錯誤?Error
- 記一次因為共享變數的犯錯誤變數
- 記錄一次一次監聽無法連線的錯誤
- 一次ORA-00257錯誤的處理過程
- 記一次Windows下啟動錯誤故障Windows
- 記一次OPatch failed with error code 73錯誤AIError
- 通過錯誤的sql來測試推理sql的解析過程(二)SQL
- 一次定時任務配置錯誤引發的思考
- windows下可以通過使用orastack工具修改每個thread使用的stack記憶體WindowsASTthread記憶體
- 10G DBNEWID工具的增強
- DBNEWID工具使用二:更改DBNAME
- 記一次安卓webview查錯過程安卓WebView
- 通過配置檔案來修改WAS控制檯Session過期時間的方法Session
- 記錄一次定時器報錯定時器
- 通過ORA錯誤反思sql語句規範SQL
- 記錄一次誤刪操作,分享使用 Git 撤銷修改Git