Sequence in Control File
How to create sequence in control file from command prompt.
Pl post details of OS and database versions. Check the docs - http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/ldr_field_list.htm#i1008320
HTH
Srini
Similar Messages
-
Can I call sequence from Control file( Sql Loader)
Plz help.As an option to what Warren suggested, you can also specify an actual sequence name in the control file itself.
LOAD DATA
INFILE datafile.dat
APPEND
INTO TABLE <table_name>
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
(<column_name> CHAR,
<column_name> CHAR,
<column_name> "seq_name.nextval") -
How to Use Sequence created in Oracle Database in SQL Ldr Control file
Hi,
I created a sequence in oracle database. How will use the sequence in SQL loader Control file.
Thanks in advanceHi,
You might get a good response to your post in the forum dedicated to data movement , including SQL*Loader . You can find it here Export/Import/SQL Loader & External Tables
Regards, -
Who writes LOG SEQUENCE NUMBER to CONTROL FILE,whether CKPT or LGWR process
I am in confusion that,
When log switch occurs that time Log sequence no. is generated by LGWR. then after who writes that LSN to CONTROL FILE whether Checkpoint or LGWR.
Please provide me proper answer with example.....I notice by using fuser on a controlfile on hp-ux, a number of processes keep the controlfile open. So it would make sense that the one that writes logs would write log sequence numbers to the controlfile too.
$ for z in `/usr/sbin/fuser control03.ctl|awk ' {x=split($0,args); for (i=2;i<=x;i++){print args[i]}}'`
do
ps -efx|grep $z|grep -v grep
done
control03.ctl: oooooooooo
oracle 27129 1 0 Sep 5 ? 12:15 ora_arc1_TPRD
oracle 27073 1 0 Sep 5 ? 52:45 ora_dbw0_TPRD
oracle 27127 1 0 Sep 5 ? 10:52 ora_arc0_TPRD
oracle 9485 1 0 Nov 3 ? 9:14 oracleTPRD (LOCAL=NO)
oracle 22395 1 0 08:36:22 ? 0:24 oracleTPRD (LOCAL=NO)
oracle 27075 1 0 Sep 5 ? 68:53 ora_lgwr_TPRD
oracle 22116 1 0 08:33:24 ? 1:06 oracleTPRD (LOCAL=NO)
oracle 27077 1 0 Sep 5 ? 41:05 ora_ckpt_TPRD
oracle 26510 1 0 Nov 30 ? 21:26 oracleTPRD (LOCAL=NO) -
Hi All,
11.2.0.1 on AIX 7.1 and Level 0 happens on every SATURDAY and L1 backup run every day.
We are using following script for level0 RMAN backup:
RUN {
SHOW ALL;
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
ALLOCATE CHANNEL ch1 TYPE DISK;
ALLOCATE CHANNEL ch2 TYPE DISK;
ALLOCATE CHANNEL ch3 TYPE DISK;
ALLOCATE CHANNEL ch4 TYPE DISK;
BACKUP FORMAT '/oraclebackup/HFM11PROD/DF_L0_%d_%D%M%Y_%u_%s_%p' INCREMENTAL LEVEL 0 AS COMPRESSED BACKUPSET DATABASE TAG='LEVEL0';
BACKUP FORMAT '/oraclebackup/HFM11PROD/ARC_L0_%d_%D%M%Y_%u_%s_%p' ARCHIVELOG ALL NOT BACKED UP 2 TIMES TAG='LEVEL0';
BACKUP FORMAT '/oraclebackup/HFM11PROD/CF_L0_%d_%D%M%Y_%u_%s_%p' CURRENT CONTROLFILE TAG='LEVEL0';
BACKUP FORMAT '/oraclebackup/HFM11PROD/SP_L0_%d_%D%M%Y_%u_%s_%p' SPFILE TAG='LEVEL0';
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT OBSOLETE;
RELEASE CHANNEL ch1;
RELEASE CHANNEL ch2;
RELEASE CHANNEL ch3;
RELEASE CHANNEL ch4;
}Now backup logs shows that we have backup of control file in two backup pieces : One implicitly in a backup piece DF_L0_HFM11PRD_10112012_l8npv5b6_13992_1
and other one is explicitly in CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1 .
RMAN> RUN {
2> SHOW ALL;
3> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
4> CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
5> ALLOCATE CHANNEL ch1 TYPE DISK;
6> ALLOCATE CHANNEL ch2 TYPE DISK;
7> ALLOCATE CHANNEL ch3 TYPE DISK;
8> ALLOCATE CHANNEL ch4 TYPE DISK;
9> BACKUP FORMAT '/oraclebackup/HFM11PROD/DF_L0_%d_%D%M%Y_%u_%s_%p' INCREMENTAL LEVEL 0 AS COMPRESSED BACKUPSET DATABASE TAG='LEVEL0';
10> BACKUP FORMAT '/oraclebackup/HFM11PROD/ARC_L0_%d_%D%M%Y_%u_%s_%p' ARCHIVELOG ALL NOT BACKED UP 2 TIMES TAG='LEVEL0';
11> BACKUP FORMAT '/oraclebackup/HFM11PROD/CF_L0_%d_%D%M%Y_%u_%s_%p' CURRENT CONTROLFILE TAG='LEVEL0';
12> BACKUP FORMAT '/oraclebackup/HFM11PROD/SP_L0_%d_%D%M%Y_%u_%s_%p' SPFILE TAG='LEVEL0';
13> CROSSCHECK ARCHIVELOG ALL;
14> DELETE NOPROMPT OBSOLETE;
15> RELEASE CHANNEL ch1;
16> RELEASE CHANNEL ch2;
17> RELEASE CHANNEL ch3;
18> RELEASE CHANNEL ch4;
19> }
RMAN configuration parameters for database with db_unique_name HFM11PRD are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/orahyp_p/product/11.2/dbs/snapcf_HFM11PRD.f'; # default
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
allocated channel: ch1
channel ch1: SID=1210 device type=DISK
allocated channel: ch2
channel ch2: SID=1477 device type=DISK
allocated channel: ch3
channel ch3: SID=66 device type=DISK
allocated channel: ch4
channel ch4: SID=1156 device type=DISK
Starting backup at 10-NOV-12
channel ch1: starting compressed incremental level 0 datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u04/oradata/HFM11PRD/system01.dbf
input datafile file number=00008 name=/u04/oradata/HFM11PRD/EPM_HFM4.DBF
input datafile file number=00012 name=/u04/oradata/HFM11PRD/EPM_HFM8.DBF
input datafile file number=00017 name=/u04/oradata/HFM11PRD/EPM_HFM12.DBF
input datafile file number=00004 name=/u04/oradata/HFM11PRD/EPM_HSS1.DBF
input datafile file number=00020 name=/u04/oradata/HFM11PRD/EPM_HFM3.DBF
channel ch1: starting piece 1 at 10-NOV-12
channel ch2: starting compressed incremental level 0 datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00003 name=/u04/oradata/HFM11PRD/undots01.dbf
input datafile file number=00009 name=/u04/oradata/HFM11PRD/EPM_HFM5.DBF
input datafile file number=00013 name=/u04/oradata/HFM11PRD/EPM_HFM9.DBF
input datafile file number=00018 name=/u04/oradata/HFM11PRD/EPM_HFM13.DBF
input datafile file number=00005 name=/u04/oradata/HFM11PRD/EPM_BI1.DBF
input datafile file number=00021 name=/u04/oradata/HFM11PRD/EPM_HFM15.DBF
channel ch2: starting piece 1 at 10-NOV-12
channel ch3: starting compressed incremental level 0 datafile backup set
channel ch3: specifying datafile(s) in backup set
input datafile file number=00007 name=/u04/oradata/HFM11PRD/EPM_HFM2.DBF
input datafile file number=00011 name=/u04/oradata/HFM11PRD/EPM_HFM7.DBF
input datafile file number=00016 name=/u04/oradata/HFM11PRD/EPM_HFM11.DBF
input datafile file number=00002 name=/u04/oradata/HFM11PRD/sysaux01.dbf
input datafile file number=00022 name=/u04/oradata/HFM11PRD/EPM_HSS_new1.DBF
channel ch3: starting piece 1 at 10-NOV-12
channel ch4: starting compressed incremental level 0 datafile backup set
channel ch4: specifying datafile(s) in backup set
input datafile file number=00006 name=/u04/oradata/HFM11PRD/EPM_HFM1.DBF
input datafile file number=00010 name=/u04/oradata/HFM11PRD/EPM_HFM6.DBF
input datafile file number=00015 name=/u04/oradata/HFM11PRD/EPM_HFM10.DBF
input datafile file number=00019 name=/u04/oradata/HFM11PRD/EPM_HFM14.DBF
input datafile file number=00014 name=/u04/oradata/HFM11PRD/userdata01.dbf
channel ch4: starting piece 1 at 10-NOV-12
channel ch2: finished piece 1 at 10-NOV-12
_*piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_l8npv5b6_13992_1 tag=LEVEL0 comment=NONE*_
channel ch2: backup set complete, elapsed time: 00:10:46
channel ch2: starting compressed incremental level 0 datafile backup set
channel ch2: specifying datafile(s) in backup set
_*including current control file in backup set*channel ch2: starting piece 1 at 10-NOV-12_
channel ch2: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_lbnpv5vc_13995_1 tag=LEVEL0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:01
channel ch2: starting compressed incremental level 0 datafile backup set
channel ch2: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ch2: starting piece 1 at 10-NOV-12
channel ch2: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_lcnpv5ve_13996_1 tag=LEVEL0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:01
channel ch1: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_l7npv5b6_13991_1 tag=LEVEL0 comment=NONE
channel ch1: backup set complete, elapsed time: 00:11:03
channel ch4: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_lanpv5b7_13994_1 tag=LEVEL0 comment=NONE
channel ch4: backup set complete, elapsed time: 00:11:32
channel ch3: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L0_HFM11PRD_10112012_l9npv5b6_13993_1 tag=LEVEL0 comment=NONE
channel ch3: backup set complete, elapsed time: 00:11:52
Finished backup at 10-NOV-12
Starting backup at 10-NOV-12
current log archived
channel ch1: starting compressed archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=1 sequence=40007 RECID=40001 STAMP=798971664
input archived log thread=1 sequence=40008 RECID=40002 STAMP=798972711
input archived log thread=1 sequence=40009 RECID=40003 STAMP=798973470
input archived log thread=1 sequence=40010 RECID=40004 STAMP=798974835
input archived log thread=1 sequence=40011 RECID=40005 STAMP=798975943
channel ch1: starting piece 1 at 10-NOV-12
channel ch2: starting compressed archived log backup set
channel ch2: specifying archived log(s) in backup set
input archived log thread=1 sequence=40012 RECID=40006 STAMP=798976804
input archived log thread=1 sequence=40013 RECID=40007 STAMP=798977866
input archived log thread=1 sequence=40014 RECID=40008 STAMP=798978754
input archived log thread=1 sequence=40015 RECID=40009 STAMP=798980083
input archived log thread=1 sequence=40016 RECID=40010 STAMP=798981194
channel ch2: starting piece 1 at 10-NOV-12
channel ch3: starting compressed archived log backup set
channel ch3: specifying archived log(s) in backup set
input archived log thread=1 sequence=40017 RECID=40011 STAMP=798982283
input archived log thread=1 sequence=40018 RECID=40012 STAMP=798983171
input archived log thread=1 sequence=40019 RECID=40013 STAMP=798984077
input archived log thread=1 sequence=40020 RECID=40014 STAMP=798985146
input archived log thread=1 sequence=40021 RECID=40015 STAMP=798985212
channel ch3: starting piece 1 at 10-NOV-12
channel ch4: starting compressed archived log backup set
channel ch4: specifying archived log(s) in backup set
input archived log thread=1 sequence=40022 RECID=40016 STAMP=798985214
input archived log thread=1 sequence=40023 RECID=40017 STAMP=798985992
input archived log thread=1 sequence=40024 RECID=40018 STAMP=798987561
input archived log thread=1 sequence=40025 RECID=40019 STAMP=798988338
channel ch4: starting piece 1 at 10-NOV-12
channel ch4: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/ARC_L0_HFM11PRD_10112012_lgnpv61k_14000_1 tag=LEVEL0 comment=NONE
channel ch4: backup set complete, elapsed time: 00:00:15
channel ch1: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/ARC_L0_HFM11PRD_10112012_ldnpv61j_13997_1 tag=LEVEL0 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:26
channel ch2: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/ARC_L0_HFM11PRD_10112012_lenpv61j_13998_1 tag=LEVEL0 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:26
channel ch3: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/ARC_L0_HFM11PRD_10112012_lfnpv61j_13999_1 tag=LEVEL0 comment=NONE
channel ch3: backup set complete, elapsed time: 00:00:25
Finished backup at 10-NOV-12
Starting backup at 10-NOV-12
channel ch1: starting compressed full datafile backup set
channel ch1: specifying datafile(s) in backup set
_*including current control file in backup set*_
channel ch1: starting piece 1 at 10-NOV-12
channel ch1: finished piece 1 at 10-NOV-12
_*piece handle=/oraclebackup/HFM11PROD/CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1 tag=LEVEL0 comment=NONE*_channel ch1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-NOV-12
Starting backup at 10-NOV-12
channel ch1: starting compressed full datafile backup set
channel ch1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ch1: starting piece 1 at 10-NOV-12
channel ch1: finished piece 1 at 10-NOV-12
piece handle=/oraclebackup/HFM11PROD/SP_L0_HFM11PRD_10112012_linpv62i_14002_1 tag=LEVEL0 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-NOV-12Following is the script of Leve 1 RMAN backup.
RUN {
SHOW ALL;
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
ALLOCATE CHANNEL ch1 TYPE DISK;
ALLOCATE CHANNEL ch2 TYPE DISK;
ALLOCATE CHANNEL ch3 TYPE DISK;
ALLOCATE CHANNEL ch4 TYPE DISK;
BACKUP FORMAT '/oraclebackup/HFM11PROD/DF_L1_%d_%D%M%Y_%u_%s_%p' INCREMENTAL LEVEL 1 AS COMPRESSED BACKUPSET DATABASE TAG='LEVEL1';
BACKUP FORMAT '/oraclebackup/HFM11PROD/ARC_L1_%d_%D%M%Y_%u_%s_%p' ARCHIVELOG ALL NOT BACKED UP 2 TIMES TAG='LEVEL1';
CROSSCHECK ARCHIVELOG ALL;
DELETE NOPROMPT OBSOLETE;
RELEASE CHANNEL ch1;
RELEASE CHANNEL ch2;
RELEASE CHANNEL ch3;
RELEASE CHANNEL ch4;
}Following is the log from Level 1 backup which shows that it has marked the backup of control file in backup piece CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1 as obsolete and deleted.
RMAN> RUN {
2> SHOW ALL;
3> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
4> ALLOCATE CHANNEL ch1 TYPE DISK;
5> ALLOCATE CHANNEL ch2 TYPE DISK;
6> ALLOCATE CHANNEL ch3 TYPE DISK;
7> ALLOCATE CHANNEL ch4 TYPE DISK;
8> BACKUP FORMAT '/oraclebackup/HFM11PROD/DF_L1_%d_%D%M%Y_%u_%s_%p' INCREMENTAL LEVEL 1 AS COMPRESSED BACKUPSET DATABASE TAG='LEVEL1';
9> BACKUP FORMAT '/oraclebackup/HFM11PROD/ARC_L1_%d_%D%M%Y_%u_%s_%p' ARCHIVELOG ALL NOT BACKED UP 2 TIMES TAG='LEVEL1';
10> CROSSCHECK ARCHIVELOG ALL;
11> DELETE NOPROMPT OBSOLETE;
12> RELEASE CHANNEL ch1;
13> RELEASE CHANNEL ch2;
14> RELEASE CHANNEL ch3;
15> RELEASE CHANNEL ch4;
16> }
RMAN configuration parameters for database with db_unique_name HFM11PRD are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/orahyp_p/product/11.2/dbs/snapcf_HFM11PRD.f'; # default
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
allocated channel: ch1
channel ch1: SID=1718 device type=DISK
allocated channel: ch2
channel ch2: SID=1499 device type=DISK
allocated channel: ch3
channel ch3: SID=119 device type=DISK
allocated channel: ch4
channel ch4: SID=1166 device type=DISK
Starting backup at 12-NOV-12
channel ch1: starting compressed incremental level 1 datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u04/oradata/HFM11PRD/system01.dbf
input datafile file number=00008 name=/u04/oradata/HFM11PRD/EPM_HFM4.DBF
input datafile file number=00012 name=/u04/oradata/HFM11PRD/EPM_HFM8.DBF
input datafile file number=00017 name=/u04/oradata/HFM11PRD/EPM_HFM12.DBF
input datafile file number=00004 name=/u04/oradata/HFM11PRD/EPM_HSS1.DBF
input datafile file number=00020 name=/u04/oradata/HFM11PRD/EPM_HFM3.DBF
channel ch1: starting piece 1 at 12-NOV-12
channel ch2: starting compressed incremental level 1 datafile backup set
channel ch2: specifying datafile(s) in backup set
input datafile file number=00003 name=/u04/oradata/HFM11PRD/undots01.dbf
input datafile file number=00009 name=/u04/oradata/HFM11PRD/EPM_HFM5.DBF
input datafile file number=00013 name=/u04/oradata/HFM11PRD/EPM_HFM9.DBF
input datafile file number=00018 name=/u04/oradata/HFM11PRD/EPM_HFM13.DBF
input datafile file number=00005 name=/u04/oradata/HFM11PRD/EPM_BI1.DBF
input datafile file number=00021 name=/u04/oradata/HFM11PRD/EPM_HFM15.DBF
channel ch2: starting piece 1 at 12-NOV-12
channel ch3: starting compressed incremental level 1 datafile backup set
channel ch3: specifying datafile(s) in backup set
input datafile file number=00007 name=/u04/oradata/HFM11PRD/EPM_HFM2.DBF
input datafile file number=00011 name=/u04/oradata/HFM11PRD/EPM_HFM7.DBF
input datafile file number=00016 name=/u04/oradata/HFM11PRD/EPM_HFM11.DBF
input datafile file number=00002 name=/u04/oradata/HFM11PRD/sysaux01.dbf
input datafile file number=00022 name=/u04/oradata/HFM11PRD/EPM_HSS_new1.DBF
channel ch3: starting piece 1 at 12-NOV-12
channel ch4: starting compressed incremental level 1 datafile backup set
channel ch4: specifying datafile(s) in backup set
input datafile file number=00006 name=/u04/oradata/HFM11PRD/EPM_HFM1.DBF
input datafile file number=00010 name=/u04/oradata/HFM11PRD/EPM_HFM6.DBF
input datafile file number=00015 name=/u04/oradata/HFM11PRD/EPM_HFM10.DBF
input datafile file number=00019 name=/u04/oradata/HFM11PRD/EPM_HFM14.DBF
input datafile file number=00014 name=/u04/oradata/HFM11PRD/userdata01.dbf
channel ch4: starting piece 1 at 12-NOV-12
channel ch1: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_lvnq4e3a_14015_1 tag=LEVEL1 comment=NONE
channel ch1: backup set complete, elapsed time: 00:01:36
channel ch1: starting compressed incremental level 1 datafile backup set
channel ch1: specifying datafile(s) in backup set
channel ch4: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m2nq4e3a_14018_1 tag=LEVEL1 comment=NONE
channel ch4: backup set complete, elapsed time: 00:01:35
channel ch4: starting compressed incremental level 1 datafile backup set
channel ch4: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ch4: starting piece 1 at 12-NOV-12
including current control file in backup set
channel ch1: starting piece 1 at 12-NOV-12
channel ch1: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m3nq4e6a_14019_1 tag=LEVEL1 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
channel ch4: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m4nq4e6a_14020_1 tag=LEVEL1 comment=NONE
channel ch4: backup set complete, elapsed time: 00:00:01
channel ch3: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m1nq4e3a_14017_1 tag=LEVEL1 comment=NONE
channel ch3: backup set complete, elapsed time: 00:01:39
channel ch2: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/DF_L1_HFM11PRD_12112012_m0nq4e3a_14016_1 tag=LEVEL1 comment=NONE
channel ch2: backup set complete, elapsed time: 00:02:41
Finished backup at 12-NOV-12
Starting backup at 12-NOV-12
current log archived
channel ch1: starting compressed archived log backup set
channel ch1: specifying archived log(s) in backup set
input archived log thread=1 sequence=40201 RECID=40195 STAMP=799144567
input archived log thread=1 sequence=40202 RECID=40196 STAMP=799145383
input archived log thread=1 sequence=40203 RECID=40197 STAMP=799146296
input archived log thread=1 sequence=40204 RECID=40198 STAMP=799147040
input archived log thread=1 sequence=40205 RECID=40199 STAMP=799147640
input archived log thread=1 sequence=40206 RECID=40200 STAMP=799148271
channel ch1: starting piece 1 at 12-NOV-12
channel ch2: starting compressed archived log backup set
channel ch2: specifying archived log(s) in backup set
input archived log thread=1 sequence=40207 RECID=40201 STAMP=799149018
input archived log thread=1 sequence=40208 RECID=40202 STAMP=799150009
input archived log thread=1 sequence=40209 RECID=40203 STAMP=799150549
input archived log thread=1 sequence=40210 RECID=40204 STAMP=799151041
input archived log thread=1 sequence=40211 RECID=40205 STAMP=799151860
input archived log thread=1 sequence=40212 RECID=40206 STAMP=799152535
channel ch2: starting piece 1 at 12-NOV-12
channel ch3: starting compressed archived log backup set
channel ch3: specifying archived log(s) in backup set
input archived log thread=1 sequence=40213 RECID=40207 STAMP=799153553
input archived log thread=1 sequence=40214 RECID=40208 STAMP=799153980
input archived log thread=1 sequence=40215 RECID=40209 STAMP=799154283
input archived log thread=1 sequence=40216 RECID=40210 STAMP=799155243
input archived log thread=1 sequence=40217 RECID=40211 STAMP=799155964
input archived log thread=1 sequence=40218 RECID=40212 STAMP=799156899
channel ch3: starting piece 1 at 12-NOV-12
channel ch4: starting compressed archived log backup set
channel ch4: specifying archived log(s) in backup set
input archived log thread=1 sequence=40219 RECID=40213 STAMP=799157722
input archived log thread=1 sequence=40220 RECID=40214 STAMP=799158015
input archived log thread=1 sequence=40221 RECID=40215 STAMP=799158018
input archived log thread=1 sequence=40222 RECID=40216 STAMP=799158847
input archived log thread=1 sequence=40223 RECID=40217 STAMP=799159640
input archived log thread=1 sequence=40224 RECID=40218 STAMP=799160590
channel ch4: starting piece 1 at 12-NOV-12
channel ch4: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/ARC_L1_HFM11PRD_12112012_m8nq4e8h_14024_1 tag=LEVEL1 comment=NONE
channel ch4: backup set complete, elapsed time: 00:00:25
channel ch1: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/ARC_L1_HFM11PRD_12112012_m5nq4e8g_14021_1 tag=LEVEL1 comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:36
channel ch2: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/ARC_L1_HFM11PRD_12112012_m6nq4e8g_14022_1 tag=LEVEL1 comment=NONE
channel ch2: backup set complete, elapsed time: 00:00:36
channel ch3: finished piece 1 at 12-NOV-12
piece handle=/oraclebackup/HFM11PROD/ARC_L1_HFM11PRD_12112012_m7nq4e8g_14023_1 tag=LEVEL1 comment=NONE
channel ch3: backup set complete, elapsed time: 00:00:35
Finished backup at 12-NOV-12
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402011737949656.ARC RECID=40195 STAMP=799144567
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402021737949656.ARC RECID=40196 STAMP=799145383
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402031737949656.ARC RECID=40197 STAMP=799146296
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402041737949656.ARC RECID=40198 STAMP=799147040
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402051737949656.ARC RECID=40199 STAMP=799147640
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402061737949656.ARC RECID=40200 STAMP=799148271
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402071737949656.ARC RECID=40201 STAMP=799149018
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402081737949656.ARC RECID=40202 STAMP=799150009
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402091737949656.ARC RECID=40203 STAMP=799150549
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402101737949656.ARC RECID=40204 STAMP=799151041
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402111737949656.ARC RECID=40205 STAMP=799151860
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402121737949656.ARC RECID=40206 STAMP=799152535
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402131737949656.ARC RECID=40207 STAMP=799153553
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402141737949656.ARC RECID=40208 STAMP=799153980
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402151737949656.ARC RECID=40209 STAMP=799154283
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402161737949656.ARC RECID=40210 STAMP=799155243
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402171737949656.ARC RECID=40211 STAMP=799155964
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402181737949656.ARC RECID=40212 STAMP=799156899
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402191737949656.ARC RECID=40213 STAMP=799157722
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402201737949656.ARC RECID=40214 STAMP=799158015
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402211737949656.ARC RECID=40215 STAMP=799158018
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402221737949656.ARC RECID=40216 STAMP=799158847
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402231737949656.ARC RECID=40217 STAMP=799159640
validation succeeded for archived log
archived log file name=/u05/oradata/HFM11PRD/HFM11PRD_402241737949656.ARC RECID=40218 STAMP=799160590
Crosschecked 24 objects
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
Backup Set 18521832 10-NOV-12
Backup Piece 18521838 10-NOV-12 /oraclebackup/HFM11PROD/CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1
Backup Set 18521846 10-NOV-12
Backup Piece 18521848 10-NOV-12 /oraclebackup/HFM11PROD/SP_L0_HFM11PRD_10112012_linpv62i_14002_1
deleted backup piece
backup piece handle=/oraclebackup/HFM11PROD/CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1 RECID=14000 STAMP=798988367
deleted backup piece
backup piece handle=/oraclebackup/HFM11PROD/SP_L0_HFM11PRD_10112012_linpv62i_14002_1 RECID=14001 STAMP=798988370
Deleted 2 objects
released channel: ch1
released channel: ch2
released channel: ch3
released channel: ch4
RMAN> exit;Now, on Friday when i am trying to do a restore for this database on another server i am getting error as below. Restore script is as below.
run
allocate AUXILIARY channel c1 device type disk;
allocate AUXILIARY channel c2 device type disk;
allocate AUXILIARY channel c3 device type disk;
allocate AUXILIARY channel c4 device type disk;
set until scn 699575816;
duplicate target database to HFM11TMP;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}Error is as:
sql clone "alter system set db_unique_name =
''HFM11TMP'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone primary controlfile;
alter clone database mount;
executing Memory Script
executing command: SET until clause
sql statement: alter system set db_name = ''HFM11PRD'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''HFM11TMP'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 4275781632 bytes
Fixed Size 2213632 bytes
Variable Size 2298480896 bytes
Database Buffers 1962934272 bytes
Redo Buffers 12152832 bytes
allocated channel: c1
channel c1: SID=112 device type=DISK
Starting restore at 06-NOV-12
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/06/2012 15:13:32
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restoreRMAN is searching for backup of controlfile in backup piece CF_L0_HFM11PRD_10112012_lhnpv62e_14001_1. But this has been already obsolete.
Now, if it not possible to get above backup piece back, then how to proceed with restore with backup piece DF_L0_HFM11PRD_10112012_l8npv5b6_13992_1 as it also has control file backup and available on disk, not obsolete. I can understand the reason for marking CF* file as obsolete because of redundency 1. But how to proceed with restore with available backup ?Hello;
I would change my configure for one :
RMAN>CONFIGURE CONTROLFILE AUTOBACKUP ON;Would use this to check :
list backup of controlfile completed before <date>And would catalog everything again just to be sure before starting the restore.
You may have to catalog use the control file piece to avoid the error.
RMAN> catalog backuppiece ...Another idea is to test the restore using something like this :
RMAN> run {
set until time "to_date('2012 NOV 17 07:00','YYYY MON DD HH24:MI')";
restore controlfile preview;
}Best Regards
mseberg
Edited by: mseberg on Nov 16, 2012 10:12 AM
Edited by: mseberg on Nov 16, 2012 11:13 AM -
How to refer/store a vaue from csv file in control file
Hi,
Consider the following control file script.
Load data
infile 'suv.csv'
append into table mast_equipmnet_test
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
equipment_id,
sub_vehicle_type,
ebiz_carrier_no expression "(select ebiz_carrier_no from mast_carrier where carrier_id=?)",
licence_no,
equip_type,
ebiz_appown_no,
ebiz_equip_no sequence(1,1)
here is my csv file
CABNO, SUBTYPE CARRIER_ID REG_NO, VEHICLE_TYPE, EBIZ_APPOWN_NO
6954, SUMO, SWAMY, 6954, SUV, 228
9183, SUMO, SWAMY, 9183, SUV, 228
3173, QUALIS, SWAMY, 3173, SUV, 228
In my csv file i have carrier_ids which are string values in 3rd column.
for every carrier_id ,the corresponding ebiz_carrier_no(numeric value) is stored in a master table called "mast_carrier".
While loading the data i need to fetch the ebiz_carrier_no for each carrier_id from mast_carrier table .
but here i got strucked in the where clause of select statement.
I am not able to refer the carrier_id from csv file in where clause.
can any body tell me how to refere a value from csv file in the select statement of control file script.
cheers
RRKSorry..
"EXPRESSION" is not needed..
ebiz_carrier_no "(select ebiz_carrier_no
from mast_carrier
where carrier_id=:ebiz_carrier_no )",
<br>
<br>
"Tested" as
<br>
load data
infile *
into table t truncate
fields terminated by ','
(id,
name "(select ename from emp
where empno = :name)"
begindata
1,7900
2,7902
<br>
QL> select * from t;
ID NAME
1 JAMES
2 FORD -
Control file failed error while duplicating database using RMAN
I am using oracle database 10g R2 and trying to make a clone of the source database orcl on the same machine but with different directory structure with the name of test.
When i run the duplicate command to create test database, then following error is generted:
D:\>rman target sys@orcl nocatalog auxiliary /
Recovery Manager: Release 10.2.0.1.0 - Production on Fri Nov 11 12:13:26 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
target database Password:
connected to target database: ORCL (DBID=1264668332)
using target database control file instead of recovery catalog
connected to auxiliary database: TEST (not mounted)
RMAN> @script.txt
RMAN> Run {
2> Allocate channel C1 type disk;
3> allocate auxiliary channel 'adisk_0' type DISK;
4> duplicate target database to "test";
5> #BACKUP INCREMENTAL LEVEL 1 DATABASE;
6> #BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
7> #BACKUP INCREMENTAL LEVEL 0 DATABASE;
8> #delete obsolete;
9> }
allocated channel: C1
channel C1: sid=140 devtype=DISK
allocated channel: adisk_0
channel adisk_0: sid=157 devtype=DISK
Starting Duplicate Db at 11-NOV-11
contents of Memory Script:
set until scn 12926250;
set newname for datafile 1 to
"D:\TEST\ORADATA\SYSTEM01.DBF";
set newname for datafile 2 to
"D:\TEST\ORADATA\UNDOTBS01.DBF";
set newname for datafile 3 to
"D:\TEST\ORADATA\SYSAUX01.DBF";
set newname for datafile 4 to
"D:\TEST\ORADATA\USERS01.DBF";
set newname for datafile 5 to
"D:\TEST\ORADATA\EXAMPLE01.DBF";
set newname for datafile 6 to
"D:\TEST\ORADATA\GL.DBF";
restore
check readonly
clone database
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 11-NOV-11
channel adisk_0: starting datafile backupset restore
channel adisk_0: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\TEST\ORADATA\SYSTEM01.DBF
restoring datafile 00002 to D:\TEST\ORADATA\UNDOTBS01.DBF
restoring datafile 00003 to D:\TEST\ORADATA\SYSAUX01.DBF
restoring datafile 00004 to D:\TEST\ORADATA\USERS01.DBF
restoring datafile 00005 to D:\TEST\ORADATA\EXAMPLE01.DBF
restoring datafile 00006 to D:\TEST\ORADATA\GL.DBF
channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_07\O1_MF_NNND0_TAG20111107T220822_7CJ
P
channel adisk_0: restored backup piece 1
piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_07\O1_MF_NNND0_TAG20111107T220822_7CJ44MH4_.BKP tag=TAG20111107T220
channel adisk_0: restore complete, elapsed time: 00:01:46
Finished restore at 11-NOV-11
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( 'D:\TEST\ORADATA\REDO01.LOG' ) SIZE 50 M REUSE,
GROUP 2 ( 'D:\TEST\ORADATA\REDO02.LOG' ) SIZE 50 M REUSE,
GROUP 3 ( 'D:\TEST\ORADATA\REDO03.LOG' ) SIZE 50 M REUSE
DATAFILE
'D:\TEST\ORADATA\SYSTEM01.DBF'
CHARACTER SET WE8MSWIN1252
contents of Memory Script:
switch clone datafile all;
executing Memory Script
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=766930525 filename=D:\TEST\ORADATA\UNDOTBS01.DBF
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=766930525 filename=D:\TEST\ORADATA\SYSAUX01.DBF
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=766930526 filename=D:\TEST\ORADATA\USERS01.DBF
datafile 5 switched to datafile copy
input datafile copy recid=4 stamp=766930526 filename=D:\TEST\ORADATA\EXAMPLE01.DBF
datafile 6 switched to datafile copy
input datafile copy recid=5 stamp=766930526 filename=D:\TEST\ORADATA\GL.DBF
contents of Memory Script:
set until scn 12926250;
recover
clone database
delete archivelog
executing Memory Script
executing command: SET until clause
Starting recover at 11-NOV-11
channel adisk_0: starting incremental datafile backupset restore
channel adisk_0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: D:\TEST\ORADATA\SYSTEM01.DBF
destination for restore of datafile 00002: D:\TEST\ORADATA\UNDOTBS01.DBF
destination for restore of datafile 00003: D:\TEST\ORADATA\SYSAUX01.DBF
destination for restore of datafile 00004: D:\TEST\ORADATA\USERS01.DBF
destination for restore of datafile 00005: D:\TEST\ORADATA\EXAMPLE01.DBF
destination for restore of datafile 00006: D:\TEST\ORADATA\GL.DBF
channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_09\O1_MF_NNND1_TAG20111109T223628_7CO
P
channel adisk_0: restored backup piece 1
piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_09\O1_MF_NNND1_TAG20111109T223628_7COGJZVT_.BKP tag=TAG20111109T223
channel adisk_0: restore complete, elapsed time: 00:00:07
channel adisk_0: starting incremental datafile backupset restore
channel adisk_0: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: D:\TEST\ORADATA\SYSTEM01.DBF
destination for restore of datafile 00002: D:\TEST\ORADATA\UNDOTBS01.DBF
destination for restore of datafile 00003: D:\TEST\ORADATA\SYSAUX01.DBF
destination for restore of datafile 00004: D:\TEST\ORADATA\USERS01.DBF
destination for restore of datafile 00005: D:\TEST\ORADATA\EXAMPLE01.DBF
destination for restore of datafile 00006: D:\TEST\ORADATA\GL.DBF
channel adisk_0: reading from backup piece D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_10\O1_MF_NNND1_TAG20111110T221428_7CR
P
channel adisk_0: restored backup piece 1
piece handle=D:\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2011_11_10\O1_MF_NNND1_TAG20111110T221428_7CR1MQFO_.BKP tag=TAG20111110T221
channel adisk_0: restore complete, elapsed time: 00:00:16
starting media recovery
archive log thread 1 sequence 524 is already on disk as file D:\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2011_11_11\O1_MF_1_524_7CS
C
archive log filename=D:\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2011_11_11\O1_MF_1_524_7CSG2HVT_.ARC thread=1 sequence=524
media recovery complete, elapsed time: 00:00:14
Finished recover at 11-NOV-11
contents of Memory Script:
shutdown clone;
startup clone nomount ;
executing Memory Script
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 230686720 bytes
Fixed Size 1248236 bytes
Variable Size 67109908 bytes
Database Buffers 155189248 bytes
Redo Buffers 7139328 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( 'D:\TEST\ORADATA\REDO01.LOG' ) SIZE 50 M REUSE,
GROUP 2 ( 'D:\TEST\ORADATA\REDO02.LOG' ) SIZE 50 M REUSE,
GROUP 3 ( 'D:\TEST\ORADATA\REDO03.LOG' ) SIZE 50 M REUSE
DATAFILE
'D:\TEST\ORADATA\SYSTEM01.DBF'
CHARACTER SET WE8MSWIN1252
released channel: C1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/11/2011 12:16:21
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'TEST' does not match parameter db_name 'orcl'
RMAN> **end-of-file**
Script.txt
Run {
Allocate channel C1 type disk;
allocate auxiliary channel 'adisk_0' type DISK;
duplicate target database to "test";
}Kindly help?Moazzam wrote:
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'TEST' does not match parameter db_name 'orcl'
Kindly help?>Please check what is the value of parameter db_name in the standby database? It should be match with TEST name
Cheers -
Hi
database name CLONESQL(duplicate database) does not match parameter db_name ORCL4 (source database) where should i change this one
RMAN> duplicate target database to CLONESQL;
Starting Duplicate Db at 12-SEP-11
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=97 device type=DISK
contents of Memory Script:
set until scn 923880;
set newname for datafile 1 to
"/u01/app/oracle/oradata/CLONESQLo1_mf_system_76tvgsh1_.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/CLONESQLo1_mf_sysaux_76tvgsjg_.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/CLONESQLo1_mf_undotbs1_76tvgsqn_.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/CLONESQLo1_mf_users_76tvgsxh_.dbf";
set newname for datafile 5 to
"/u01/app/oracle/oradata/CLONESQLo1_mf_example_76tvstov_.dbf";
set newname for datafile 6 to
"/u01/app/oracle/oradata/CLONESQLrman01.dbf";
restore
clone database
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 12-SEP-11
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/CLONESQLo1_mf_system_76tvgsh1_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/CLONESQLo1_mf_sysaux_76tvgsjg_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/CLONESQLo1_mf_undotbs1_76tvgsqn_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/CLONESQLo1_mf_users_76tvgsxh_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/CLONESQLo1_mf_example_76tvstov_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/CLONESQLrman01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL4/backupset/2011_09_12/o1_mf_nnndf_TAG20110912T121122_76v1mbyr_.bkp
channel ORA_AUX_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/ORCL4/backupset/2011_09_12/o1_mf_nnndf_TAG20110912T121122_76v1mbyr_.bkp tag=TAG20110912T121122
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:19
Finished restore at 12-SEP-11
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONESQL" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/CLONESQL/onlielogo1_mf_1_76tvr06l_.log', '/u01/app/oracle/flash_recovery_area/CLONESQL/onlinelog/o1_mf_1_76tvr4pp_.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/CLONESQL/onlielogo1_mf_2_76tvr940_.log', '/u01/app/oracle/flash_recovery_area/CLONESQL/onlinelog/o1_mf_2_76tvrf5y_.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/CLONESQL/onlielogo1_mf_3_76tvrl7w_.log', '/u01/app/oracle/flash_recovery_area/CLONESQL/onlinelog/o1_mf_3_76tvrrpm_.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/CLONESQLo1_mf_system_76tvgsh1_.dbf'
CHARACTER SET WE8MSWIN1252
contents of Memory Script:
switch clone datafile all;
executing Memory Script
datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=761683828 file name=/u01/app/oracle/oradata/CLONESQLo1_mf_sysaux_76tvgsjg_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=761683828 file name=/u01/app/oracle/oradata/CLONESQLo1_mf_undotbs1_76tvgsqn_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=761683828 file name=/u01/app/oracle/oradata/CLONESQLo1_mf_users_76tvgsxh_.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=761683828 file name=/u01/app/oracle/oradata/CLONESQLo1_mf_example_76tvstov_.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=761683828 file name=/u01/app/oracle/oradata/CLONESQLrman01.dbf
contents of Memory Script:
set until scn 923880;
recover
clone database
delete archivelog
executing Memory Script
executing command: SET until clause
Starting recover at 12-SEP-11
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL4/archivelog/2011_09_12/o1_mf_1_4_76v1q11f_.arc
archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL4/archivelog/2011_09_12/o1_mf_1_5_76vdyn6f_.arc
archived log file name=/u01/app/oracle/flash_recovery_area/ORCL4/archivelog/2011_09_12/o1_mf_1_4_76v1q11f_.arc thread=1 sequence=4
archived log file name=/u01/app/oracle/flash_recovery_area/ORCL4/archivelog/2011_09_12/o1_mf_1_5_76vdyn6f_.arc thread=1 sequence=5
media recovery complete, elapsed time: 00:00:05
Finished recover at 12-SEP-11
contents of Memory Script:
shutdown clone immediate;
startup clone nomount ;
executing Memory Script
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.1.0/db_1/dbs/initCLONESQL.ora'
starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started
Total System Global Area 158662656 bytes
Fixed Size 2142496 bytes
Variable Size 79695584 bytes
Database Buffers 71303168 bytes
Redo Buffers 5521408 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "CLONESQL" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/u01/app/oracle/oradata/CLONESQL/onlielogo1_mf_1_76tvr06l_.log', '/u01/app/oracle/flash_recovery_area/CLONESQL/onlinelog/o1_mf_1_76tvr4pp_.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/u01/app/oracle/oradata/CLONESQL/onlielogo1_mf_2_76tvr940_.log', '/u01/app/oracle/flash_recovery_area/CLONESQL/onlinelog/o1_mf_2_76tvrf5y_.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/u01/app/oracle/oradata/CLONESQL/onlielogo1_mf_3_76tvrl7w_.log', '/u01/app/oracle/flash_recovery_area/CLONESQL/onlinelog/o1_mf_3_76tvrrpm_.log' ) SIZE 50 M REUSE
DATAFILE
'/u01/app/oracle/oradata/CLONESQLo1_mf_system_76tvgsh1_.dbf'
CHARACTER SET WE8MSWIN1252
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/12/2011 18:51:07
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01504: database name 'CLONESQL' does not match parameter db_name 'ORCL4'
Thank youYou should change the DB_NAME parameter in the initial configuration (init<SID>.ora) file for the clone database before startup to CLONESQL.
Otherwise, show us the initial parameters for both source and clone.here is my parameter file
orcl4.ora
orcl4.__db_cache_size=385875968
orcl4.__java_pool_size=12582912
orcl4.__large_pool_size=4194304
orcl4.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
orcl4.__pga_aggregate_target=390070272
orcl4.__sga_target=578813952
orcl4.__shared_io_pool_size=0
orcl4.__shared_pool_size=167772160
Thank you
orcl4.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/orcl4/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oracle/oradata/ORCL4/controlfile/o1_mf_76tvqvnw_.ctl','/u01/app/oracle/flash_recovery_area/ORCL4/controlfile/o1_mf_76tvqwmf_.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata'
*.db_domain=''
*.db_name='orcl4'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orcl4XDB)'
*.log_archive_format='%t_%s_%r.dbf'
*.memory_target=965738496
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
initclonesql.ora
db_name='CLONESQL'
db_block_size=8192
compatible='11.1.0.0.0'
remote_login_passwordfile='EXCLUSIVE'
control_files='/u01/app/oracle/oradata/CLONESQL/controlfile/o1_mf_76tvqvnw_.ctl','/u01/app/oracle/flash_recovery_area/CLONESQL/controlfile/o1_mf_76tvqwmf_.ctl'
db_file_name_convert = ('/u01/app/oracle/oradata/ORCL4/datafile/','/u01/app/oracle/oradata/CLONESQL')
log_file_name_convert = ('/u01/app/oracle/oradata/ORCL4/onlinelog/','/u01/app/oracle/oradata/CLONESQL/onlielog','/u01/app/oracle/flash_recovery_area/ORCL4/onlinelog','/u01/app/oracle/flash_recovery_area/CLONESQL/onlinelog') -
Hi,
I'm in a problem, please some one guide me how to do it.
Our Production DB (9.2.0.1.0) is running on Solaris 9. We have a major crash of hard disk.
I have a cold backup of Sunday & now all the datafiles are in tact. Data files are in external storage.
I have lost my all of the control files.
I have restored the control file from the cold backup.
I'm able to go till mount stage & after that is throwing an error the datafiles are not in sync.
Any one can suggest how to go further to get it done.
Regards
SunilCsae2:
I tried the UNTIL CANCEL option & got a different error:
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL
ORA-00279: change 729716 generated at 06/14/2007 11:15:54 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\DB6\ARCH\DB6119.ARC
ORA-00280: change 729716 for thread 1 is in sequence #119
It successfully applied till sequence no:122
After that it applied the sequence no 123 & thow the error.
ORA-00279: change 729945 generated at 06/14/2007 11:54:06 needed for thread 1
ORA-00289: suggestion : D:\ORACLE\ORADATA\DB6\ARCH\DB6123.ARC
ORA-00280: change 729945 for thread 1 is in sequence #123
ORA-00278: log file 'D:\ORACLE\ORADATA\DB6\ARCH\DB6122.ARC' no longer needed
for this recovery
ORA-00308: cannot open archived log 'D:\ORACLE\ORADATA\DB6\ARCH\DB6123.ARC'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'D:\ORACLE\ORADATA\DB6\DATAFILES\SYSTEM1.DBF'
ORA-01112: media recovery not started
SQL> ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE OPEN RESETLOGS
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: 'D:\ORACLE\ORADATA\DB6\DATAFILES\SYSTEM1.DBF'
Sunil -
Control file lost and datafile addeed restore/recovery with no data loss
Here i have tried to the following
created new table called t2 and made sure data went to a specific tablespace...
took a level 0 backup
removed the control file
added couple of datafile to above tablespace and then inserted more data
then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
SQL> @datafile
-- list of datafile
Tablespace File Typ Tablespac File Stat Used MB Free MB FILE_MB MAXMB Datafile_name FILE_ID AUT
UNDOTBS1 Datafile ONLINE AVAILABLE 16 84 100 1,024 /data/trgt/undotbs01.dbf 3 YES
USERS Datafile ONLINE AVAILABLE 1153 895 2048 3,072 /data3/trgt/user02.dbf 5 YES
CNT_TST Datafile ONLINE AVAILABLE 1 9 10 0 /data3/trgt/cnt_tst01.dbf 7 NO
SYSAUX Datafile ONLINE AVAILABLE 626 35 660 32,768 /data/trgt/sysaux01.dbf 2 YES
USERS Datafile ONLINE AVAILABLE 2031 17 2048 2,048 /data3/trgt/move/users01.dbf 4 YES
SYSTEM Datafile ONLINE AVAILABLE 712 58 770 32,768 /data/trgt/system01.dbf 1 YES
USERS Datafile ONLINE AVAILABLE 65 35 100 32,768 /data3/trgt/users03.dbf 6 YES
7 rows selected.
-- new table is created called t2 and its going into TS called cnt_tst
SQL> CREATE TABLE TEST.T2
C1 DATE,
C2 NUMBER,
C3 NUMBER,
C4 VARCHAR2(300 BYTE)
TABLESPACE cnt_tst; 2 3 4 5 6 7 8
Table created.
-- data inserted
SQL> INSERT INTO
test.T2
SELECT
FROM
(SELECT
SYSDATE,
ROWNUM C2,
DECODE(MOD(ROWNUM,100),99,99,1) C3,
RPAD('A',300,'A') C4
FROM
DUAL
CONNECT BY
LEVEL <= 10000)
; 2 3 4 5 6 7 8 9 10 11 12 13 14 15
10000 rows created.
SQL> commit;
Commit complete.
-- to check of cnt_tst has any free space or not, as we can see its full
SQL> @datafile
Tablespace File Typ Tablespac File Stat Used MB Free MB FILE_MB MAXMB Datafile_name FILE_ID AUT
UNDOTBS1 Datafile ONLINE AVAILABLE 16 84 100 1,024 /data/trgt/undotbs01.dbf 3 YES
USERS Datafile ONLINE AVAILABLE 1153 895 2048 3,072 /data3/trgt/user02.dbf 5 YES
SYSAUX Datafile ONLINE AVAILABLE 626 35 660 32,768 /data/trgt/sysaux01.dbf 2 YES
USERS Datafile ONLINE AVAILABLE 2031 17 2048 2,048 /data3/trgt/move/users01.dbf 4 YES
SYSTEM Datafile ONLINE AVAILABLE 712 58 770 32,768 /data/trgt/system01.dbf 1 YES
USERS Datafile ONLINE AVAILABLE 65 35 100 32,768 /data3/trgt/users03.dbf 6 YES
CNT_TST Datafile ONLINE AVAILABLE 10 0 10 0 /data3/trgt/cnt_tst01.dbf 7 NO
7 rows selected.
SQL> select count(*) from test.t2;
COUNT(*)
10000
1 row selected.
-- to get a count and max on date
SQL> select max(c1) from test.t2;
MAX(C1)
29-feb-12 13:47:52
1 row selected.
SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog)
SQL> -- now control files are removed
SQL> select name from v$controlfile;
NAME
/ctrl/trgt/control01.ctl
/ctrl/trgt/control02.ctl
2 rows selected.
SQL>
SQL> ! rm /ctrl/trgt/control01.ctl
SQL> ! rm /ctrl/trgt/control02.ctl
SQL> ! ls -ltr /ctrl/trgt/
ls: /ctrl/trgt/: No such file or directory
SQL>
-- new datafile is added to CNT_TST TABLESPACE and new data is added as well
SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF;
Tablespace altered.
SQL> ALTER SYSTEM CHECKPOINT;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST03.dbf' SIZE 100M AUTOEXTEND OFF;
Tablespace altered.
SQL> INSERT INTO
test.T2
SELECT
FROM
(SELECT
SYSDATE,
ROWNUM C2,
DECODE(MOD(ROWNUM,100),99,99,1) C3,
RPAD('A',300,'A') C4
FROM
DUAL
CONNECT BY
LEVEL <= 10000)
; 2 3 4 5 6 7 8 9 10 11 12 13 14 15
10000 rows created.
SQL> /
10000 rows created.
SQL> commit;
Commit complete.
SQL> INSERT INTO
test.T2
SELECT
FROM
(SELECT
SYSDATE,
ROWNUM C2,
DECODE(MOD(ROWNUM,100),99,99,1) C3,
RPAD('A',300,'A') C4
FROM
DUAL
CONNECT BY
LEVEL <= 40000)
; 2 3 4 5 6 7 8 9 10 11 12 13 14 15
40000 rows created.
SQL> commit;
Commit complete.
SQL> @datafile
-- to make sure new datafile has been registered with the DB
Tablespace File Typ Tablespac File Stat Used MB Free MB FILE_MB MAXMB Datafile_name FILE_ID AUT
CNT_TST Datafile ONLINE AVAILABLE 9 91 100 0 /data3/trgt/CNT_TST03.dbf 9 NO
UNDOTBS1 Datafile ONLINE AVAILABLE 16 84 100 1,024 /data/trgt/undotbs01.dbf 3 YES
USERS Datafile ONLINE AVAILABLE 1153 895 2048 3,072 /data3/trgt/user02.dbf 5 YES
CNT_TST Datafile ONLINE AVAILABLE 9 91 100 0 /data3/trgt/CNT_TST02.dbf 8 NO
SYSAUX Datafile ONLINE AVAILABLE 626 35 660 32,768 /data/trgt/sysaux01.dbf 2 YES
USERS Datafile ONLINE AVAILABLE 2031 17 2048 2,048 /data3/trgt/move/users01.dbf 4 YES
SYSTEM Datafile ONLINE AVAILABLE 712 58 770 32,768 /data/trgt/system01.dbf 1 YES
USERS Datafile ONLINE AVAILABLE 65 35 100 32,768 /data3/trgt/users03.dbf 6 YES
CNT_TST Datafile ONLINE AVAILABLE 10 0 10 0 /data3/trgt/cnt_tst01.dbf 7 NO
9 rows selected.
-- now the count and max ... note count before backup was 10000 and max(c1) was diff
SQL> select count(*) from test.t2;
COUNT(*)
70000
1 row selected.
SQL> select max(c1) from test.t2;
MAX(C1)
29-feb-12 13:58:25
1 row selected.
SQL> -- now restore starts
SQL> shutdown abort;
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@berry trgt]$ rman
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Feb 29 14:01:48 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN> connect catalog rman/pass@rcat
connected to recovery catalog database
RMAN> connect target /
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 188313600 bytes
Fixed Size 1335388 bytes
Variable Size 125833124 bytes
Database Buffers 58720256 bytes
Redo Buffers 2424832 bytes
RMAN> restore controlfile from autobackup;
Starting restore at 29-FEB-12 14:02:37
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
recovery area destination: /backup/trgt/flash_recovery_area
database name (or database unique name) used for search: TRGT
channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120229
channel ORA_DISK_1: AUTOBACKUP found: /backup/trgt/backup/cont_c-3405317011-20120229-09
channel ORA_DISK_1: restoring control file from AUTOBACKUP /backup/trgt/backup/cont_c-3405317011-20120229-09
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=/ctrl/trgt/control01.ctl
output file name=/ctrl/trgt/control02.ctl
Finished restore at 29-FEB-12 14:02:39
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> recover database;
Starting recover at 29-FEB-12 14:02:55
Starting implicit crosscheck backup at 29-FEB-12 14:02:55
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
Crosschecked 96 objects
Finished implicit crosscheck backup at 29-FEB-12 14:02:57
Starting implicit crosscheck copy at 29-FEB-12 14:02:57
using channel ORA_DISK_1
Finished implicit crosscheck copy at 29-FEB-12 14:02:57
searching for all files in the recovery area
cataloging files...
no files cataloged
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
archived log file name=/redo_archive/trgt/archive/1_11_776523284.dbf thread=1 sequence=11
archived log file name=/redo_archive/trgt/archive/1_12_776523284.dbf thread=1 sequence=12
archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/29/2012 14:02:59
ORA-01422: exact fetch returns more than requested number of rows
RMAN-20505: create datafile during recovery
RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/redo_archive/trgt/online/redo01.log'
ORA-00283: recovery session canceled due to errors
ORA-01244: unnamed datafile(s) added to control file by media recovery
ORA-01110: data file 9: '/data3/trgt/CNT_TST03.dbf'
RMAN> -- wnet to session 2 and renamed datafile from unammed-- wnet to session 2 and renamed datafile for unammed file
SQL> select name from v$datafile;
NAME
/data/trgt/system01.dbf
/data/trgt/sysaux01.dbf
/data/trgt/undotbs01.dbf
/data3/trgt/move/users01.dbf
/data3/trgt/user02.dbf
/data3/trgt/users03.dbf
/data3/trgt/cnt_tst01.dbf
/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008
/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009
9 rows selected.
SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008' as '/data3/trgt/CNT_TST02.dbf';
Database altered.
SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009' as '/data3/trgt/CNT_TST03.dbf';
Database altered.
SQL> select name from v$datafile;
NAME
/data/trgt/system01.dbf
/data/trgt/sysaux01.dbf
/data/trgt/undotbs01.dbf
/data3/trgt/move/users01.dbf
/data3/trgt/user02.dbf
/data3/trgt/users03.dbf
/data3/trgt/cnt_tst01.dbf
/data3/trgt/CNT_TST02.dbf
/data3/trgt/CNT_TST03.dbf
9 rows selected.after above was done, went back to session 1 and tried recovered the DB
RMAN> recover database;
Starting recover at 29-FEB-12 14:06:16
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
archived log file name=/redo_archive/trgt/online/redo02.log thread=1 sequence=14
archived log file name=/redo_archive/trgt/online/redo03.log thread=1 sequence=15
media recovery complete, elapsed time: 00:00:00
Finished recover at 29-FEB-12 14:06:17
RMAN> alter database open resetlogs;
database opened
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
starting full resync of recovery catalog
full resync complete
RMAN> exit
Recovery Manager complete.
[oracle@berry trgt]$
[oracle@berry trgt]$
[oracle@berry trgt]$ sq
SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 29 14:07:18 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss:
2
SQL>
SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss";
Session altered.
SQL> select count(*) from test.t2;
select count(*) from test.t2
ERROR at line 1:
ORA-00376: file 8 cannot be read at this time
ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
SQL> select max(c1) from test.t2;
select max(c1) from test.t2
ERROR at line 1:
ORA-00376: file 8 cannot be read at this time
ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
SQL> alter database datafile 8 online;
alter database datafile 8 online
ERROR at line 1:
ORA-01190: control file or data file 8 is from before the last RESETLOGS
ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
{code}
so what did i do wrong in my recovery that i could not get my data?? how can i avoid this?? and restore my DB?
Edited by: user8363520 on Feb 29, 2012 12:24 PMuser8363520 wrote:
Here i have tried to the following
created new table called t2 and made sure data went to a specific tablespace...
took a level 0 backup
removed the control file
added couple of datafile to above tablespace and then inserted more data
then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
SQL> @datafile
-- list of datafile
Tablespace File Typ Tablespac File Stat Used MB Free MB FILE_MB MAXMB Datafile_name FILE_ID AUT
UNDOTBS1 Datafile ONLINE AVAILABLE 16 84 100 1,024 /data/trgt/undotbs01.dbf ; 3 YES
USERS Datafile ONLINE AVAILABLE 1153 895 2048 3,072 /data3/trgt/user02.dbf ; 5 YES
CNT_TST Datafile ONLINE AVAILABLE 1 9 10 0 /data3/trgt/cnt_tst01.dbf ; 7 NO
SYSAUX Datafile ONLINE AVAILABLE 626 35 660 32,768 /data/trgt/sysaux01.dbf ; 2 YES
USERS Datafile ONLINE AVAILABLE 2031 17 2048 2,048 /data3/trgt/move/users01.dbf ; 4 YES
SYSTEM Datafile ONLINE AVAILABLE 712 58 770 32,768 /data/trgt/system01.dbf ; 1 YES
USERS Datafile ONLINE AVAILABLE 65 35 100 32,768 /data3/trgt/users03.dbf ; 6 YES
7 rows selected.
-- new table is created called t2 and its going into TS called cnt_tst
SQL> CREATE TABLE TEST.T2
C1 DATE,
C2 NUMBER,
C3 NUMBER,
C4 VARCHAR2(300 BYTE)
TABLESPACE cnt_tst; 2 3 4 5 6 7 8
Table created.
-- data inserted
SQL> INSERT INTO
test.T2
SELECT
FROM
(SELECT
SYSDATE,
ROWNUM C2,
DECODE(MOD(ROWNUM,100),99,99,1) C3,
RPAD('A',300,'A') C4
FROM
DUAL
CONNECT BY
LEVEL <= 10000)
; 2 3 4 5 6 7 8 9 10 11 12 13 14 15
10000 rows created.
SQL> commit;
Commit complete.
-- to check of cnt_tst has any free space or not, as we can see its full
SQL> @datafile
Tablespace File Typ Tablespac File Stat Used MB Free MB FILE_MB MAXMB Datafile_name FILE_ID AUT
UNDOTBS1 Datafile ONLINE AVAILABLE 16 84 100 1,024 /data/trgt/undotbs01.dbf ; 3 YES
USERS Datafile ONLINE AVAILABLE 1153 895 2048 3,072 /data3/trgt/user02.dbf ; 5 YES
SYSAUX Datafile ONLINE AVAILABLE 626 35 660 32,768 /data/trgt/sysaux01.dbf ; 2 YES
USERS Datafile ONLINE AVAILABLE 2031 17 2048 2,048 /data3/trgt/move/users01.dbf ; 4 YES
SYSTEM Datafile ONLINE AVAILABLE 712 58 770 32,768 /data/trgt/system01.dbf ; 1 YES
USERS Datafile ONLINE AVAILABLE 65 35 100 32,768 /data3/trgt/users03.dbf ; 6 YES
CNT_TST Datafile ONLINE AVAILABLE 10 0 10 0 /data3/trgt/cnt_tst01.dbf ; 7 NO
7 rows selected.
SQL> select count(*) from test.t2;
COUNT(*)
10000
1 row selected.
-- to get a count and max on date
SQL> select max(c1) from test.t2;
MAX(C1)
29-feb-12 13:47:52
1 row selected.
SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog)
SQL> -- now control files are removed
SQL> select name from v$controlfile;
NAME
/ctrl/trgt/control01.ctl
/ctrl/trgt/control02.ctl
2 rows selected.
SQL>
SQL> ! rm /ctrl/trgt/control01.ctl
SQL> ! rm /ctrl/trgt/control02.ctl
SQL> ! ls -ltr /ctrl/trgt/
ls: /ctrl/trgt/: No such file or directory
SQL>
-- new datafile is added to CNT_TST TABLESPACE and new data is added as well
SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF;
Tablespace altered.
SQL> ALTER SYSTEM CHECKPOINT;
System altered. Upto this i was clear, but now i cann't understand when you actually dropped the control file from you database(in running stat) how can you perform "alter system checkpoint" and other "alter tablespace.." command? Once controlfile is inaccessible, oracle database is not suppose to function. -
I can only backup the datafiles but not the control files and SPFiles
Hello, all,
I am using the Oracle 10g on a linux server which runs redhat 9. I want to backup the whole database to the disk, but not the flash recovery area. It is /rawdata. I will show how I configure the backup part in EM. Is there anything wrong?
1. the ARCHIVELOG is on
2. under Administration, in the All Initialization Parameters, I remove the string value of “log_archive_dest_1”. After that, I go to the SPFile and remove the string value of “log_archive_dest_1”
3. configure backup settings and policies. The Disk Backup Location field is set to /rawdata. Select Image Copy for Disk Backup type. Test Disk backup is successful.
4. go to Policy page. Select “Automatically backup the control file and server parameter file (SPFile) with every backup and database structural change.) input /rawdata into the filed: Autobackup Disk Location
Select “Optimize the whole database backup by skipping unchanged files such as read-only and offline datafiles that have been backed up”
Select “Retain backups that are necessary for a recovery to any time whin the specified number of days (point-in-time recovery)
Accept the default of 31days
5. go to Schedul Backup
6. select customized from the backup Strategy drop-down menu. Select the Whole Database
7. in the Options page, select “Full backup” in the Backup Type section. Select “Online Backup” in the Backup Mode section. Select “back up all archived logs on disk” in the Advanced section.
8. in the Setting page, select “Disk”
9. in the Schedule page, accept the default job name and description. Select Immediately to execute the job immediately.
10. just submit the job.
After several minutes, the job is failed while the Prebackup and Postbackup are succeeded. The log says:
Recovery Manager: Release 10.1.0.2.0 - Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
RMAN>
connected to target database: ORCL10G (DBID=770753237)
using target database controlfile instead of recovery catalog
RMAN>
Starting backup at 11-OCT-06
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=268 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00001 name=+DATADG/orcl10g/system01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSTEM_FNO-1_68hvin50 tag=BACKUP_ORCL10G_000_101106111844 recid=108 stamp=603544772
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile fno=00003 name=+DATADG/orcl10g/sysaux01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSAUX_FNO-3_69hvin6d tag=BACKUP_ORCL10G_000_101106111844 recid=109 stamp=603544813
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=+DATADG/orcl10g/example01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-EXAMPLE_FNO-5_6ahvin7g tag=BACKUP_ORCL10G_000_101106111844 recid=110 stamp=603544829
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile fno=00002 name=+DATADG/orcl10g/undotbs01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-UNDOTBS1_FNO-2_6bhvin7v tag=BACKUP_ORCL10G_000_101106111844 recid=111 stamp=603544835
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=+DATADG/orcl10g/users01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-USERS_FNO-4_6chvin87 tag=BACKUP_ORCL10G_000_101106111844 recid=112 stamp=603544841
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 11-OCT-06
Starting Control File and SPFILE Autobackup at 11-OCT-06
piece handle=/rawdata/c-770753237-20061011-05 comment=NONE
Finished Control File and SPFILE Autobackup at 11-OCT-06
RMAN>
Starting backup at 11-OCT-06
current log archived
using channel ORA_DISK_1
archived log /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_cqhvf270 not found or out of sync with catalog
trying alternate file for archivelog thread 1, sequence 1062
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 10/11/2006 11:20:54
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_puhkv41f
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN>
Recovery Manager complete.
It seems the system tries to find a file “arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_cqhvf270” in /rawdata. I just can not understand.
What should I do? Any advice is highly appreciated!
Qianthe string value in the field of 'log_archive_dest_1" under "All Initialization parameters" is "LOCATION=+DATADG/orcl10g/". The same value was in the field under SPFile.
I reset these values and tried to backup the whole database. The same error appeared. The log says:
Recovery Manager: Release 10.1.0.2.0 - Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
RMAN>
connected to target database: ORCL10G (DBID=770753237)
using target database controlfile instead of recovery catalog
RMAN>
Starting backup at 11-OCT-06
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=245 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00001 name=+DATADG/orcl10g/system01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSTEM_FNO-1_6ghvj9rd tag=BACKUP_ORCL10G_000_101106043753 recid=114 stamp=603563922
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile fno=00003 name=+DATADG/orcl10g/sysaux01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-SYSAUX_FNO-3_6hhvj9sq tag=BACKUP_ORCL10G_000_101106043753 recid=115 stamp=603563963
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=+DATADG/orcl10g/example01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-EXAMPLE_FNO-5_6ihvj9tu tag=BACKUP_ORCL10G_000_101106043753 recid=116 stamp=603563977
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile fno=00002 name=+DATADG/orcl10g/undotbs01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-UNDOTBS1_FNO-2_6jhvj9ud tag=BACKUP_ORCL10G_000_101106043753 recid=117 stamp=603563984
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile fno=00004 name=+DATADG/orcl10g/users01.dbf
output filename=/rawdata/data_D-ORCL10G_I-770753237_TS-USERS_FNO-4_6khvj9uk tag=BACKUP_ORCL10G_000_101106043753 recid=118 stamp=603563990
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 11-OCT-06
Starting Control File and SPFILE Autobackup at 11-OCT-06
piece handle=/rawdata/c-770753237-20061011-07 comment=NONE
Finished Control File and SPFILE Autobackup at 11-OCT-06
RMAN>
Starting backup at 11-OCT-06
current log archived
using channel ORA_DISK_1
archived log /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_cqhvf270 not found or out of sync with catalog
trying alternate file for archivelog thread 1, sequence 1062
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 10/11/2006 16:40:05
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /rawdata/arch_D-ORCL10G_id-770753237_S-1062_T-1_A-586368151_puhkv41f
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RMAN>
Recovery Manager complete.
Why the system keeps trying to find files under /rawdata? It is the destination, not the source.
Any help is appreciated!
Qian
Message was edited by:
QianChen -
Restore - filename for datafile is missing in the control file
I am practicing RMAN recovery procedures and I encountered a problem that I do not know how to solve.
1) I took a hot backup of my test database.
2) Create tablespace TS_DATA_TEMP
3) Deleted tablespace TS_DATA which had 2 datafiles
4) Created tablespace TS_DATA with 1 datafile
5) shutdown database
6) logged into RMAN in nomount
7) restore controlfile from autobackup;
8) alter database mount;
9) restore database;
RMAN> restore database;
Starting restore at 22-AUG-08
using channel ORA_DISK_1
the filename for datafile 5 is missing in the control file
skipping datafile 1; already restored to file /u02/oradata/EDM91/system01.dbf
skipping datafile 2; already restored to file /u02/oradata/EDM91/undotbs01.dbf
skipping datafile 6; already restored to file /u02/oradata/EDM91/index
skipping datafile 3; already restored to file /u02/oradata/EDM91/sysaux01.dbf
skipping datafile 7; already restored to file /u03/oradata/EDM91/TS_INDEX01.dbf
skipping datafile 9; already restored to file /u03/oradata/EDM91/TS_LOB01.dbf
skipping datafile 4; already restored to file /u02/oradata/EDM91/users01.dbf
restore not done; all files readonly, offline, or already restored
Finished restore at 22-AUG-08
10) tried to recover
Starting recover at 22-AUG-08
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/22/2008 15:04:22
RMAN-06094: datafile 5 must be restored
SQL> select name from v$datafile where file#=5;
NAME
/u04/oradata/EDM91/TS_DATA.dbf
12) alter database backup controlfile to trace
DATAFILE
'/u02/oradata/EDM91/system01.dbf',
'/u02/oradata/EDM91/undotbs01.dbf',
'/u02/oradata/EDM91/sysaux01.dbf',
'/u02/oradata/EDM91/users01.dbf',
'/u04/oradata/EDM91/TS_DATA.dbf',
'/u02/oradata/EDM91/index',
'/u03/oradata/EDM91/TS_INDEX01.dbf',
'/u04/oradata/EDM91/TS_DATA02.dbf',
'/u03/oradata/EDM91/TS_LOB01.dbf'
CHARACTER SET UTF8
So i'm not sure what the problem is. Datafile TS_DATA.dbf is located in the control file but i'm getting the error: the filename for datafile 5 is missing in the control file.
Suggestions on what's wrong with the control file?I found my mistake; a newbie error.
I did not know I needed to include in my restore command the 'until' option when doing incomplete recovery. I only included the 'until' option in the recover command:
original command
restore database;
recover database until sequence =123;
should be
restore database until sequence = 123;
recover database until sequence =123;
I usually run the command using a RUN block with a SET UNTIL SEQUENCE but this case I used the single commands separately.
RUN
+{+
SET UNTIL sequence 123;
RESTORE DATABASE;
RECOVER DATABASE;
+}+ -
Problem in identifying control file when creating physical standby
hi there,
(database version: 10.2.0.4
plateform linux)
I'm using the command as below to create physical standby database from backup:
rman target / auxiliary sys/tiger@paceview
Recovery Manager: Release 10.2.0.4.0 - Production on Tue Sep 4 18:05:53 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: PACEVIEW (DBID=2092349485)
connected to auxiliary database: PACEVIEW (not mounted)
run {
allocate auxiliary channel c1 device type DISK;
set until sequence 38;
duplicate target database for standby dorecover nofilenamecheck;
released channel: ORA_DISK_1
allocated channel: c1
channel c1: sid=35 devtype=DISK
allocated channel: c2
channel c2: sid=36 devtype=DISK
executing command: SET until clause
Starting Duplicate Db at 04-SEP-12
contents of Memory Script:
set until scn 138180211934;
restore clone standby controlfile;
sql clone 'alter database mount standby database';
executing Memory Script
executing command: SET until clause
Starting restore at 04-SEP-12
channel c1: restoring control file
ORA-19625: error identifying file /backup/rman/paceview/DEL1_standby.ctl
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-19600: input file is control file (/backup/rman/paceview/DEL1_standby.ctl)
ORA-19601: output file is control file (/PGHProdDB/oradata/paceview/control1.ctl)
failover to previous backup
released channel: c1
released channel: c2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/04/2012 18:01:44
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restorei have already tried crosscheck but still giving same error
thanksHello;
So this is what I would do :
Backup Primary ( change to your directory as need )
RMAN RUN {
allocate channel d1 type disk;
backup format '/u01/backups/PRIMARY/df_t%t_s%s_p%p' database;
sql 'alter system archive log current';
backup format '/u01/backups/PRIMARY/al_t%t_s%s_p%p' archivelog all;
backup current controlfile for standby format '/u01/backups/PRIMARY/sb_t%t_s%s_p%p';
release channel d1;
}Move the backup and duplicate like this :
rman target sys/password@PRIMARY auxiliary /
RMAN> run {
allocate channel C1 device type disk;
allocate auxiliary channel C2 device type disk;
duplicate target database for standby nofilenamecheck;
}For complete details of this method see :
http://www.visi.com/~mseberg/duprman2.html
Best Regards
mseberg -
I know I've done this before but, I don't use SQL Loader often and I'm having issues getting a file to load.
The table has 6 columns in it - one of which is a timestamp.
I was having issues loading it initially with date format issues. I ruled out any issues with the timestamp format by simply loading a dummy table with some timestamp based data and had no issue.
So - I think the issue is around the fact that the table I'm loading's first column being a value I'm attempting to default with a sequence when loading and - that I'm screwing up something there.
Table is as such:
CREATE TABLE ACS_IPS
(seq_ips NUMBER,
col2 VARCHAR2(100),
col3 VARCHAR2(100),
col4 VARCHAR2(100),
col5 TIMESTAMP,
col6 VARCHAR2(100),
col7 VARCHAR2(100),
col8 DATE DEFAULT SYSDATE NOT NULL,
col9 VARCHAR2(30) DEFAULT USER);The control file is:
load data
truncate
into table acs_ips
fields terminated by ","
trailing nullcols
seq_ips "seq_ips.nextval",
col2,
col3,
col4,
col5 TIMESTAMP "YYYY-MM-DD HH24:MI:SS.FF9",
col6,
col7
)The sequence column isn't in the file being loaded... and - there are additional columns that are defaulted on the table that aren't in the control file.
Any help is appreciated... The error I'm getting is:
Rejected - Error on table CAMS.ACS_IPS, column ACTION_START.
ORA-01841: (full) year must be between -4713 and +9999, and not be 0Yeah - not sure that clears it up...
The sequence in my table is the first column - and - I think that's the problem... the sequence is being loaded as the first column in the control file but - it's not in the file being loaded so - it's skewing (again - I think??) the data being read in - which is why I'm getting the timestamp issues on the one column (it's actually reading the next column in the file vs. the actual timestamp one).
If that's the issue - I'm not sure how to avoid it without restructuring the table to stick the sequence physically at the end. I'm certain that's not necessary and - I'm overlooking something that's otherwise simple but evading me. -
Need a help: how to recover using backup control file?
Please a help:
First computer
1. I create a database
2. put it in archive mode,
3. shutdown and made a cold backup
4. Created backup control file (alter database backup control file to trace)
5. I started up and created some archived log files.
Second Computer
1. I copied all files created in the step 3 above except the control file
2. I create all the same map directory on the 2nd computer as in the 1st computer
3. I recreate the control file from the script got in the step 4 above
4. I Copy archived log files generated at the step 5 in the local directory in the second computer
5. I set the logsource and set the autorecovery to on
6. I recover the database: RECOVER DATABASE USING BACKUP CONTROL FILE UNTIL CANCEL
Error got:
the archived log file applied do not go beyond the first one?,How could I do to applied all archived log files copied from the first computer to the second computer to have the same data?
Thank you very mucharchived log sequeces in the first computerSQL> select sequence#,first_change#,next_change# from v$log_history;
SEQUENCE# FIRST_CHANGE# NEXT_CHANGE#
1 553723 555484
2 555484 557345
Actions I did in the second Computer(after copied the former two archived log files from the 1st computer)
SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG' SIZE 50M,
9 GROUP 2 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG' SIZE 50M,
10 GROUP 3 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG' SIZE 50M
11 -- STANDBY LOGFILE
12 DATAFILE
13 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF',
14 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF',
15 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF',
16 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF'
17 CHARACTER SET WE8ISO8859P1
18 ;
Control file created.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 0
Next log sequence to archive 0
Current log sequence 0
SQL> alter database archivelog;
Database altered.
SQL> set logsource C:\local_destination1_orcl
SQL> set autorecovery on;
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 555611 generated at 01/18/2007 14:14:14 needed for thread 1
ORA-00289: suggestion :
C:\LOCAL_DESTINATION1_ORCL\ARCH.1_1_612194518_43F17CF5.ARC
ORA-00280: change 555611 for thread 1 is in sequence #1
ORA-00328: archived log ends at change 555483, need later change 555611
ORA-00334: archived log:
'C:\LOCAL_DESTINATION1_ORCL\ARCH.1_1_612194518_43F17CF5.ARC'
Idon't know where the change 555611 is coming from?
Maybe you are looking for
-
With iPlanet6.0 how can I include servlets in the cgi directory?
I have created a cgi directory ex. http://hostname/cgi-bin to refer to the cgi.exe's. However.. I have developed a new servlet that replaces one of the cgi programs. The servlet context must fit in with our existing architecture so the servlets conte
-
Pdf files will not open on back up drive
I have windows xp pro. I am using the latest version of adobe reader x. Adobe reader works good on c: drive but when I copy and paste pdf files from c to a external hard drive as a back up adobe reader says it can't open because there was an error op
-
Virtual keyboard in wrong place
My keyboard keeps popping up in the top middle of the screen no matter which orientation I use, I have rebooted several times this does not help, close out all my apps and does not help, all apps experience this problem so lastly I just did a full re
-
Broadband download speeds not what they should be
Hello all I'm having a problem with my pc download speed when I proform a speed test using either speed checker or the bt speed check all is okay with tempeh connection incoming and I should be receiving 9.25 mb/s down and 1mb/s down but all all pcs
-
When is iOS 7 coming out?
When is iOS 7 coming out? It said it coming out this Fall. Isn't it Fall in the US?