Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Clone database error: HP-UX Error 22 ORA-27047

SOLVED
Go to solution

Clone database error: HP-UX Error 22 ORA-27047

Hello,

I tried 'clone' a test database to another server but this is happens:

SQL> STARTUP NOMOUNT pfile=/u01/app/oracle/product/9.2.0.1.0/admin/TESTE/pfile/initTESTE.ora;
ORACLE instance started.

Total System Global Area 353856200 bytes
Fixed Size 735944 bytes
Variable Size 184549376 bytes
Database Buffers 167772160 bytes
Redo Buffers 798720 bytes

SQL> CREATE CONTROLFILE REUSE DATABASE "TESTE" RESETLOGS NOARCHIVELOG
MAXLOGFILES 50
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/TESTE/REDO01.LOG' REUSE,
GROUP 2 '/u01/app/oracle/oradata/TESTE/REDO02.LOG' REUSE,
GROUP 3 '/u01/app/oracle/oradata/TESTE/REDO03.LOG' REUSE
DATAFILE
'/u01/app/oracle/oradata/TESTE/SYSTEM01.DBF',
'/u01/app/oracle/oradata/TESTE/UNDOTBS01.DBF',
'/u01/app/oracle/oradata/TESTE/CONT/CONT.ORA',
'/u01/app/oracle/oradata/TESTE/DRSYS01.DBF',
'/u01/app/oracle/oradata/TESTE/EXAMPLE01.DBF',
'/u01/app/oracle/oradata/TESTE/INDX01.DBF',
'/u01/app/oracle/oradata/TESTE/ODM01.DBF',
'/u01/app/oracle/oradata/TESTE/TOOLS01.DBF',
'/u01/app/oracle/oradata/TESTE/USERS01.DBF',
'/u01/app/oracle/oradata/TESTE/XDB01.DBF',
'/u01/app/oracle/oradata/TESTE/GINECO/GINECO.ORA',
'/u01/app/oracle/oradata/TESTE/PESSOAL/PESSOAL.ORA',
'/u01/app/oracle/oradata/TESTE/AUTENTICA/AUTENTICA.ORA',
'/u01/app/oracle/oradata/TESTE/SMART/SMART.ORA',
'/u01/app/oracle/oradata/TESTE/SAFA/SAFA.ORA',
'/u01/app/oracle/oradata/TESTE/ECG/ECG.ORA',
'/u01/app/oracle/oradata/TESTE/AIH/AIH.ORA',
'/u01/app/oracle/oradata/TESTE/SAFA_OLD/SAFA_OLD.ORA',
'/u01/app/oracle/oradata/TESTE/EEG/EEG.ORA',
'/u01/app/oracle/oradata/TESTE/SICOM/SICOM.ORA',
'/u01/app/oracle/oradata/TESTE/SCT/SCT.ORA',
'/u01/app/oracle/oradata/TESTE/MATERIAL/MATERIAL.DBF',
'/u01/app/oracle/oradata/TESTE/ATEND/ATEND.ORA',
'/u01/app/oracle/oradata/TESTE/HEMATOLOGIA/HEMATO.ORA'
CHARACTER SET WE8MSWIN1252;
CREATE CONTROLFILE REUSE DATABASE "TESTE" RESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file
'/u01/app/oracle/oradata/TESTE/SYSTEM01.DBF'
ORA-27047: unable to read the header block of file
HP-UX Error: 22: Invalid argument
Additional information: 2

SQL> exit
Disconnected from Oracle9i Release 9.2.0.1.0 - 64bit Production
JServer Release 9.2.0.1.0 - Production
$ touch /u01/app/oracle/oradata/TESTE/SYSTEM01.DBF
$ ll /u01/app/oracle/oradata/TESTE/SYSTEM01.DBF
-rwxrwxrwx 1 oracle dba 450895872 May 31 10:39 /u01/app/oracle/oradata/TESTE/SYSTEM01.DBF
$
10 REPLIES
Steven E. Protter
Exalted Contributor
Solution

Re: Clone database error: HP-UX Error 22 ORA-27047

General suggestions:

1) Make sure oracle patch level is the same on both systems.
2) Make sure the init.ora files are compatible and consistent.
3) Check the control file configuration and make sure that will work for the clone.

My last shop, we cloned oracle databases all the time.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
TwoProc
Honored Contributor

Re: Clone database error: HP-UX Error 22 ORA-27047

Usually that's a permissions issue. I see that you've already listed the permissions of the data file - but what about the the full path to this directory? Can the user "oracle" get to the each directory (at least for read) all the way down to the data file?
We are the people our parents warned us about --Jimmy Buffett
Jean-Luc Oudart
Honored Contributor

Re: Clone database error: HP-UX Error 22 ORA-27047

Hi

