cancel
Showing results for 
Search instead for 
Did you mean: 

ORA-01201: file 1 header failed to write correctly

Former Member
0 Kudos

Hi All,

I need your help.

I recently performed database copy of our Prod system to Test system.

Already applied the archive logs in /oracle/SID/oraarch

I am encountering errors below.

I already search the net and tried almost every solution suggested but doesnt seem to work.

SQL> connect / as sysdba

Connected to an idle instance.

SQL> @CONTROL.SQL

Connected to an idle instance.

ORACLE instance started.

Total System Global Area 5083496448 bytes

Fixed Size                  2078264 bytes

Variable Size            2550139336 bytes

Database Buffers         2516582400 bytes

Redo Buffers               14696448 bytes

Control file created.

ALTER DATABASE OPEN RESETLOGS

*

ERROR at line 1:

ORA-01195: online backup of file 1 needs more recovery to be consistent

ORA-01110: data file 1: '/oracle/BEQ/sapdata1/system_1/system.data1'

ALTER TABLESPACE PSAPTEMP ADD TEMPFILE '/oracle/BEQ/sapdata1/temp_1/temp.data1'

*

ERROR at line 1:

ORA-01109: database not open

SQL> recover database using backup controlfile until cancel;

ORA-00283: recovery session canceled due to errors

ORA-01201: file 1 header failed to write correctly

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marvin,

Did you run the recover command in oracle mount mode?if not recover command should be run in mount mode.

Are all the datafiles and archive logs available. Please check the permissions of the file names.

They should point to targetSID.

Reg,

Het

Former Member
0 Kudos

Hi Het,

I have generated the files CONTROL.SQL, CONTROL.TRC and initUAT.ora from our Prod system.

Then change the owner of those files to orasid and grant a 777 permission.

then logged to sql,

Run @CONTROL.SQL

Execute RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;

After that,the error appears..

Former Member
0 Kudos

Hi Het,

I have generated the files CONTROL.SQL, CONTROL.TRC and initUAT.ora from our Prod system.

Then change the owner of those files to orasid and grant a 777 permission.

then logged to sql,

Run @CONTROL.SQL

Execute RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;

After that,the error appears..

amigy85
Discoverer
0 Kudos

I have same erro ORA-01201, please can you help me. im runing the comand with DB mounted.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Het and Deepak,

Thank you for your help.

It is indeed a file owner and permission issue.

Some datafiles were not assigned to a correct owner and permission so I have to check every datafile that has been restored to make sure that the datafiles belong to the correct owner and have the right permission.

regards,

Marvin

former_member188883
Active Contributor
0 Kudos

Hi Marvin,

I recently performed database copy of our Prod system to Test system.

Already applied the archive logs in /oracle/SID/oraarch

I guess you have only copied the archive logs to /oracle/SID/oraarch. You need to follow the steps as mentioned below

> Connect "/as sysdba"

SQL> startup mount

SQL> Recover database using backup controlfile until cancel;

Select AUTO so that it picks up the required archive files from oraarch.

In the end you need to open the database using resetlogs option

SQL> Alter database open resetlogs;

Hope this helps.

Regards,

Deepak Kori

Former Member
0 Kudos

Hi Deepak,

I have restored the datafiles from backup prior to running SQL command.

brrestore -b backupfile.ext -m all

all data files from our Prod backup have been copied to our UAT system

again, changed the owner and the permission

then logged as orasid

executed the following steps

1. sqlplus /nolog

2 .connect / as sysdba

3. @CONTROL.SQL

4. recover database using backup controlfile until cancel;

5. errors ORA-00283 and ORA-01201 appeared

former_member188883
Active Contributor
0 Kudos

Hi Marvin,

1) Could you attach  backupfile.ext file

2) Could you share the SCN numbers of archive logs which you have applied using "recover database using backup controlfile until cancel" command

Regards,

Deepak Kori