O'Reilly logo

Oracle Utilities Pocket Reference by Sanjay Mishra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required