allows you to change any of the following:
Only the DBID of a database
Only the DBNAME of a database
Both the DBNAME and DBID of a database
Note : Prior to the introduction of the DBNEWID utility, you could manually
create a copy of a database and give it a new database name (DBNAME) by re-creating
the control file. However, you could not give the database a new identifier (DBID).
The DBID is an internal, unique identifier for a database. Because Recovery Manager (RMAN)
distinguishes databases by DBID, you could not register a seed database and a manually
copied database together in the same RMAN repository.
Steps :
SHUTDOWN IMMEDIATE
STARTUP MOUNT
% nid TARGET=SYS/oracle@test_db
% nid TARGET=SYS/oracle@test DBNAME=test_db
STARTUP MOUNT
ALTER DATABASE OPEN RESETLOGS;
Restrictions and Usage Notes : -
The DBNEWID utility has the following restrictions:
To change the DBID of a database, the database must be mounted and must have been shut down consistently
prior to mounting. In the case of an Oracle Real Application Clusters database, the database must be mounted in NOPARALLEL mode.
You must open the database with the RESETLOGS option after changing the DBID.
However, you do not have to open with the RESETLOGS option after changing only the database name.
No other process should be running against the database when DBNEWID is executing.
If another session shuts down and starts the database, then DBNEWID terminates unsuccessfully.
All online datafiles should be consistent without needing recovery.
Normal offline datafiles should be accessible and writable. If this is not the case, you must drop these files
before invoking the DBNEWID utility.
All read-only tablespaces must be accessible and made writable at the operating system
level prior to invoking DBNEWID. If these tablespaces cannot be made writable (for example,
they are on a CD-ROM), then you must unplug the tablespaces using the transportable tablespace
feature and then plug them back in the database before invoking the DBNEWID utility.
The DBNEWID utility does not change global database names.