did you make any change in the target initTESTE.ora file ?
do you have same value for db_block_size in source & target initXXXX.ora file ?

Regards
Jean-Luc
fiat lux
Eric Antunes
Honored Contributor

Re: Clone database error: HP-UX Error 22 ORA-27047

Hi Augusto,

Try this modified script:

STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE SET "TESTE" RESETLOGS NOARCHIVELOG -- HERE YOU MISSED THE "SET" PART
MAXLOGFILES 50
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/TESTE/REDO01.LOG',
GROUP 2 '/u01/app/oracle/oradata/TESTE/REDO02.LOG',
GROUP 3 '/u01/app/oracle/oradata/TESTE/REDO03.LOG' -- HERE REMOVE THE REUSE PART
DATAFILE
'/u01/app/oracle/oradata/TESTE/SYSTEM01.DBF',
'/u01/app/oracle/oradata/TESTE/UNDOTBS01.DBF',
'/u01/app/oracle/oradata/TESTE/CONT/CONT.ORA',
'/u01/app/oracle/oradata/TESTE/DRSYS01.DBF',
'/u01/app/oracle/oradata/TESTE/EXAMPLE01.DBF',
'/u01/app/oracle/oradata/TESTE/INDX01.DBF',
'/u01/app/oracle/oradata/TESTE/ODM01.DBF',
'/u01/app/oracle/oradata/TESTE/TOOLS01.DBF',
'/u01/app/oracle/oradata/TESTE/USERS01.DBF',
'/u01/app/oracle/oradata/TESTE/XDB01.DBF',
'/u01/app/oracle/oradata/TESTE/GINECO/GINECO.ORA',
'/u01/app/oracle/oradata/TESTE/PESSOAL/PESSOAL.ORA',
'/u01/app/oracle/oradata/TESTE/AUTENTICA/AUTENTICA.ORA',
'/u01/app/oracle/oradata/TESTE/SMART/SMART.ORA',
'/u01/app/oracle/oradata/TESTE/SAFA/SAFA.ORA',
'/u01/app/oracle/oradata/TESTE/ECG/ECG.ORA',
'/u01/app/oracle/oradata/TESTE/AIH/AIH.ORA',
'/u01/app/oracle/oradata/TESTE/SAFA_OLD/SAFA_OLD.ORA',
'/u01/app/oracle/oradata/TESTE/EEG/EEG.ORA',
'/u01/app/oracle/oradata/TESTE/SICOM/SICOM.ORA',
'/u01/app/oracle/oradata/TESTE/SCT/SCT.ORA',
'/u01/app/oracle/oradata/TESTE/MATERIAL/MATERIAL.DBF',
'/u01/app/oracle/oradata/TESTE/ATEND/ATEND.ORA',
'/u01/app/oracle/oradata/TESTE/HEMATOLOGIA/HEMATO.ORA'
CHARACTER SET WE8MSWIN1252;
RECOVER DATABASE; -- HERE EVEN IF YOU GET AN ERROR, CONTINUE:
ALTER DATABASE OPEN RESETLOGS;


Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Volker Borowski
Honored Contributor

Re: Clone database error: HP-UX Error 22 ORA-27047

Hi,

I think it must be

..... SET DATABASE "TESTE" ....

In addition check /u01/app/oracle/product/9.2.0.1.0/admin/TESTE/pfile/initTESTE.ora

for the control_files parameter and check each controlfile for permission and freespace.

Hope this helps
Volker
Eric Antunes
Honored Contributor

Re: Clone database error: HP-UX Error 22 ORA-27047

Volker,

I don't do this for a long time but the script I used at the time (Oracle 8.0.5) has:

CREATE CONTROLFILE REUSE DATABASE SET RESETLOGS NOARCHIVELOG

On the source database (Production?) the backup controlfile to trace MUST BE DONE ON MOUNT MODE (NOT OPEN)...

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
renarios
Trusted Contributor

Re: Clone database error: HP-UX Error 22 ORA-27047

Hi Augusto,

Since you are using Oracle 9i, think about using RMAN for backing up and cloning databases. It's a great tool, which enables you to clone and/or copy without need of shutting down your source database.

Cheers,

Renarios
Nothing is more successfull as failure

Re: Clone database error: HP-UX Error 22 ORA-27047

First, thank you all for your replies. Look: the source dabadase is in a Win2000 server and the target is in a hpux server. Is it any problem?
Jean-Luc Oudart
Honored Contributor

Re: Clone database error: HP-UX Error 22 ORA-27047

Augusto,

The platforms are different, you cannot clone the database this way. You must 1st create a database on HPUX,export the database from WIN2000 and then import into the new database.

Regards
Jean-Luc
fiat lux

Re: Clone database error: HP-UX Error 22 ORA-27047

Sorry guys, I do not explained this before. This is my mistake. Thank you for your answers.
Bye.