Oracle’s DBNEWID utility, invoked as nid, can change a database identifier (DBID), a database name (DBNAME), or both. This is useful after cloning a database that must be distinguished from its source in an RMAN repository.
Understand the consequences
- Changing the DBID makes backups and archived logs created under the old DBID unusable for the renamed incarnation.
- A DBID change requires opening the database with
RESETLOGS. - A DBNAME change also requires parameter-file, password-file, service, and monitoring updates.
- DBNEWID is not used directly on a physical standby; review the Data Guard procedure for the topology.
Change the DBID only
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
$ nid TARGET=/
Change the DBID and DBNAME
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
$ nid TARGET=/ DBNAME=TESTDB
To change only the name while preserving the DBID, add SETNAME=YES. Use a recoverable whole-database backup before starting, and read the full utility output before confirming.
After NID completes
- Update
DB_NAMEand related parameter, password, network, and service files when the name changed. - Start the database in mount mode and open it with
RESETLOGSwhen the DBID changed. - Verify
DBIDandNAMEinV$DATABASE. - Update or re-register the database in the recovery catalog as appropriate.
- Take a new full backup immediately.
Multitenant note
On supported multitenant releases, review the PDB parameter. Oracle recommends PDB=ALL when the cloned CDB’s pluggable databases also need new identifiers.
Reference
Follow the release-specific Oracle DBNEWID documentation for restrictions and recovery steps.

Leave a Reply