NID-00106: LOGIN to target database failed with Oracle error

NID-00106: LOGIN to target database failed with Oracle error

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:

NID-00106: LOGIN to target database failed with Oracle error:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Process ID: 0
Session ID: 0 Serial number: 0

Cause:
Oracle Database is shutdown condition. That’s why its not able to login.

Solution
1. Before run the NID utility, Oracle Database should be open in mount stage.

Startup 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;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.