How to fix the Oracle error ORA-01161: database name string in file header does not match given name of string?

In this post, you’ll learn more about the Oracle ErrorORA-01161: database name string in file header does not match given name of string with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

ORA-01161: database name string in file header does not match given name of string

Reason for the Error ORA-01161: database name string in file header does not match given name of string

The database name given at the command line does not match the database name found in the file header.

How to fix the Error ORA-01161: database name string in file header does not match given name of string ?

You can fix this error in Oracle by following the below steps

Chance are good that the database name specified at the command line is incorrect. Resolve the descepency, and resubmit the command. If you are attempting to change the database name, be sure to use the SET DATABASE option.