Cold Backup/Recovering A Table
I am running 11r2 in a RAC environment. We have a primary plus two standby's (using Active Data Guard). Also, I am a new DBA, so bare with me. :)
TableX in a certain database is corrupted. The corruption began a month ago due to a web developer's code change. The code change was fixed a week ago.
Summary: the data in TableX is corrupted up until a week ago.
Flashback doesn't extend that far into the past, so what I've been thinking of doing is, on our test server:
1) Copy over relevant files from production to the test server
2) Backup the original TableX on production
3) Restore the system, sysaux, undo and the tablespace which contains TableX on test server
4) Drop all other tablespaces in mount state (or not, if this step isn't necessary?)
5) Recover the database till the time when the table was dropped or updated
6) Take an export of TableX from database and import it into production, overwriting the current TableX
7) Update the imported production TableX with the past week of "good" data from the backup in step 2
I have 3 questions.
Does this seem like a good strategy?
Additionally, I am having difficulty determining what the "relevant files" are in step 1. What would I be copying over? Everything in the ArchiveLog folder? Or Everything in the db_recovery_file_dest folder? Or...?
Lastly, in step 3, is there a way to perform the restore w/o overwriting preexisting data on the test server?
Thank you
Hemant K Chitale wrote:
is there a way to perform the restore w/o overwriting preexisting data on the test serverYou would have to restore to a different folder and when you ALTER DATABASE MOUNT you ALTER DATABASE RENAME DATAFILE to specify the new locations of the datafiles.
I think the MOUNT is the step that I was missing, though it seems so obvious now...
1) Copy over relevant files from production to the test server
2) Backup the original TableX on production
*2.5) MOUNT the copied data files onto the test server*
3) Restore the system, sysaux, undo and the tablespace which contains TableX on test server
4) Drop all other tablespaces in mount state (or not, if this step isn't necessary?)
5) Recover the database till the time when the table was dropped or updated
6) Take an export of TableX from database and import it into production, overwriting the current TableX
7) Update the imported production TableX with the past week of "good" data from the backup in step 2
Last Question (I think): you both refer to "THE cold backup." We use a diff backup. I assume you mean "copy over all files since the last full backup prior to the date that data corruption began"?
Similar Messages
-
Recover database using cold backup
Hi All,
One of the table is delete by one of our DBA from PROD accidentally. We have a cold backup on one day before.
Now we are trying to restore it from the cold backup. PROD DB is in archivelog and all the archive is in tact.
The table got truncated today at 8 PM. Can we apply the database till 8 PM so that we can restore the truncated table using cold backup.
Please find the below steps which we are using to restore.
creating controlfile
starting the db in mount state
recover database;
Will it ask for latest archive log when we try to recover it.
ENV details -
DB - 11.2.0.1
Please suggest.
ThanksHi,
If you have doubts about the procedure to use to restore a backup to a point in time, then please take a look at the documentation first: Performing Flashback and Database Point-in-Time Recovery - 11g Release 2 (11.2)
After you specify the time when the recovery must end (UNTIL clause in rman), then the RECOVER command will try to use the archivelogs needed.
Before starting with this PITR operation, you should check if your database has flashback active, because it will be much easier to recover using it.
This is also explained on the same document linked above.
Regards.
Nelson -
How to recover a cold backup (Oracle 9i)
Hello,
We got the following situation, one of our clients wants to switch from Oracle 9i to Microsoft SQL Server 2008.
Our client is located in Singapore and we operate in Belgium, they have sent us an external HD with a media/cold backup of their database.
We also got both the database name and the passwords for the database.
In order to get this database available I have taken the following steps:
1)Created an Virtual Machine with Windows XP SP3,
2)Installed Oracle 9i on this VM,
3)Created a database using the database name and passwords given by the client.
Now I want to recover our clients database, how do I do this.
I know there texts about it, but I need a step for step guide to do this (that's the way I learn by seeing how its done and then reproduce it)
Thanks for any responseAfter some calls and putting pressure on our client IT I've been able to find out that there either using 11 or 10g.
Also found out that the name they gave me is not the name they use
So I followed the instructions on [http://download.oracle.com/docs/cd/B10501_01/server.920/a96521/create.htm#1000691] , I did find some mistakes in the page
I got the following create database statement
CREATE DATABASE dbname
USER SYS IDENTIFIED BY pz6r58
USER SYSTEM IDENTIFIED BY y1tz5p
LOGFILE GROUP 1 ('D:\dbname\redo01.log') SIZE 100M,
GROUP 2 ('D:\dbname\redo02.log') SIZE 100M,
GROUP 3 ('D:\dbname\redo03.log') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET US7ASCII
DATAFILE 'D:\dbname\system01.dbf' SIZE 700M REUSE
EXTENT MANAGEMENT LOCAL
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE D:\dbname\temp01.dbf' *(The documentation said datafile instead of tempfile)*
SIZE 270M REUSE
SYSAUX DATAFILE 'D:\dbname\sysaux01.dbf' size 700M reuse
UNDO TABLESPACE undotbs
DATAFILE 'D:\dbname\undotbs01.dbf'
SIZE 3984M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED;
after executing
ORA-01501: CREATE DATABASE failed
ORA-00200: controlfile could not be created
ORA-00202: controlfile: 'D:\dbname\control01.ctl'
ORA-27038: file exists
OSD-04010: <create> option specified, file already exist
So what did I do wrong, altough I'm guessing I copied the original files to early
[code="sql"]DATAFILE 'D:\dbname\system01.dbf' SIZE 700M REUSE
Although I did use reuse
I shutdown the database and removed the files to and replaced them with the files from the client,
Mounted the database succesfully and tried to query the metadata
Mixing the information found on
Creating an Oracle Database,
Oracle Recovery Procedure
Got ORA-01219, which is logical since the databse isn't open yet.
I open the database using alter database open
ORA-01157: cannot identify data file 1 - file not found
ORA-01110: data file 1: '/home/oracle/product/10.1.0/oradata/orcl/system01.dbf'
So any ideas want went wrong this time
Edited by: Resender on 19-mei-2011 1:00 -
Recovering cold backup - running in circles - part 2 -Second opinion needed
Hello all,
Here I'm again but this time not to ask for a complete solution where I have to do nothing but a second opinion and some help in solving.
In the thread [Recovering cold backup - alter database open failing - running in circles |http://forums.oracle.com/forums/thread.jspa?messageID=9663720] , I was trying to recover a database (I still am) for one of our clients.
Since then a few things have changed, from our client we have no received the installation media for their database software: Oracle 10.0.1.0.2.
I have installed this on a Linux, an opensuse while they used a RHEL 4, placed the database files in the a similar map structure as theirs and made sure that all the ORACLE variables were correctly set, we have also received the pfile and I made the corresponding initfile from.
I start sqlplus / as sysdba
Mounting the database no problem.
Trying to open the database I receive the following error ORA-01207: file is more recent than controlfile – old controlfile, the error refers to the Datafile 2: '/home/oracle/product/10.1.0/oradata/orcl/undotbs01.dbf'.
Their is no corresponding error message in the alert log, well their is but it doesn't really give me the information I was looking for.
Mon Jul 11 16:38:26 2011
alter database open
ORA-1122 signalled during: alter database open...
Mon Jul 11 16:44:51 2011
ALTER DATABASE RECOVER database
Mon Jul 11 16:44:51 2011
Media Recovery Start
Media Recovery failed with error 1122
ORA-283 signalled during: ALTER DATABASE RECOVER database ...
I then attempted to do a media recovery using recover database using backup controlfile, which fails because it can not find a corresponding backup controlfile.
The section generated in the alert log did however worry me more:
ALTER DATABASE RECOVER database using backup controlfile
Mon Jul 11 16:46:15 2011
Media Recovery Start
WARNING! Recovering data file 1 from a fuzzy file. If not the current file
it might be an online backup taken without entering the begin backup command.
WARNING! Recovering data file 2 from a fuzzy file. If not the current file
it might be an online backup taken without entering the begin backup command.
WARNING! Recovering data file 3 from a fuzzy file. If not the current file
it might be an online backup taken without entering the begin backup command.
WARNING! Recovering data file 4 from a fuzzy file. If not the current file
it might be an online backup taken without entering the begin backup command.
WARNING! Recovering data file 5 from a fuzzy file. If not the current file
it might be an online backup taken without entering the begin backup command.
Starting datafile 1 with incarnation depth 0 in thread 1 sequence 1818761
Datafile 1: '/home/oracle/product/10.1.0/oradata/orcl/system01.dbf'
Starting datafile 2 with incarnation depth 0 in thread 1 sequence 1818764
Datafile 2: '/home/oracle/product/10.1.0/oradata/orcl/undotbs01.dbf'
Starting datafile 3 with incarnation depth 0 in thread 1 sequence 1818761
Datafile 3: '/home/oracle/product/10.1.0/oradata/orcl/sysaux01.dbf'
Starting datafile 4 with incarnation depth 0 in thread 1 sequence 1818765
Datafile 4: '/home/oracle/product/10.1.0/oradata/orcl/users01.dbf'
Starting datafile 5 with incarnation depth 0 in thread 1 sequence 1818761
Datafile 5: '/home/oracle/product/10.1.0/oradata/orcl/temp02.dbf'
Media Recovery Log
So that could mean that they've just taken a copy off the files without offlining the database first, anyway to confirm this.
I've come to a point where I have not an immediately clue of what to do, some help even a little push could be helpful.I did
SQL> recover database using backup controlfile until cancel;
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/home/oracle/product/10.1.0/oradata/orcl/redo01.log
Tue Jul 12 12:36:03 2011
ALTER DATABASE RECOVER LOGFILE '/home/oracle/product/10.1.0/oradata/orcl/redo01.log'
Tue Jul 12 12:36:03 2011
Media Recovery Log /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Tue Jul 12 12:36:03 2011
Incomplete recovery applied all redo ever generated.
Recovery completed through change 996740226
Tue Jul 12 12:36:03 2011
orcl; Media Recovery Complete
ARCH: Connecting to console port...
Completed: ALTER DATABASE RECOVER LOGFILE '/home/oracle/pr
Tue Jul 12 12:36:18 2011
ALTER DATABASE RECOVER database using backup controlfile until cancel
Tue Jul 12 12:36:18 2011
Media Recovery Start
Starting datafile 1 with incarnation depth 0 in thread 1 sequence 1
Datafile 1: '/home/oracle/product/10.1.0/oradata/orcl/system01.dbf'
Starting datafile 2 with incarnation depth 0 in thread 1 sequence 1
Datafile 2: '/home/oracle/product/10.1.0/oradata/orcl/undotbs01.dbf'
Starting datafile 3 with incarnation depth 0 in thread 1 sequence 1
Datafile 3: '/home/oracle/product/10.1.0/oradata/orcl/sysaux01.dbf'
Starting datafile 4 with incarnation depth 0 in thread 1 sequence 1
Datafile 4: '/home/oracle/product/10.1.0/oradata/orcl/users01.dbf'
Starting datafile 5 with incarnation depth 0 in thread 1 sequence 1
Datafile 5: '/home/oracle/product/10.1.0/oradata/orcl/temp02.dbf'
Media Recovery Log
It said media recovery complete in sqlplus
when I tried to open I got disconnection forced
Tue Jul 12 12:37:18 2011
alter database open resetlogs
RESETLOGS after complete recovery through change 996740226
Resetting resetlogs activation ID 1284019345 (0x4c889491)
Online log /home/oracle/product/10.1.0/oradata/orcl/redo02.log: Thread 1 Group 2 was previously cleared
Online log /home/oracle/product/10.1.0/oradata/orcl/redo03.log: Thread 1 Group 3 was previously cleared
Setting recovery target incarnation to 4
Tue Jul 12 12:37:18 2011
Setting recovery target incarnation to 4
Tue Jul 12 12:37:18 2011
Flashback Database Disabled
Tue Jul 12 12:37:18 2011
Assigning activation ID 1284062526 (0x4c893d3e)
Maximum redo generation record size = 120832 bytes
Maximum redo generation change vector size = 116476 bytes
Private_strands 7 at log switch
Thread 1 opened at log sequence 1
Current log# 1 seq# 1 mem# 0: /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Successful open of redo thread 1
Tue Jul 12 12:37:18 2011
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Tue Jul 12 12:37:18 2011
SMON: enabling cache recovery
Tue Jul 12 12:37:18 2011
Successfully onlined Undo Tablespace 1.
Dictionary check beginning
Dictionary check complete
Tue Jul 12 12:37:18 2011
SMON: enabling tx recovery
Tue Jul 12 12:37:18 2011
WARNING: The following temporary tablespaces contain no files.
This condition can occur when a backup controlfile has
been restored. It may be necessary to add files to these
tablespaces. That can be done using the SQL statement:
ALTER TABLESPACE <tablespace_name> ADD TEMPFILE
Alternatively, if these temporary tablespaces are no longer
needed, then they can be dropped.
Empty temporary tablespace: TEMP
Database Characterset is UTF8
Tue Jul 12 12:37:18 2011
Published database character set on system events channel
Tue Jul 12 12:37:18 2011
All processes have switched to database character set
Tue Jul 12 12:37:18 2011
Errors in file /home/oracle/product/10.1.0/db_1/admin/orcl/udump/orcl_ora_19084.trc:
ORA-00600: internal error code, arguments: [4194], [21], [17], [], [], [], [], []
Tue Jul 12 12:37:19 2011
Errors in file /home/oracle/product/10.1.0/db_1/rdbms/log/orcl_smon_19072.trc:
ORA-00600: internal error code, arguments: [4194], [75], [7], [], [], [], [], []
Tue Jul 12 12:37:20 2011
Doing block recovery for file 2 block 25323
Block recovery range from rba 1.65.0 to scn 0.996740294
Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0
Mem# 0 errs 0: /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Block recovery stopped at EOT rba 1.67.16
Block recovery completed at rba 1.67.16, scn 0.996740294
Doing block recovery for file 2 block 25
Block recovery range from rba 1.65.0 to scn 0.996740293
Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0
Mem# 0 errs 0: /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Block recovery completed at rba 1.67.16, scn 0.996740294
Tue Jul 12 12:37:20 2011
Errors in file /home/oracle/product/10.1.0/db_1/rdbms/log/orcl_smon_19072.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [75], [7], [], [], [], [], []
Tue Jul 12 12:37:21 2011
Doing block recovery for file 2 block 1295
Block recovery range from rba 1.63.0 to scn 0.996740295
Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0
Mem# 0 errs 0: /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Block recovery stopped at EOT rba 1.67.16
Block recovery completed at rba 1.67.16, scn 0.996740294
Doing block recovery for file 2 block 41
Block recovery range from rba 1.63.0 to scn 0.996740292
Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0
Mem# 0 errs 0: /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Block recovery completed at rba 1.65.16, scn 0.996740293
Tue Jul 12 12:37:21 2011
Errors in file /home/oracle/product/10.1.0/db_1/admin/orcl/udump/orcl_ora_19084.trc:
ORA-00600: internal error code, arguments: [4193], [57818], [10145], [], [], [], [], []
Doing block recovery for file 2 block 622
Block recovery range from rba 1.67.0 to scn 0.996740298
Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0
Mem# 0 errs 0: /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Block recovery stopped at EOT rba 1.69.16
Block recovery completed at rba 1.69.16, scn 0.996740298
Doing block recovery for file 2 block 9
Block recovery range from rba 1.67.0 to scn 0.996740297
Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0
Mem# 0 errs 0: /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Block recovery completed at rba 1.69.16, scn 0.996740298
WARNING: Files may exists in db_recovery_file_dest
that are not known to the database. Use the RMAN command
CATALOG RECOVERY AREA to re-catalog any such files.
One of the following events caused this:
1. A backup controlfile was restored.
2. A standby controlfile was restored.
3. The controlfile was re-created.
4. db_recovery_file_dest had previously been enabled and
then disabled.
Tue Jul 12 12:37:23 2011
Errors in file /home/oracle/product/10.1.0/db_1/admin/orcl/udump/orcl_ora_19084.trc:
ORA-00600: internal error code, arguments: [4194], [75], [7], [], [], [], [], []
Doing block recovery for file 2 block 25323
Block recovery range from rba 1.65.0 to scn 0.996740294
Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0
Mem# 0 errs 0: /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Block recovery completed at rba 1.67.16, scn 0.996740297
Doing block recovery for file 2 block 25
Block recovery range from rba 1.65.0 to scn 0.996740301
Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0
Mem# 0 errs 0: /home/oracle/product/10.1.0/oradata/orcl/redo01.log
Block recovery completed at rba 1.71.16, scn 0.996740302
Tue Jul 12 12:37:24 2011
Errors in file /home/oracle/product/10.1.0/db_1/admin/orcl/udump/orcl_ora_19084.trc:
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [75], [7], [], [], [], [], []
Error 607 happened during db open, shutting down database
USER: terminating instance due to error 607
Instance terminated by USER, pid = 19084
ORA-1092 signalled during: alter database open resetlogs...
************************************************************************************************************************************************************************************************ -
Recover database from cold backup and add ol archivelogs....
Hello!
Scenarion : I have create in 1 january cold backup of my database. I have from 1 to 4 January all archive logs generated by my database. My database gone in 4 January.
Solution question : How can i restore database using cold backup a than add info from archivelogs to recovered database to do database consist from disaster day.
Regards... Marcin1. Kill current instance with SHUTDOWN ABORT.
2. Copy all control files and data files from your cold backup to original destination.
3. Make sure all archived redo logs from 01-JAN to 04-JAN are available in the database archive destination (LOG_ARCHIVE_DEST or LOG_ARCHIVE_DEST_x).
4. Run as SYSDBA:
startup mount
recover database using backup controlfile until cancel;When prompted for something like
ORA-00279: change 864868 generated at 01/14/2010 09:30:10 needed for thread 1
ORA-00289: suggestion :
C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ARCHIVELOG\2010_01_15\O1_MF_1_22_%
U_.ARC
ORA-00280: change 864868 for thread 1 is in sequence #22enter:
AUTOWhen you get something like:
ORA-00308: cannot open archived log
'C:\ORACLEXE\APP\ORACLE\FLASH_RECOVERY_AREA\XE\ARCHIVELOG\2010_01_15\O1_MF_1_29_
%U_.ARC'
ORA-27041: unable to open file
OSD-04002: ouverture impossible du fichier
O/S-Error: (OS 2) Le fichier spécifié est introuvable.run
alter database open resetlogs; -
Cold backup can use archivelog to recover database to point of failure?
Hi,
I have the small doubts. In any DB let us say we have following condtions:
1) DB is running in ARCHIVELOG mode.
2) Cold backup is performed every sunday.
3) No hot backup or RMAN backup is taken.
so if any failure happens during weekday say on friday. can we recover our database till the point of failure with the help of cold backup? If yes then pls specify the steps how to do it.
could archive log be applied on cold backup?
Thanks,
ShaileshShailesh.mishra wrote:
Hi,
I have the small doubts. In any DB let us say we have following condtions:
1) DB is running in ARCHIVELOG mode.
2) Cold backup is performed every sunday.
3) No hot backup or RMAN backup is taken.
so if any failure happens during weekday say on friday. can we recover our database till the point of failure with the help of cold backup? If yes then pls specify the steps how to do it.
could archive log be applied on cold backup?
Shaliesh,
Cold or hot backup doesn't govern teh recovery. Whether the recovery is going to be a complete or incomplete recovery, I mean we can recover teh complete data or would be thrown back to the last good backup stage is governed by the availability of the archives. If you have teh archive log enabled , this means yiou have all teh transaction records already with you. So if you have taken your backup on Sunday, and faced a crash on Tuesday, all you have to do is to restore the last good bcakup from Sunday, give a recover command and oracle would start applying the archivelogs to the files. This would be a complete recovery providied anything else had not happen which can stop it, for example, loss of an archive log.
So teh answer would be, yes archive logs are very well applicable on teh cold backup.
HTH
Aman.... -
Recover datafile using cold backup in archivelog mode
Hi,
I have lost one of my datafiles i.e New.dbf from the disk. I have full database cold backup of last sunday. Also I have the archives. Is it possible to restore and recover only the lost datafile? Please help.If you used RMAN to create the backup, then use RMAN again to restore that one datafile alone (RESTORE DATAFILE n) and then recover it (RECOVER DATAFILE n).
If you didn't use RMAN but you are sure that the backup was a COLD Backup, manually restore the datafile and then issue a RECOVER DATAFILE n from the SQLPlus command.
In either case you must ensure that the datafile is OFFLINE before you restore the file -- or take it OFFLINE with ALTER DATABASE DATAFILE n OFFLINE IMMEDIATE before doing the restore.
After the RECOVER is completed, you must bring it ONLINE with an ALTER DATABASE DATAFILE n ONLINE
Hemant K Chitale
http://hemantoracledba.blogspot.com -
Recover a database using cold backup
Hi,
I am working in oracle 9i and solaris 5.8. I am taking coldbackup and its stored in another solaris server. I need to create a new database in the backup server using the cold backup files.
Please explain me in detail how to create a database using the files.
SQL QUERY needed.
Gobi.Hi,
go through below link
Re: Help! How to migrant my whole DBXE to another computer???!!!!!
hope this helps
Taj -
Recover a cold backup in another BD.
Somebody can help me, i have a doubt, Can I Restore the datafiles from a cold backup (DataBase A) in a Database B?
If you executed the command "alter database backup controlfile to trace" the trace will generated in the "udump" directory. From there you can edit file. REMEMBER- Give the original copy of the backup file (do not move the files). Do a copy.
Here's a sample if you want recreate the SID name. Noted you have to modify the location if the paths are difference.
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "TESTDB" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 1168
LOGFILE
GROUP 1 '/data/oracle/TESTDB/redo01a.log' SIZE 100M,
GROUP 2 '/data/oracle/TESTDB/redo02a.log' SIZE 100M,
GROUP 3 '/data/oracle/TESTDB/redo03a.log' SIZE 100M
-- STANDBY LOGFILE
DATAFILE
'/data/oracle/TESTDB/system01.dbf',
'/data/oracle/TESTDB/undotbs01.dbf',
'/data/oracle/TESTDB/sysaux01.dbf',
'/data/oracle/TESTDB/users01.dbf'
CHARACTER SET WE8ISO8859P1
If you want to change the SID the use the command
CREATE CONTROLFILE SET DATABASE "NEWTEST" RESETLOGS ARCHIVELOG -
Recovering through a cold backup
I was talking to a colleague yesterday, and they take cold backups of their database weekly. It brought up a question that I couldn't reason out the answer to:
time 0
cold backup
time 1
cold backup
time 1.5
database recovery needed, time 1 DBF files missing from the backup,
although archived redo is available through to time 1.5
time 2
(never reached)Is it possible with cold backups, to go back to the time 0 backup, and a current controlfile, to use the time 0 DBF's to roll all the way forward to time 1.5? Since all of the archived redo is available? Since all of the archived redo log information is stored in the SYS schema, everything should be available?
Thanks,
--=Chuckchuckers wrote:
I was talking to a colleague yesterday, and they take cold backups of their database weekly. It brought up a question that I couldn't reason out the answer to:
time 0
cold backup
time 1
cold backup
time 1.5
database recovery needed, time 1 DBF files missing from the backup,
although archived redo is available through to time 1.5
time 2
(never reached)Is it possible with cold backups, to go back to the time 0 backup, and a current controlfile, to use the time 0 DBF's to roll all the way forward to time 1.5? Since all of the archived redo is available? Since all of the archived redo log information is stored in the SYS schema, everything should be available?
Thanks,
--=ChuckThe short answer is "YES".
The longer answer is that you need to be smarter than the equipment you are using in order to succeed at "rolling forward" the archived REDO log files. -
Need clarification for cold backup and recovery
Hello Everyone ..
I have much confusion on cold backup and recovery topic.
Already i posted a scanario regarding this and i want to know some clarity points to understand.
1. I had cold backup two days before
2. I am creating an object *(EMP)* and inserting some records then issue log switch continiously.
3. Manually i removed all physical files (datafiles , control files , log files , redolog files ...)
4. then i issued STARTUP FORCE MOUNT;
5. here i am getting error identifying control file.
6. cold backup two days before all files restored
6. then i issue recover database using backup controlfile until cancel;
7. i am trying to issue select * from emp; i am getting error
select * from emp
*ERROR at line 1:
ORA-00942: table or view does not existMy QUESTION IS
After cold backup finished , i created emp table ..
when restoring old back " There is no emp table"
*- then , can i recover emp table ? - If so , please explain about this ..*
Note : REF - LINK https://forums.oracle.com/forums/message.jspa?messageID=11056341#11056341
- Above link says what i did ? . In this thread i am asking concept & logic ..
please do NOT consider as "*DUPLICATE*"When you recover the database using backup controlfile until cancel, you have to apply archived logs. Did you apply all of them?
If the create command was in the online redo, not yet archived, and you lost the online redo, then you won't have it. This is why you want to have redo multiplexed, it is a critical piece.
In some recovery scenarios, if you haven't lost the online redo, you need to specify those files as if they were archives.
It is normally easier to just be sure you have the latest controlfiles and let Oracle figure it out automatically (which is why you want to use online RMAN backups rather than cold backups). But yes, it is important to understand what is going on for different scenarios. I used to have manual standbys, and one of the disaster instruction sets explained to try to get online redo over to the standby to lose as few transactions as possible. That could still be useful for some snapshot hardware type scenarios, assuming the business is too cheap to do proper failovers. -
How to recover a table from a coldback?
Hi:
I was asked in an interview. if a user deleted a table, how to recover it from a coldback? Please give me the steps.
Thank you and regards.1. Take a cold backup of the current database.
2. Restore the full old backup from tape/disk etc.
3. Oracle Export the table that needs recovering.
4. Shutdown the database.
5. Restore the database from the first step.
6. Start the database.
7. Oracle Import the table from the third step.
Hope this helps.
Best regards,
Mark. -
A question about restoring from cold backup(control file backup not clear)
Hi,
I had another question about restoring the cold backup. My database is in noarchivelog mode and after taking a consistent cold backup, all I need to do is to restore the backup right? -Why I got this question is because: when I backup my control file to trace, I see statements like this:-----
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE '/uo1/app1/arch1_1_647102958.dbf';
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE
-- Database can now be opened normally.
ALTER DATABASE OPEN;
My database is in noarchivelog mode now so don't know why these statements (of register the logfile) is there in the backup of control file? so when I restore the cold backup of this database, it will still work correct? (there is no logfile I have only CRD files in cold backup -no archive log files.)
thanks
NiravThanks for your inputs! It is most useful to me.
Regards
Nirav -
Cold backup tablespace restore
From a cold backup can you restore a tablespace to a different database.
A datafile was created and dropped and now we are recieving ORA-1186, ORA-1157 cannnot/identify lock datafile
We know that if our database goes down it won't come back up. The table space has about 250 tables and its huge about 100g in size. Does anyone know of what steps needs to be taken?
Edited by: user10767182 on Jan 6, 2009 8:35 PMI couldn't quite workout what you were saying, but I think you were suggesting that copies of the lost tables and data are sitting in a second database somewhere, and you would like to pull them out of that database and plug them into the broken database. Is that right?
If so, you cannot take a datafile from one database and plug it into another, unless you use the transportable tablespace option.
Basically, on your broken database, you'd shut it down, bring it back to the mount state and then say alter database datafile X offline drop
That will let you issue an alter database open followed by a drop tablespace X, and your broken database will at least be open, minus the important tablespace
You then get your second database open and make the important tablespace read-only
You'd drop to the command line and do an export using the TRANSPORT_TABLESPACE option -the command is too susceptible to the specifics to show you here. Check the documentation at http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta063.htm
You then copy the datafile and the export dump file to the server where your broken database is running
You then run an import, again specifying the TRANSPORT_TABLESPACE option
Effectively, the datafile copy gets 'plugged in' to the broken database and gets adopted as a native, brand new tablespace, complete with contents. You finish off by making the tablespace read-write in both databases once more.
Obviously, you lose data using this sort of process: the data comes back into your 'broken' database in the same state it was in your second database, and you can't apply redo to it to recover it to a more recent state. But that's going to be the best you can do if you don't have proper physical backups of the file. Your subject mentioning cold backups confused me a little on that score too.
So I won't go into any more detail for now. It may be that I misunderstood the reference to 'restore a tablespace to a different database' and your requirements completely. But if this sounds like what you are after, and if you are stuck on any of the details, then you can always post a follow-up. -
Hi,
Oracle version:10.2
Operating system : linux
Can we flashback a table-data when the table was truncated.Is there any flashback option to get back the data.
Here my database is in noarchive mode.
Regards.
PoornaHi!
Point-In-Time recovery is not possible for you because your database runs in NOARCHIVELOG mode. But I'll try to tell you what to do to get your data back. For this I assume that you have a full cold backup of your database. Otherwise there will be no chance to get your table back.
1.) Copy your backup to another host with the same operating system as your production DB runs on.
2.) Install the Oraclesoftware like you did on your production host.
3.) Copy your SPFILE to $ORACLE_HOME/dbs
4a.) If you have a RMAN backup restore and recover it like that:
rman target /
startup force nomount;
CATALOG BACKUPPIECE '/path_to_your_backup/name_of_your_backuppiece';
RESTORE controlfile;
SQL 'ALTER DATABASE MOUNT';
RESTORE database;
RECOVER database NOREDO;
SQL 'ALTER DATABASE OPEN RESETLOGS';
exit4b.) If you have a user managed backup please restore it by your self as I do not know what kind of backup it is.
5.) Export the truncated table from the recovered database. And please be sure to replace the string "truncated_table" with the correct name of the table you have truncated.
expdp system/password DUMPFILE=trunc_table.dmp DIRECTORY=data_pump_dir TABLES=truncated_table6.) Copy the dumpfile to your production host.
7.) Reimport the dump into your production DB.
impdp system/password DUMPFILE=trunc_table.dmp DIRECTORY=data_pump_dir TABLES=truncated_table TABLE_EXISTS_ACTION=replaceI hope that this will help you a long with your problem.
Good luck.
Florian W.
Maybe you are looking for
-
Why is PRE 8.0 so slow on my Windows 7 installation?
I've been using Premiere Elements 3.0 on my PC with Vista for some time, and it's acceptably fast. I've now installed Windows 7 (a clean installation), and installed Premiere Elements 8. It is just soooo slow by comparison. If I load a project, which
-
ik have adobe reader x but wehn a get a pdf i can't not open it, wehn i open than get i wordpad why?.someone a solition?
-
Lost functionality between CS6 and CC2014
In CS6 if you were zoomed into a photo you could press the space-bar and C to zoom out and treat the window as if it were the navigator pallet... In CC 2014 this option seems to be gone. Is it just hidden or is it really gone and if it is gone where
-
How to Call action Listener from Mouse Listener event
One class (class 1)implements mouse listener and responds to a mouse events. As part of that response it needs to call a variable set method in another class (class 2)and also have that setMethod call it's own ActionPerformed. Seems the problem is I
-
my pin is not working what i have to do? plzz reply