Changing Database ID of an Oracle Database

Photo by Manuel Geissinger on Pexels.com

DBNEWID is a database utility that can change the internal database identifier (DBID) and the database name (DBNAME) for an Oracle database.

ora11202@bbdhcp:/home/ora11202-> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Tue Jul 14 20:44:21 2015

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.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 634679296 bytes
Fixed Size 2229160 bytes
Variable Size 385879128 bytes
Database Buffers 243269632 bytes
Redo Buffers 3301376 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ora11202@bbdhcp:/home/ora11202-> nid target=/

DBNEWID: Release 11.2.0.2.0 - Production on Tue Jul 14 20:45:30 2015

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

Connected to database DBDHCP3 (DBID=528973516)

Connected to server version 11.2.0

Control Files in database:
 /datafile/dbdhcp3/oradata/dbdhcp3/control01.ctl
 /datafile/dbdhcp3/oradata/dbdhcp3/control02.ctl

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

Proceeding with operation
Changing database ID from 528973516 to 632686762
 Control File /datafile/dbdhcp3/oradata/dbdhcp3/control01.ctl - modified
 Control File /datafile/dbdhcp3/oradata/dbdhcp3/control02.ctl - modified
 Datafile /datafile/dbdhcp3/oradata/dbdhcp3/system01.db - dbid changed
 Datafile /datafile/dbdhcp3/oradata/dbdhcp3/sysaux01.db - dbid changed
 Datafile /datafile/dbdhcp3/oradata/dbdhcp3/undotbs01.db - dbid changed
 Datafile /datafile/dbdhcp3/oradata/dbdhcp3/users01.db - dbid changed
 Datafile /u03/app/ora11202/product/11.2.0/dbhome_1/dbs/dbv_R2V4.db - dbid changed
 Datafile /datafile/dbdhcp3/oradata/dbdhcp3/temp01.db - dbid changed
 Control File /datafile/dbdhcp3/oradata/dbdhcp3/control01.ctl - dbid changed
 Control File /datafile/dbdhcp3/oradata/dbdhcp3/control02.ctl - dbid changed
 Instance shut down

Database ID for database DBDHCP3 changed to 632686762.
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 ID.
DBNEWID - Completed succesfully.