I want to clone database 1 on machine 1 to database 2 on machine 2.
According to another sr. DBA I have to do "shutdown normal" before doing cold backup,(I don't agreee!!)
as far as I know shutdown immediate should be ok!!!
Note:database 1 is in archive log mode(but shutdown immediate for cold backup)
I want database 2 to be in nonarchivelog mode(test db)
here's what i tried to do:
create a clone DB of an exisiting DB, which i'm pretty sure i shutdown properly (immediate)... i copied all datafiles and redologs, skipped
the control files - ran a script that created control files and mapped the datafiles and redologs - but i keep coming up with this error... any
help would be great, ... thank you in advance...
here's the script (@sycrectl):
CREATE CONTROLFILE set DATABASE "TSTC" RESETLOGS NOARCHIVELOG
GROUP 1 '/u02/oradata/tstc/redo11.dbf' SIZE 5M,
GROUP 2 '/u02/oradata/tstc/redo21.dbf' SIZE 5M,
GROUP 3 '/u02/oradata/tstc/redo31.dbf' SIZE 5M,
GROUP 4 '/u02/oradata/tstc/redo41.dbf' SIZE 5M,
GROUP 5 '/u02/oradata/tstc/redo51.dbf' SIZE 5M
CHARACTER SET US7ASCII
# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
# RECOVER DATABASE
# Database can now be opened normally.
ALTER DATABASE OPEN resetlogs;
# No tempfile entries found to add.
SVRMGR> connect internal
ORACLE instance started.
Total System Global Area 113344192 bytes
Fixed Size 69312 bytes
Variable Size 92704768 bytes
Database Buffers 20480000 bytes
Redo Buffers 90112 bytes
ALTER DATABASE OPEN resetlogs
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u03/oradata/tstc/dbsyst01.dbf'
Jmodic has a point over here. you have to reset your redologs when you are in ARCH log mode and applied recently media recovery. If you are just trying to recreate the control file for clonning and that too in NOARCH log mode... you don't have to RESET logs.
Which makes sence as its pointing to the error in the first file usually system tablespace file.