Oracle 12.1 에서 NID 를 사용 하여 데이터 베 이 스 를 수정 하 는 DBID 와 DBName 【 실전 】
주요 절 차 는 다음 과 같다.
1. 데이터베이스 열기:
SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 4.2950E+10 bytes
Fixed Size 4508576 bytes
Variable Size 2.6172E+10 bytes
Database Buffers 1.5569E+10 bytes
Redo Buffers 1203449856 bytes
Database mounted.
Database opened.
2. DBName 에 대한 인자 수정 을 위해 pfile 을 만 듭 니 다.
SQL> create pfile from spfile;
3. 현재 DBID 와 DBNAME 조회
select name,dbid from v$database;
4. 데이터베이스 닫 기
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
5, 백업 데이터 파일, 특히 제어 파일
cp proddata data ( )
6. 데이터 베 이 스 를 mount 상태 로 시작 합 니 다.
[orapbf@erptest dbs]$ export ORACLE_SID=PROD
[orapbf@erptest dbs]$ echo $ORACLE_SID
PROD
[orapbf@erptest dbs]$sqlplus / as sysdba
SQL>startup mount;
7, nid 명령 보기 간단 한 도움말 문서 [orapbf@erptest dbs]$ nid
DBNEWID: Release 12.1.0.2.0 - Production on Wed Mar 14 22:40:19 2018
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Keyword Description (Default)
----------------------------------------------------
TARGET Username/Password (NONE)
DBNAME New database name (NONE)
LOGFILE Output Log (NONE)
REVERT Revert failed change NO
SETNAME Set a new database name only NO
APPEND Append to output log NO
HELP Displays these messages NO
8. nid 를 사용 하여 dbid 와 DBName 을 수정 합 니 다.
[orapbf@erptest dbs]$ nid target=sys/oracle dbname=PBF
DBNEWID: Release 12.1.0.2.0 - Production on Wed Mar 14 22:41:41 2018
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Connected to database PROD (DBID=357998902)
Connected to server version 12.1.0
Control Files in database:
/mnt/data/PBF/db/proddata/cntrl01.dbf
/mnt/data/PBF/db/proddata/cntrl02.dbf
/mnt/data/PBF/db/proddata/cntrl03.dbf
Change database ID and database name PROD to PBF? (Y/[N]) => y
Proceeding with operation
Changing database ID from 357998902 to 2995320870
Changing database name from PROD to PBF
Control File /mnt/data/PBF/db/proddata/cntrl01.dbf - modified
Control File /mnt/data/PBF/db/proddata/cntrl02.dbf - modified
Control File /mnt/data/PBF/db/proddata/cntrl03.dbf - modified
Datafile /mnt/data/PBF/db/proddata/system01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system02.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system03.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system04.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system05.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/ctxd01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/owad01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_queue02.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/odm.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/olap.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/sysaux01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/apps_ts_tools01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system12.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_data04.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_ind06.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_ref03.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_int02.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/sysaux02.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system13.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system14.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system15.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system16.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system17.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system18.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system19.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system20.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system21.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system22.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system23.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system24.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system25.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_ref04.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_ref05.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_ref06.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/undo02.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/cux_data01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/cux_ind01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/undo03.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/undo04.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/undo05.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media02.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media03.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media04.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/sysaux03.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media05.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_ind07.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_ind08.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_data05.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_data06.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_queue03.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/ctxd0 - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media06.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media07.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/sysaux04.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media08.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media09.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/sysaux05.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_ind09.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_data07.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media10.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media11.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media12.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media13.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media14.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media15.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media16.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media17.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media18.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_queue04.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media19.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media20.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media21.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system10.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system06.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/portal01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system07.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system09.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system08.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/system11.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/undo01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_data01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_ind01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_ref01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_int01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_summ01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_nolog01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_archive01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_queue01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_media01.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_data02.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_data03.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_ind02.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_ind03.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_ind04.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_txn_ind05.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/a_ref02.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp11.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp21.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp12.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp22.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp32.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp42.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp13.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp33.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp43.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp31.db - dbid changed, wrote new name
Datafile /mnt/data/PBF/db/proddata/temp41.db - dbid changed, wrote new name
Control File /mnt/data/PBF/db/proddata/cntrl01.dbf - dbid changed, wrote new name
Control File /mnt/data/PBF/db/proddata/cntrl02.dbf - dbid changed, wrote new name
Control File /mnt/data/PBF/db/proddata/cntrl03.dbf - dbid changed, wrote new name
Instance shut down
Database name changed to PBF.
Modify parameter file and generate a new password file before restarting.
Database ID for database PBF changed to 2995320870.
All previous backups and archived redo logs for this database are unusable.
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed succesfully.
[orapbf@erptest dbs]$ exit
9. 매개 변수 파일 수정
[orapbf@erptest ~]$ cd $ORACLE_HOME/dbs
[orapbf@erptest dbs]$ ls
hc_PROD.dat initPROD.ora lkPROD snapcf_PROD.f spfilePROD.ora
[orapbf@erptest dbs]$ vi initPROD.ora
*.compatible='12.1.0'
...
*.db_name='PBF'
...
*._sort_elimination_cost_ratio=5
*._system_trig_enabled=TRUE
*._TRACE_FILES_PUBLIC=FALSE
*.aq_tm_processes=1
*.AUDIT_SYS_OPERATIONS=TRUE
*.compatible='12.1.0'
*.control_files='/mnt/data/PBF/db/proddata/cntrl01.dbf','/mnt/data/PBF/db/proddata/cntrl02.dbf','/mnt/data/PBF/db/proddata/cntrl03.dbf'#Restore Controlfile
*.cursor_sharing='EXACT'# Required 11i settting
*.db_block_checking='FALSE'
*.db_block_checksum='TRUE'
*.db_block_size=8192
*.db_files=512# Max. no. of database files
*.db_name='PBF'
*.db_recovery_file_dest_size=214748364800
*.db_recovery_file_dest='/mnt/data/PBF/db/db_recovery_dest'
*.diagnostic_dest='/mnt/data/PBF/db/12.1.0/admin/PBF_erptest'
*.dml_locks=10000
*.event='10995 trace name context forever, level 16'
*.job_queue_processes=10
*.local_listener='PBF_LOCAL'
*.log_archive_dest_1='LOCATION=/mnt/data/PBF/db/archive'
"initPROD.ora" 76L, 2920C
10. 새 암호 파일 만 들 기
orapwd file=/mnt/data/PBF/db/12.1.0/dbs/initPBF password=oracle format=12
11. resetlogs 옵션 을 사용 하여 데이터 베 이 스 를 엽 니 다.
[orapbf@erptest dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed Mar 14 22:46:59 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 4.2950E+10 bytes
Fixed Size 4508576 bytes
Variable Size 1.1274E+10 bytes
Database Buffers 3.0467E+10 bytes
Redo Buffers 1203449856 bytes
SQL> alter database mount;
Database altered.
SQL> alter database open resetlogs;
SQL> select name,dbid from v$database;
NAME DBID
--------- ----------
PBF 2995320870
Database altered.
sqlplus / as sysdba
startup
12. 새로운 spfile 파일 만 들 기
create spfile from pfile;
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Oacle 에서 데이터베이스 의 DBID 정 보 를 어떻게 얻 습 니까?DBID 는 제어 파일 과 데이터 파일 에 기록 되 어 있 기 때문에 데이터 베 이 스 를 mount 할 수 있다 면 v$database 보 기 를 조회 하여 얻 을 수 있 습 니 다. 데이터베이스 에 자동 제어 파...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.