Fix for ORA-01103 database name 'DB01' in control file is not 'DBDG'

        How can we fix the oracle error ORA-01103: database name 'DB01' in control file is not 'DBDG'.  This error is common when you try to duplicate a database and the control-file still holds the old name. (Fix for ORA-01103)

Cause

The database name in the control file does not match your database name.

Action

Either find the correct control file or change your database name.

Download Full Free Installation Manual PDF Book from here:

Oracle Enterprise Manager 12c Installation PDF

This will be the error message

SQL STARTUP

ORACLE instance started.

Total System Global Area  612368384 bytes
Fixed Size                  1292036 bytes
Variable Size             239077628 bytes
Database Buffers          364904448 bytes
Redo Buffers                7094272 bytes
ORA-01103: database name 'DB01' in control file is not 'DBDG'

Now let's see how we can fix this :

1- Stop the database

SQL SHUT IMMEDIATE;

ORA-01507: database not mounted

ORACLE instance shut down.

2- Start you database in nomount mode and alter the DB_NAME parameter.

SQL STARTUP NOMOUNT;

ORACLE instance started.

Total System Global Area  612368384 bytes
Fixed Size                  1292036 bytes
Variable Size             243271932 bytes
Database Buffers          360710144 bytes
Redo Buffers                7094272 bytes

SQL ALTER SYSTEM SET DB_NAME=DB01 SCOPE=SPFILE;

System altered.

3- Start up your database

SQL SHUT IMMEDIATE;

ORA-01507: database not mounted

ORACLE instance shut down.

SQL STARTUP

ORACLE instance started.

Total System Global Area  612368384 bytes
Fixed Size                  1292036 bytes
Variable Size             247466236 bytes
Database Buffers          356515840 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.