Rename Oracle Database – NID Command Explained
You can use the NID command to change an Oracle database’s name and/or ID. This is useful, for example, when making a clone of a production database and wanting to use it in development.
You may find that when using it you come across the NID-00107: File I/O error on datafile or perhaps the NID-00137: All datafiles that are not dropped should be readable error. The articles that I have linked to before will help you to solve those NID error messages.
DBNEWID Command
The commands I use to change the name of my Oracle database are below.
Note: These commands are for a Windows platform, and we are changing the DB name from TEST1 to TEST2
# Ensure you use the original SID of the DB at this point
# The database must be in a mounted state, but not open
SET ORACLE_SID=TEST1 D:\Oracle\Product\11.2.0\db_1\BIN\nid target=sys/password1 dbname=TEST2 setname=YES
# Select Y to continue and you should see all the database files get updated
# You will then need to restart the database using the new name
If you would like to change the global database name you can run the following:
ALTER DATABASE RENAME GLOBAL_NAME TO TEST2.DEV.INT.COM;
Like it, share it...
Category: Database Config
Comments (1)
Trackback URL | Comments RSS Feed