NID-00121: Database should not be open
NID is the utility used in Oracle database for change the DBID and DBNAME of the database.
Error
During starting the command NID for changing the DBID of the database. I am getting the following error:
C:\Users\Oracle>nid target=sys/password
DBNEWID: Release 18.0.0.0.0 - Production on Fri Oct 4 11:09:20 2019
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Connected to database XE (DBID=2900437705)
NID-00121: Database should not be open
Change of database ID failed during validation - database is intact.
DBNEWID - Completed with validation errors.
Cause:
Oracle Database is OPEN state. You should make it in MOUNT State.
Solution
1. Oracle Database should be started in mount stage.
Starup mount
2. After opened the database in mount stage, the nid command start working.
C:\Users\Oracle>nid target=sys/password
DBNEWID: Release 18.0.0.0.0 - Production on Fri Oct 4 11:12:31 2019
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Connected to database XE (DBID=2900437705)
Connected to server version 18.4.0
Control Files in database:
C:\ORACLE\ORADATA\XE\CONTROL01.CTL
C:\ORACLE\ORADATA\XE\CONTROL02.CTL
Change database ID of database XE? (Y/[N]) => Y
Proceeding with operation
Changing database ID from 2900437705 to 2901846628
Control File C:\ORACLE\ORADATA\XE\CONTROL01.CTL - modified
Control File C:\ORACLE\ORADATA\XE\CONTROL02.CTL - modified
Datafile C:\ORACLE\ORADATA\XE\SYSTEM01.DB - dbid changed
Datafile C:\ORACLE\ORADATA\XE\SYSAUX01.DB - dbid changed
Datafile C:\ORACLE\ORADATA\XE\UNDOTBS01.DB - dbid changed
Datafile C:\ORACLE\ORADATA\XE\PDBSEED\SYSTEM01.DB - dbid changed
Datafile C:\ORACLE\ORADATA\XE\PDBSEED\SYSAUX01.DB - dbid changed
Datafile C:\ORACLE\ORADATA\XE\USERS01.DB - dbid changed
Control File C:\ORACLE\ORADATA\XE\CONTROL01.CTL - dbid changed
Control File C:\ORACLE\ORADATA\XE\CONTROL02.CTL - dbid changed
Instance shut down
Database ID for database XE changed to 2901846628.
All previous backups and archived redo logs for this database are unusable.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database ID.
DBNEWID - Completed succesfully.
3. Open the database in RESETLOGS
ALter database open resetlogs;
not works
LikeLike
You can run NID command only when database at mount stage
LikeLike