Name

nid

Use nid (DBNEWID) utility to change the name (DBNAME) and the identifier (DBID) of a database.

Tip

If you are using an Oracle release prior to Oracle Database 10g, you need to run nid while logged on locally to the database server as the Oracle software owner. Oracle Database 10g has no such restriction.

The primary use of the nid utility is to change the DBID and DBNAME of a database that has been created by copying from another database. While copying from another database, you can recreate the control file and give the database a new name. However, the DBID (internal unique identifier of the database) of the new database remains the same as that of the source database. Because RMAN uses DBID to uniquely identify databases in its repository, you can’t use the same RMAN repository to back up the source database and the newly copied database unless you change the DBID.

Tip

When you change the DBID of a database, all previous backups and archived redo logs of the database become unusable. Therefore, you should back up a database soon after changing the DBID.

Syntax

nid target=user[/password][@net_service_name]
    [revert={yes|no}]
    [dbname=new_database_name [setname={yes|no}]]
    [logfile=log_file [append={yes|no}]]
    [help={yes|no}]

Parameters

user[/password][@net_service_name]

Specifies the username, password, and (optionally) the net service name for the database for which you want to change the DBNAME or DBID. You must connect as a user with SYSDBA privileges.

Tip

The database must be mounted ...

Get Oracle Utilities Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.