'change DBID'에 해당되는 글 1건

  1. 2010.10.06 Oracle DBID 변경

2010. 10. 6. 08:49 오라클

Oracle DBID 변경


rman 의 catalog에서 DBID 등을 check 하는 경우등에 쓰임

DBID 변경 Test 실습
====================================================================================

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area  330600448 bytes
Fixed Size                  1336344 bytes
Variable Size             234884072 bytes
Database Buffers           88080384 bytes
Redo Buffers                6299648 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle:/oracle]#sqlplus "sys/manager@ASM as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 6 17:36:32 2010

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle:/oracle/product/11g/bin]#ll ni*
-rwxr-x--x 1 oracle dba 64929 Aug 26 17:25 nid
-rwxr-x--- 1 oracle dba     0 Aug 13  2009 nidO

[oracle:/oracle/product/11g/bin]#nid target=sys/manager@ASM

DBNEWID: Release 11.2.0.1.0 - Production on Wed Oct 6 17:37:39 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to database ASM (DBID=3750656068)

Connected to server version 11.2.0

Control Files in database:
    /oracle/base/oradata/control01.ctl
    /oracle/base/oradata/control02.ctl
    /oracle/base/oradata/control03.ctl

Change database ID of database ASM? (Y/[N]) => Y

Proceeding with operation
Changing database ID from 3750656068 to 3750678307
    Control File /oracle/base/oradata/control01.ctl - modified
    Control File /oracle/base/oradata/control02.ctl - modified
    Control File /oracle/base/oradata/control03.ctl - modified
    Datafile /oracle/base/oradata/system01.db - dbid changed
    Datafile /oracle/base/oradata/sysaux01.db - dbid changed
    Datafile /oracle/base/oradata/undotbs01.db - dbid changed
    Datafile /oracle/base/oradata/temp01.db - dbid changed
    Control File /oracle/base/oradata/control01.ctl - dbid changed
    Control File /oracle/base/oradata/control02.ctl - dbid changed
    Control File /oracle/base/oradata/control03.ctl - dbid changed
    Instance shut down

Database ID for database ASM changed to 3750678307.
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:/oracle/product/11g/bin]#ss

SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 6 17:38:33 2010

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

Connected to an idle instance.

SQL> shutdown immediate

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory

SQL> exit
Disconnected

[oracle:/oracle/base/diag/rdbms/asm/ASM/trace]#vi alert_ASM.log

Wed Oct 06 17:35:55 2010
SMON started with pid=13, OS id=15300
Wed Oct 06 17:35:55 2010
RECO started with pid=14, OS id=15302
Wed Oct 06 17:35:55 2010
MMON started with pid=15, OS id=15304
Wed Oct 06 17:35:55 2010
MMNL started with pid=16, OS id=15306
ORACLE_BASE from environment = /oracle/base
Wed Oct 06 17:35:56 2010
ALTER DATABASE   MOUNT
Successful mount of redo thread 1, with mount id 3750691004
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE   MOUNT
Wed Oct 06 17:37:53 2010
*** DBNEWID utility started ***
DBID will be changed from 3750656068 to new DBID of 3750678307 for database ASM
Starting datafile conversion
Wed Oct 06 17:35:55 2010
MMAN started with pid=9, OS id=15292
Wed Oct 06 17:35:55 2010
DBW0 started with pid=10, OS id=15294
Wed Oct 06 17:35:55 2010
LGWR started with pid=11, OS id=15296
Wed Oct 06 17:35:55 2010
CKPT started with pid=12, OS id=15298
Wed Oct 06 17:35:55 2010
SMON started with pid=13, OS id=15300
Wed Oct 06 17:35:55 2010
RECO started with pid=14, OS id=15302
Wed Oct 06 17:35:55 2010
MMON started with pid=15, OS id=15304
Wed Oct 06 17:35:55 2010
MMNL started with pid=16, OS id=15306
ORACLE_BASE from environment = /oracle/base
Wed Oct 06 17:35:56 2010
ALTER DATABASE   MOUNT
Successful mount of redo thread 1, with mount id 3750691004
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE   MOUNT
Wed Oct 06 17:37:53 2010
*** DBNEWID utility started ***
DBID will be changed from 3750656068 to new DBID of 3750678307 for database ASM
Starting datafile conversion
Datafile conversion complete
Database ID for database ASM changed to 3750678307.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open with RESETLOGS option.
Succesfully changed database ID.
*** DBNEWID utility finished succesfully ***
Shutting down instance (immediate)
Shutting down instance: further logons disabled
Stopping background process MMNL
Stopping background process MMON
License high water mark = 1
alter database dismount
Completed: alter database dismount
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Wed Oct 06 17:37:54 2010
Stopping background process VKTM:
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Wed Oct 06 17:37:56 2010
Instance shutdown complete


SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 6 17:42:36 2010

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  330600448 bytes
Fixed Size                  1336344 bytes
Variable Size             234884072 bytes
Database Buffers           88080384 bytes
Redo Buffers                6299648 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


SQL> alter database open resetlogs;

Database altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle:/oracle]#rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Wed Oct 6 17:43:20 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ASM (DBID=3750678307)

Posted by pat98
이전버튼 1 이전버튼

05-09 04:31
Flag Counter
Yesterday
Today
Total

글 보관함

최근에 올라온 글

달력

 « |  » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

최근에 달린 댓글