Schema.
I want to clone in new instance ( different server ) but i'm forget to run adpreclone.sh first so in my appsutil there's no adcfgclone.sh
my detail machine :
OEL 4.8
oracle DB 10.2.0.4
. this how to solve that problems :
Step 1 :
Copy all your data file ( index,log,data) to new instance ( DEV )
i put on /db/data
first create you control file script :
CREATE CONTROLFILE SET DATABASE "DEV" RESETLOGS NOARCHIVELOG
-- SET STANDBY TO MAXIMIZE PERFORMANCE
MAXLOGFILES 32
MAXLOGMEMBERS 5
MAXDATAFILES 600
MAXINSTANCES 8
MAXLOGHISTORY 7260
LOGFILE
GROUP 1 (
'/db/data/log/log1a.dbf',
'/db/data/log/log1b.dbf'
) SIZE 10M,
GROUP 2 (
'/db/data/log/log2a.dbf',
'/db/data/log/log2b.dbf'
) SIZE 10M,
GROUP 3 (
'/db/data/log/log3a.dbf',
'/db/data/log/log3b.dbf'
) SIZE 10M,
GROUP 4 (
'/db/data/log/log4a.dbf',
'/db/data/log/log4b.dbf'
) SIZE 10M
-- STANDBY LOGFILE
DATAFILE
'/db/data/data/APPS_TS_ARCHIVE01.dbf',
'/db/data/data/APPS_TS_INTERFACE01.dbf',
'/db/data/data/APPS_TS_MEDIA01.dbf',
'/db/data/data/APPS_TS_NOLOGGING01.dbf',
'/db/data/data/APPS_TS_QUEUES01.dbf',
'/db/data/data/APPS_TS_SEED01.dbf',
'/db/data/data/APPS_TS_SUMMARY01.dbf',
'/db/data/data/APPS_TS_TOOLS01.dbf',
'/db/data/data/APPS_TS_TX_DATA01.dbf',
'/db/data/data/APPS_TS_TX_DATA02.dbf',
'/db/data/data/APPS_TS_TX_DATA03.dbf',
'/db/data/data/APPS_TS_TX_IDX01.dbf',
'/db/data/data/APPS_TS_TX_IDX02.dbf',
'/db/data/data/APPS_UNDOTBS01.DBF',
'/db/data/data/APPS_UNDOTBS02.DBF',
'/db/data/data/APPS_UNDOTBS03.DBF',
'/db/data/data/DISCO_D.DBF',
'/db/data/data/PORTAL01.DBF',
'/db/data/data/SYSAUX01.DBF'
'/db/data/data/SYSTEM01.DBF',
'/db/data/data/SYSTEM02.DBF',
'/db/data/data/SYSTEM03.DBF',
'/db/data/data/SYSTEM04.DBF',
'/db/data/data/SYSTEM05.DBF',
'/db/data/data/SYSTEM06.DBF',
'/db/data/data/SYSTEM07.DBF',
'/db/data/data/SYSTEM08.DBF',
'/db/data/data/SYSTEM09.DBF'
CHARACTER SET US7ASCII;
*save with name ctl.sql and put in /db/
on my DEV run my env ( i create manually )
example :
export ORACLE_HOME=/db/DEV/product/10.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=DEV
so i can start my sqlplus :
sqlplus "/as sysdba"
startup nomount
@/db/ctl.sql
i'm facing this problem when running sql script:
CREATE CONTROLFILE SET DATABASE "DEV" RESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-00200: control file could not be created
ORA-00202: control file: '/proddata/DEV/data/control01.ctl'
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory
causes :
my spfile control file value still target to folder old instance.
solving :
change spfile control file value to new instance.
under my $ORACLE_HOME/dbs
create pfile='initDEV.ora' from spfile;
Before edit :
*.control_files='/proddata/DEV/data/control01.ctl','/proddata/DEV/data/control02.ctl','/proddata/DEV/data/control03.ctl'
after edit :
*.control_files='/db/data/index/control01.ctl','/db/data/index/control02.ctl','/db/data/index/control03.ctl'
then :
startup nomount pfile='initDEV.ora'
create spfile='spfileDEV.ora' from pfile='initDEV.ora';
@/db/ctl.sql
i'm facing this problem when running sql script:
CREATE CONTROLFILE SET DATABASE "DEV" RESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-00200: control file could not be created
ORA-00202: control file: '/db/data/index/control01.ctl'
ORA-27038: created file already exists
Additional information: 1
Causes :
my control file exists
Solve :
delete all my control file.
then running again the "ctl.sql"
alter
database open resetlogs;
alter
tablespace temp add tempfile '/db/data/data/TEMP01.dbf' reuse;
alter tablespace temp add tempfile '/db/data/data/TEMP02.dbf' reuse;
alter tablespace temp add tempfile '/db/data/data/TEMP03.dbf' reuse;
That all step for recreate control file.
Thanks,
Mahardika Dwi Hananto