23 October 2007

On ORA-01503, ORA-01161, ORA-01565, ORA-27038 and ORA-27046

A few days ago, i clonned one oracle database. During the clonning i got some errors. I will explain how i overcome the errors in this post.

 I re-create the control files with following command:

STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "PRODB" RESETLOGS  NOARCHIVELOG
    MAXLOGFILES 4
....
 
But i got the errors:


ORA-01503: CREATE CONTROLFILE failed
ORA-00200: controlfile could not be created
ORA-00202: controlfile: '/dataapp/oracle/oradata/cmps01/control01.ctl'
ORA-27038: created file already exists

 
The error was about, i did not remove old control files. So, i use the keywords "REUSE SET DATABASE" in order to solve problem.

STARTUP NOMOUNT
CREATE CONTROLFILE REUSE SET DATABASE "PRODB" RESETLOGS  NOARCHIVELOG    MAXLOGFILES 4    MAXLOGMEMBERS 4
 ...

Another information, if you do not specify "SET DATABASE" clause you will probably get the these errors:

ORA-01503: CREATE CONTROLFILE failed
ORA-01161: database name prod1 in file header does not match given name of PRODB
ORA-01110: data file 1: '/dataapp/oracle/oradata/PRODB/system01.dbf'

One more thing, clonned the database and i use ftp to upload data files to new host. If i do not make ftp with BINARY mode(use binary ftp command), got :

ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file '/dataapp/oracle/oradata/PRODB/system01.dbf'
ORA-27046: file size is not a multiple of logical block size

No comments: