Datafile information not in control file!!!
HI all,
I up database using 2day before control file. In which datafile information is not there which was added yesterday.
Datafile physically there. But control file haven’t that datafile information. how could I recover this datafile?
Help me for resolve this problem without bring down database.
Ash
I am not sure whether i understood your question.
You have a 2 days old controfile backup.
you have added datafiles to the database.
you want to recover with old controlfile ?
If this is the case you can have a look
http://download.oracle.com/docs/cd/B14117_01/server.101/b10734/recoscen.htm#1006135
Recovering Through an Added Datafile with a Backup Control File: Scenario section
Similar Messages
-
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 -
Datafile information deleted from control file
Hi,
I created undo tablespace and associated a path with it.I dropped the tablespace,but did not drop the datafiles.
the dba_data_files view does not show those files.
In the OS,those files exist,but i am not able to drop datafile.
When I do,
SQL> alter database datafile '\usr\lib\oracle\xe\oradata\XE\undo.dbf' offline drop;
alter database datafile '\usr\lib\oracle\xe\oradata\XE\undo.dbf' offline drop
ERROR at line 1:
ORA-01516: nonexistent log file, datafile, or tempfile "\usr\lib\oracle\xe\oradata\XE\undo.dbf"
Please help...
The files are there physically.01516, 00000, "nonexistent log file, datafile, or tempfile \"%s\""
// *Cause: An attempt was made to use ALTER DATABASE to rename
// a log file, datafile, or tempfile; or to change attributes
// of a datafile or tempfile (e.g., resize, autoextend,
// online/offline, etc.); or to re-create a datafile.
// The attempt failed because the specified file
// is not known to the database's control file
// or is not of a type supported by the request.
// *Action: Specify the name or number of an existing file
// of the correct type, as appropriate.
// Check the relevant V$ table for a list of possible files. -
SQL Loader: refer datafile name in the control file
Hi All:
Database: 10GR2
I have a table as following:
test (
filename varchar2(100),
mydata varchar2(1000)
I am using sql loader to populate data for this table. I also need store the datafile name to column test.filename as part of dataload. How to refer datafile name in the control file?
Again, I am processing multiple files in a batch mode. I need store datafile name in filename column so that I can know which "mydata" come from which datafile.
Thanks in advance!
KevinAs Bravid says, you can't do that from within SQL*Loader, unless the control files are dynamically generated by a script and the filename included as the default value for that particular column as a hardcoded literal.
It's easier if you use external tables as the table definition contains the "location" which is the list of filenames it is accessing, and the value can be queried as well as being dynamically changed (though if you're dynamically changing it, then you'll programatically know the filename anyway. hint hint!)
;) -
Remove RMAN information from target control file
Dear Gurus,
Can any one inform me that how I can remove RMAN related information from Target database control file.
Regards,
asifRecreate the Controlfile.
1. Generate the script with "ALTER DATABASE BACKUP CONTROLFILE TO TRACE;"
2. Shutdown the database
3. Obtain the script from the tracefile in user_dump_dest
4. Run the CREATE CONTROLFILE portion of the script
Note : Oracle generally advices a Cold Backup before doing a CREATE CONTROLFILE. If you edit the script and inadvertently miss one or more datafiles from the CREATE command, those datafiles would no longer belong to the database and you wouldn't be able to "add" them back -- you'd have to RESTORE the controlfiles and database.
Recreating the Controlfile clears all information about recent backups from the controlfile. So this is not a step to be taken lightly. If you do this and, later, need to do a Restore/Recover operation, RMAN wouldn't find information. But that, based on a reading of your question, seems to be what you DO want to do.
Hemant K Chitale
http://hemantoracledba.blogspot.com -
Only a cold datafile backup. No control files, redo files, archived redo
Hi everyone,
I made a stupid mistake and am in a bad condition with only a cold database backup without control files, redo files and archived redo files. My oracle database is oracle 9i. Is there any way to get my data back?
Thanks,
YanpingHi,
Have you a backup trace of a Control File ??
You can try perform this:
eg:
oracle@linux:/u01> cp -a /backup/*.dbf /u01/oradata/DB01
oracle@linux:~> sqlplus
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Sep 18 21:35:04 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Enter user-name: / as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 93394180 bytes
Fixed Size 451844 bytes
Variable Size 67108864 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
SQL>CREATE CONTROLFILE REUSE DATABASE "DB01" RESETLOGS ARCHIVELOG
MAXLOGFILES 3
MAXLOGMEMBERS 2
MAXDATAFILES 10
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 '/u01/oradata/DB01/redo01.log' SIZE 500K,
GROUP 2 '/u01/oradata/DB01/redo02.log' SIZE 500K,
GROUP 3 '/u01/oradata/DB01/redo03.log' SIZE 500K
DATAFILE
'/u01/oradata/DB01/system01.dbf',
'/u01/oradata/DB01/undotbs01.dbf',
'/u01/oradata/DB01/indx01.dbf',
'/u01/oradata/DB01/tools01.dbf',
'/u01/oradata/DB01/users01.dbf'
CHARACTER SET WE8ISO8859P1;
Control file created.
SQL> alter database open resetlogs;
Database altered.
SQL> ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/oradata/BDRPS/temp01.dbf' SIZE 5242880 REUSE AUTOEXTEND OFF;
Tablespace altered.
SQL> select * from v$controlfile;
STATUS NAME
/u01/oradata/DB01/control01.ctl
/u01/oradata/DB01/control02.ctl
/u01/oradata/DB01/control03.ctl
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER
3 ONLINE /u01/oradata/DB01/redo03.log
2 ONLINE /u01/oradata/DB01/redo02.log
1 ONLINE /u01/oradata/DB01/redo01.logCheers
Message was edited by:
Legatti -
Ora_br_copy not creating control file
Hi Everybody
In order to run homogeneous system copy i am running ora_br_copy,using these option looks like it is running but it doesn't create control.sql file
ora_br_copy.bat -generatefiles -forceLogSwitches -targetSID SMD -password ******** -listnerport 1527
and log file is this
INFO: 2008-06-12 11:11:53
Oracle Backup/Restore Copy tool is started.
CONFIG: 2008-06-12 11:11:53
Application options:
forceLogSwitches=
generatefiles=
listnerport=1527
oracleHome=H:\oracle\SMD\102
password=*****
sourceSid=smd
targetSID=SMD
INFO: 2008-06-12 11:11:53
Executing Oracle database shutdown.
INFO: 2008-06-12 11:12:00
Oracle database shutdown output:
SQL*Plus: Release 10.2.0.2.0 - Production on Thu Jun 12 11:11:53 2008
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected.
Database closed.
Database dismounted.
ORACLE instance shut down.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
INFO: 2008-06-12 11:12:00
Executing Oracle database startup.
INFO: 2008-06-12 11:12:07
Oracle database startup output:
SQL*Plus: Release 10.2.0.2.0 - Production on Thu Jun 12 11:12:00 2008
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to an idle instance.
ORACLE instance started.
Total System Global Area 2634022912 bytes
Fixed Size 2055872 bytes
Variable Size 1459618112 bytes
Database Buffers 1157627904 bytes
Redo Buffers 14721024 bytes
Database mounted.
Database opened.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
INFO: 2008-06-12 11:12:08
Forcing log switches is successfully completed.
INFO: 2008-06-12 11:12:08
Executing Oracle database shutdown.
INFO: 2008-06-12 11:12:13
Oracle database shutdown output:
SQL*Plus: Release 10.2.0.2.0 - Production on Thu Jun 12 11:12:08 2008
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected.
Database closed.
Database dismounted.
ORACLE instance shut down.
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
INFO: 2008-06-12 11:12:13
Oracle Backup/Restore Copy tool is stopped.Hi Everybody
This problem was due to ora_br_bopy tool itself,I download new tool from Service Market Place and it is working fine,I am able to create control.sql file
Hardeep -
Renaming datafiles in control files with database mounted but not open
Hi,
I moved a database (physical files) from one server to another. I need to modify the contents of the control files since the directory structure of the servers are not the same (and I can't change that).
I know I can use ALTER DATABASE BACKUP CONTROLFILE TO TRACE to produce a script that I can than modify and run with the instance started, database mounted but not open, and that will recreate the control files. I don't want to do that.
I was also told I can modify the datafile entries in the control files by starting the instance, mounting but not opening the database. Then I can issue the (this is the part I need help with) ALTER DATABASE RENAME FILE <file1> to <file2>. When I tried this it complains that <file1> is not found. Obviously the command I used is not the right one,,, what is the right command for what I want to do.
Thanks,
GabrielMove all datafiles from one directory to an other without recreate controlfile :
SYS@DEMO102> select file_name from dba_data_files
2 union
3 select member from v$logfile
4 union
5 select file_name from dba_temp_files
6 union
7 select name from v$controlfile;
FILE_NAME
E:\ORACLE\ORADATA\DEMO102C\CONTROL01.CTL
E:\ORACLE\ORADATA\DEMO102C\CONTROL02.CTL
E:\ORACLE\ORADATA\DEMO102C\CONTROL03.CTL
E:\ORACLE\ORADATA\DEMO102C\EXAMPLE01.DBF
E:\ORACLE\ORADATA\DEMO102C\REDO01.LOG
E:\ORACLE\ORADATA\DEMO102C\REDO02.LOG
E:\ORACLE\ORADATA\DEMO102C\REDO03.LOG
E:\ORACLE\ORADATA\DEMO102C\SYSAUX01.DBF
E:\ORACLE\ORADATA\DEMO102C\SYSTEM\SYSTEM01.DBF
E:\ORACLE\ORADATA\DEMO102C\TBS102_1.DBF
E:\ORACLE\ORADATA\DEMO102C\TBS102_2.DBF
E:\ORACLE\ORADATA\DEMO102C\TEMP01.DBF
E:\ORACLE\ORADATA\DEMO102C\UNDOTBS01.DBF
E:\ORACLE\ORADATA\DEMO102C\USERS01.DBF
14 rows selected.
SYS@DEMO102> create pfile='E:\oracle\admin\DEMO102\pfile\pfile102.ora' from spfile;
File created.
SYS@DEMO102> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.Here, I move all datafiles mentionned above, and modify my pfile for new controlfile directory. Then :
SYS@DEMO102> startup pfile=E:\oracle\admin\DEMO102\pfile\pfile102.ora
ORACLE instance started.
Total System Global Area 272629760 bytes
Fixed Size 1288940 bytes
Variable Size 163579156 bytes
Database Buffers 100663296 bytes
Redo Buffers 7098368 bytes
Database mounted. --Note that we are in mount state
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'E:\ORACLE\ORADATA\DEMO102C\SYSTEM\SYSTEM01.DBF'
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\USERS01.DBF' to 'E:\ORACLE\ORADATA\demo102\USERS01.DBF';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\SYSAUX01.DBF' to 'E:\ORACLE\ORADATA\demo102\SYSAUX01.DBF';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\UNDOTBS01.DBF' to 'E:\ORACLE\ORADATA\demo102\UNDOTBS01.DBF';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\SYSTEM\SYSTEM01.DBF' to 'E:\ORACLE\ORADATA\demo102\SYSTEM\SYSTEM01.DBF';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\EXAMPLE01.DBF' to 'E:\ORACLE\ORADATA\demo102\EXAMPLE01.DBF';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\TBS102_1.DBF' to 'E:\ORACLE\ORADATA\demo102\TBS102_1.DBF';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\TBS102_2.DBF' to 'E:\ORACLE\ORADATA\demo102\TBS102_2.DBF';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\REDO01.LOG' to 'E:\ORACLE\ORADATA\demo102\REDO01.LOG';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\REDO02.LOG' to 'E:\ORACLE\ORADATA\demo102\REDO02.LOG';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\REDO03.LOG' to 'E:\ORACLE\ORADATA\demo102\REDO03.LOG';
Database altered.
SYS@DEMO102> alter database rename file 'E:\ORACLE\ORADATA\DEMO102C\TEMP01.DBF' to 'E:\ORACLE\ORADATA\demo102\TEMP01.DBF';
Database altered.
SYS@DEMO102> alter database open;
Database altered.
SYS@DEMO102> create spfile from pfile='E:\oracle\admin\DEMO102\pfile\pfile102.ora';
File created.
SYS@DEMO102> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@DEMO102> startup
ORACLE instance started.
Total System Global Area 272629760 bytes
Fixed Size 1288940 bytes
Variable Size 163579156 bytes
Database Buffers 100663296 bytes
Redo Buffers 7098368 bytes
Database mounted.
Database opened.
SYS@DEMO102> select file_name from dba_data_files
2 union
3 select member from v$logfile
4 union
5 select file_name from dba_temp_files
6 union
7 select name from v$controlfile;
FILE_NAME
E:\ORACLE\ORADATA\DEMO102\CONTROL01.CTL
E:\ORACLE\ORADATA\DEMO102\CONTROL02.CTL
E:\ORACLE\ORADATA\DEMO102\CONTROL03.CTL
E:\ORACLE\ORADATA\DEMO102\EXAMPLE01.DBF
E:\ORACLE\ORADATA\DEMO102\REDO01.LOG
E:\ORACLE\ORADATA\DEMO102\REDO02.LOG
E:\ORACLE\ORADATA\DEMO102\REDO03.LOG
E:\ORACLE\ORADATA\DEMO102\SYSAUX01.DBF
E:\ORACLE\ORADATA\DEMO102\SYSTEM\SYSTEM01.DBF
E:\ORACLE\ORADATA\DEMO102\TBS102_1.DBF
E:\ORACLE\ORADATA\DEMO102\TBS102_2.DBF
E:\ORACLE\ORADATA\DEMO102\TEMP01.DBF
E:\ORACLE\ORADATA\DEMO102\UNDOTBS01.DBF
E:\ORACLE\ORADATA\DEMO102\USERS01.DBF
14 rows selected.
SYS@DEMO102> Nicolas. -
Drop a datafile from physical standby's control file
Hi,
I am trying to create a physical standby database for my production...
1) I have taken cold backup of my primary database on 18-Nov-2013...
2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database...
When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
How to overcome this situation...
Can i delete the entry for the newly added datafile from the backup control file ?
When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be open..
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string AUTO
SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
System altered.
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string MANUAL
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
Regards,
JibuJibu wrote:
Hi,
I am trying to create a physical standby database for my production...
1) I have taken cold backup of my primary database on 18-Nov-2013...
2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database..
Hi,
What is your version?
If you added new datafile or created new tablespace, take backup again for restore new created standby database.
If your standby database running well, DG configuration success, then this datafile will create on standby side, too.
Set STANDBY_FILE_MANAGEMENT=AUTO best practice.
When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
How to overcome this situation...
Can i delete the entry for the newly added datafile from the backup control file ?
Not need any delete datafile from standby side, you must recreate standby database, or you can take RMAN backup and restore to standby side again.
When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be open..
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string AUTO
SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
System altered.
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string MANUAL
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
It is not logical, Physical standby must be bit-for-bit same with Primary database.
Regards
Mahir M. Quluzade -
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. -
Why BRBACKUP cmd does not save SAP control files?
Hello!
We experience some issues running BRBACKUP utility to save SAP's data objects.
When we run the BRBACKUP cmd, we see that all tablespaces and configurations files
are save, but BRBACKUP cmd does not save control files. Why, we don't know?
BRBACKUP run throught AIX crontab and it looks like this ...
brbackup -u system/disapinst01 -c -m full -t online
the init<SID>.ora file looks good, we can see that the *.control_files entry is OK.
*.control_files='/oracle/<SID>/origlogA/cntrl/cntrlDDI.dbf',
'/oracle/<SID>/origlogB/cntrl/cntrlDDI.dbf',
'/oracle/<SID>/sapdata1/cntrl/cntrlDDI.dbf'
SAP's ENVIRONMENT
- HW: IBM pSeries Server (JS21) BladeCenter 8677-3RV
- SW: Plataform IBM AIX V5.3.0.0 ML 5300-05
- DB: Oracle 10g
Somebody help us, please!brbackup copies one controlfile to /oracle/PRD/sapbackup and then backs up this copy.
look for a similar message in your log:
BR0319I Control file copy created: /oracle/PRD/sapbackup/CNTRLPRD.DBF 28680192
BR0077I Database file for backup: /oracle/PRD/sapbackup/CNTRLPRD.DBF -
Hi Everyone,
I just restored my controlfile from autobackup in RMAN and after mounting the database with the restored controlfiles, I took a backup of archivelog and in the end a warning message has been displayed saying that the controlfile autobackup is possible as it is not the current. Can any one of you please explain the warning..
Thanks in advance for your help..Thanks for the reply sir...Here are the details..
ORACLE VERSION -10G release 2 on windows vista home basic.
I have set the controlfile autobackup on in rman configuration
and performed some structural changes to the database, like added some tablespaces.
And went to rman to check the controlfile autobackup available by using list backup by file;
and after that i shutdown the database clean shutdown immediate.
and open rman restored spfile from autobackup
and restored controlfile from autobackup and mounted database.
and after that I issued an archivelog backup from time 'sysdate-2' until time 'sysdate'
and got he following warning which tells
Starting backup at 14-FEB-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=82 recid=69 stamp=710798959
input archive log thread=1 sequence=83 recid=70 stamp=710824731
input archive log thread=1 sequence=84 recid=73 stamp=710844030
input archive log thread=1 sequence=85 recid=75 stamp=710888657
input archive log thread=1 sequence=86 recid=76 stamp=710894748
input archive log thread=1 sequence=87 recid=78 stamp=710939528
input archive log thread=1 sequence=88 recid=81 stamp=710941685
channel ORA_DISK_1: starting piece 1 at 14-FEB-10
channel ORA_DISK_1: finished piece 1 at 14-FEB-10
piece handle=C:\ORACLE\FLASH_RECOVERY_AREA\DB202\BACKUPSET\2010_02_14\O1_MF_ANNN
N_TAG20100214T153455_5QJQMLO9_.BKP tag=TAG20100214T153455 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:05:35
Finished backup at 14-FEB-10
RMAN-06497: WARNING: control file is not current, control file autobackup skipped
I am not sure about the warning received. Thanks for the help in advance. -
In case of Control File Failure, Create Control File cmd how get scn?
The following lines i picked from the
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5033895918209
======================================================
1. We can use the 'alter database rename ' at mount stage to rename any datafile. Or is it not possible to rename the system datafile like this? Why?
2. What happens to the SCN information in the controlfile when a controlfile is recreated? How will the database sync the SCN with that of the datafiles?
If I issue a 'backup controlfile to <file>' at 8 am and then restore that controlfile binary backup at 10 am and try to open the database, it will give me a control file old error. I understand that it is because the SCN is not in sync. But if I issue a 'backup controlfile to trace' at 8 am and use that script to recreate a new controlfile at 10 am, why doesn't I get the error? Where does it get the SCN information then?
So what is the use of taking a binary copy of the controlfile. Looks like having a 'backup controlfile to trace' script is better than a binary backup. Do you agree? Why/whynot?
Followup August 16, 2002 - 2pm US/Eastern:
1) you could but I just always did it with the create controlfile statement.
When moving system -- I do it that way
When moving ANY OTHER tablespace -- i just offline it, move the files, rename the files online it.
2) it just happens.
The control file you create will read the files to figure out what is up.
I agree, I've never used a binary controlfile backup myself.
=========================================================
My Question- In the Point2 above "Where does it get the SCN information and how control file do SCN Sync with data files?
"1. The CREATE CONTROLFILE reads SCNs from the DataFiles. If the
database was last shutdown, all the datafiles are "non-fuzzy" and have the same
SCN (as of the shutdown checkpoint), If the database or some of the files are from
are hot backup, you cannot open the database because the SCN of some files is
older (lower) than others -- that is why a RECOVER (DATABASE or DATAFILE) is
required.
See http://web.singnet.com.sg/~hkchital/Incomplete_Recovery_with_BackupControlfile.doc
2. I'm not sure I agree with Tom Kyte's response
"I agree, I've never used a binary controlfile backup myself. "
to the question
"So what is the use of taking a binary copy of the controlfile. Looks like having a 'backup controlfile to trace' script is better than a binary backup. Do you agree? Why/whynot?"
If you have lost your database (storage/filesystem failure) and all your datafiles are lost,
you cannot simply do a CREATE CONTROLFILE from a Trace -- because the
CREATE CONTROLFILE has to read and verify all the datafiles specified in the
CREATE statement. If you have an RMAN Repository, you can use that to restore
your database files but otherwise, the RMAN information about backups and backupsets
are in the binary controlfile.
That is why it is important to take binary controlfile backups either manually or
using RMAN or using CONFIGURE CONTROLFILE AUTOBACKUP ON. -
Hi,
I am interested in time of snapshot control file creation.
I have read that snapshot control file is created before the backup take the place. I have tried to take the simple rman>backup database command, but I have seen that snapshot control file is created after all backup process (I have seen the time of creating the snapshot control file).
Can anybody tell me about this? When the snapshot control file is created (before backup, maybe in the memory, because I can't see it on the file system).
Regards,
DraganHi,
I have read this sentence from Oracle Database 10g RMAN Backup & Recovery:
RMAN needs to get a consistent view of the control file when it sets out to make backup of every datafile. It only needs to know the most recent checkpoint information and file schematic information at the time backup begins. After the backup starts, RMAN needs this information to stay consistent for duration of the backup operation; in other words, it needs a read consistent view of the control file. With the constant updates from the database, this is nearly impossible - unless RMAN were to lock the control file for the duration of the backup. But that would mean the database could not advance checkpoint or switch logs or produce new archive logs. Impossible.
To get around this, RMAN uses the snapshot control file, an exact copy of your control file that is only used by RMAN during backup and resync operations. At the beginning of these operations, RMAN refreshes the snapshot control file from the actual control file, thus putting a momentary lock on the control file. Then, RMAN switches to the snapshot and uses it for the duration of the backup; in this way, it has read consistency without holding up database activity.
I must ask you if I am using control file only (not recovery catalog) what is happening when I am executing simple RMAN command> backup database;
You have said that I don't create snapshot of control file at that moment, only at the end of the backup process (I have also try it in my environment and snapshot is created at the end of the backup process).
How RMAN knows what to backup (which files), he takes this information from original control file (not from snapshot) I suppose.
What is happening when he finished backup of some backup set, he writes that information again in original control file I suppose.
And at the end of all process why he takes snapshot of control file (to backup control file from it, not from original control file, because control file is always changing, need to lock it). In that snapshot control file (and in the its backup) we will have the pointers on files that are made after the backup process started (is this true).
Thanks,
Regards
Dragan -
Lost control file, how to recover them
Hi All,
I have Oracle 11G running on RHEL 5.2 server and unexpectedly I can't start database after a server reboot. I have executed the following commands,
sqlplus /as sysdba
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/inittestdb.ora'
SQL>
and then
SQL> startup pfile='/u01/app/oracle/admin/testdb/pfile/init.ora.1024201018143'
ORACLE instance started.
Total System Global Area 1269366784 bytes
Fixed Size 2212976 bytes
Variable Size 754977680 bytes
Database Buffers 503316480 bytes
Redo Buffers 8859648 bytes
ORA-00205: error in identifying control file, check alert log for more info
Here are the alert log messages,
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/testdb/control02.ctl'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/testdb/control01.ctl'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-205 signalled during: ALTER DATABASE MOUNT...
[oracle@trace]$ ls -l /u01/app/oracle/oradata/testdb
total 0
There are are no control files in the directory and I couldn't find them on the disk. Unfortunately, I do not have backups for dbs (this is a staging server). Is there any way we can recover those files or fix the problem ?
Could someone please help us on this?
ThanksMahesh Menon wrote:
[oracle@trace]$ ls -l /u01/app/oracle/oradata/testdb
total 0
He is not having any files in that location... not only control files, but the datafiles too.. in that case how is it possible ??? thats why I mentioned like that...
And yes, if the datafiles and redos are located in another location then we can recreate the controlfile.
But since it is a test system, I dont think there will be files in another location...
Please take it that I am not arguing with the GURUS and EXPERTS here..Well thought-out arguments are appreciated!
Perhaps the answer is to ls -l /u01/app/oracle/oradata
Maybe it's TESTDB or some for some other reason testdb really isn't the sid.
If it's a staging environment, where do things come from? If the data files are found on the staging server, but no controlfiles, perhaps alter database backup controlfile to trace on the source server might give something to work with.
Maybe you are looking for
-
Do I have to own a apple device to use iCloud on my Windows 7 PC
I do not own an Apple device seemly to utlizie iCould I must initially own one before being able to use on my Windows PC with Outlook 2010?
-
T420s external microphone won't work
I just bought a T420s, Type 4174-P5G, I want to use an external stereo microphone (Sony ECM-719) instead of the built-in microphone, however as soon as I plug it in the headphone/microphone combined jack, the microphone is recognized as headphone.
-
Merging queries with not exact matching data
Hi fellow Webi and OLAP bods Does anyone know how I can merge data from 2 different queries where the data is not an exact match? I have one query where the key is 001 002 003 004 etc and another where the key is AAA001 AAA002 AAA003 BBB004 etc basic
-
Need to Call OA Page from Servlet
Hi All, My requirement is to call OAF page from the servlet. Can anyone please give me some pointers to achieve this. Thanks Anoop
-
Default Collection Set For New Collect
Good Morning, Since upgrading to 5.2 I notice that when I right click on a collection set to create a new collection Lightroom does not default to the collection set I right clicked on as the "Inside Collection Set" if my original collection set is n