Recover the database to a point
hi experts,
In my database one important table has been uppdated with wrong data. I need to recover the old data.
How can I do this. ????
Pls can somebody explain ???
Hi,
Just a comment ....
One option, but in your case the worse option will perform an incomplete recovery based on time.
Example:
It is 12:00 AM and the EMP table was wrong updated at 11:45 AM
Then you can:
1) shutdown the database and make a backup
2) restore all datafiles from most recent backup
3) mount the database
4) recover the database like below:
SQL> recover database until time '2007-02-13:11:44:00'
5) synchronize the datafile with control files and redo log files like below:
SQL> alter database open resetlogs
6) Make a backup of your database
Disadvantage of this method
After the recovery process, all information after 11:44 AM will must be informed again ...
Cheers
Similar Messages
-
Problem in recovering the database!!!
Hi All,
I created a new database and wanted to restore the backup of another database into it, I created the required tablespaces and started restore of backup from RMAN using
run {
allocate channel 'dev_0' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=orcl,OB2BARLIST=DAILY_HISDBS01_ORACLE-DB_ONLINE_5W,OB2BARHOSTNAME=hisdbs01.kfmc.med)';
restore controlfile from 'c-1179279249-20090511-02';
alter database mount;
release channel 'dev_0';
The controlfile got restored successfully, then I tried to restore & recover the database
run {
allocate channel 'dev_0' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=central,OB2BARLIST=DAILY_HISDBS01_ORACLE-DB_ONLINE_5W,OB2BARHOSTNAME=hisdbs01.kfmc.med)';
restore database;
recover database;
release channel 'dev_0';
The restore was successful, but when I tried to open the database with resetlogs option
SQL> alter database open resetlogs;
alter database open resetlogs
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DATADG/orcl/datafile/system.295.686609187'
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 1136286903 generated at 05/11/2009 02:08:22 needed for thread1
ORA-00289: suggestion : */arch/archivelog/1_8493_651861624.dbf*
ORA-00280: change 1136286903 for thread 1 is in sequence #8493
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DATADG/orcl/datafile/system.295.686609187'
ORA-01112: media recovery not started
The recovery process is looking for */arch/archivelog/1_8493_651861624.dbf* this archivelog, but this archivelog file is not present at that location, the restore process should have restored all the archivelogs as well, actually no archivelogs got restored, how can I recover the database without archivelog logs? it is not possible at all.
PLEASE tell me how can I make the database work?Thanks Hemant !!!
I restored the archivelogs using the script below
run {
allocate channel 'dev_0' type 'sbt_tape'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=central,OB2BARLIST=DAILY_HISDBS01_ORACLE-DB_ONLINE_5W,OB2BARHOSTNAME=hisdbs01.kfmc.med)';
restore ARCHIVELOG FROM TIME 'SYSDATE-5' UNTIL TIME 'SYSDATE';
release channel 'dev_0';
then recoverd the database and applied the requested archivelog file and opened the database with resetlogs, it is now successfully recovered upto the point I wanted it to be. -
How to recover the database when some of the archive log file get deleted.
I am facing a problem with Oracle database, which is related to archivelogs.
Our development database is running in archivelog mode, but we don't have backups scheduled and have no recovery catalog.
When the database was in running condition, disk got full, so some archivelogs were deleted manually.
After this they restarted the DB, and now DB is not coming up. Errors are as follows:
SQL> startup
ORACLE instance started.
Total System Global Area 1444383504 bytes
Fixed Size 731920 bytes
Variable Size 486539264 bytes
Database Buffers 956301312 bytes
Redo Buffers 811008 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
alter database open resetlogs
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/export/home/oracle/dev/ADVFRW/ADVFRW.system'
SQL> recover datafile '/export/home/oracle/dev/ADVFRW/ADVFRW.system'
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
SQL> recover database using backup controlfile;
ORA-00279: change 215548705 generated at 09/02/2008 17:06:10 needed for thread
1
ORA-00289: suggestion :
/export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC
ORA-00280: change 215548705 for thread 1 is in sequence #1107
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC
ORA-00308: cannot open archived log
'/export/home/oracle/dev/ADVFRW/ADVFRW.archivelog1/LOG_ADVFRW_1107_1.ARC'
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SQL>
1. How to recover the database and bring it online
Any help will be highly appreciated.
With Regards
Hemant Joshi
Edited by: hem_Kec on Sep 7, 2008 9:07 AMHi,
Archive log files are the copies of redolog files.As redo log files are circularly overwritten,oracle generates archive log file of the corresponding redo logfiles being overwritten.So if you have a backup that dates back to 10 am in the morning and if your database creashed at 3 pm,you cannot use the redo log files alone as they have incomplete information.To completely recover the database upto 3 pm,you need archive log files generated between 10 am to 3 pm. In your case since you are missing one archive log file,you cannot perform complete recovery and hence would suffer data loss. -
Redo log files are deleted, how to recover the database
Hi All,
I removed the redo01.log, redo02.log and redo03.log files of our Oracle database. And it caused the db to fail. Is there any way I can recover the database and startup database in normal mode? I do not need it to have all the latest data restored, I will be happy to just start the db and get going.
database is in arcive log mode.
ThanksHello,
You may try this if the database is mounted:
recover database until cancel;
cancel
alter database open resetlogs;Hope it can help.
Best regards,
Jean-Valentin -
What should be done to recover the database?
Hi all,
While backing up the database, the computer running Oracle loses power. After restarting the
computer what should be done to recover the database?
Please help me..
Thank you all for your cooperate.Thanks mr. Eduardo Rezende.
I'm an Arab student and now I study database administrator course. This question asked by my teacher. So, if anyone can answer this question and some other questions please help me. -
Can I recover the database to the current time using a backup control file?
Can I recover the database to the current time using a backup control file? How far can I recover this database?
I have an Oracle 10g(10.2.3) database on RHEL4.3 system.
I have lost all the current control files and all the online redo logs, archived redo logs and all other files are OK.
Now I have to recovery this database using a backup control file.
Can I recover the database without any data lost?If
a) it was a Shutdown Abort or an Instance Crash (i.e. backgrounds died on detecting loss of redo logs),
b) redo logs are lost
c) data files are intact
You'd have to
a) Restore datafiles
b) Do an Incomplete Recovery to the last available ArchiveLog
Hemant K Chitale
http://hemantoracledba.blogspot.com -
EnvironmentFailureException thrown while recovering the database!
While recovering the database, an EnvironmentFailureException with LOG_FILE_NOT_FOUND was thrown. The exception was thrown after some data was recovered, and the left data can not be recovered because of the EnvironmentFailureException.
I upgraded the je to 4.1.7, but the data still can not be recovered!
Caused by: com.sleepycat.je.EnvironmentFailureException: Environment invalid because of previous exception: (JE 4.0.92) /home/admin/shopcenter/cdncleaner fetchTarget of 0x64/0x3b8f73 parent IN=8811763 IN class=com.sleepycat.je.tree.IN lastFullVersion=0xffffffff/0xffffffff parent.getDirty()=true state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.
at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1241)
at com.sleepycat.je.tree.Tree.searchSubTreeInternal(Tree.java:1858)
at com.sleepycat.je.tree.Tree.searchSubTree(Tree.java:1682)
at com.sleepycat.je.tree.Tree.search(Tree.java:1548)
at com.sleepycat.je.dbi.CursorImpl.searchAndPosition(CursorImpl.java:2054)
at com.sleepycat.je.Cursor.searchInternal(Cursor.java:2088)
at com.sleepycat.je.Cursor.searchAllowPhantoms(Cursor.java:2058)
at com.sleepycat.je.Cursor.search(Cursor.java:1926)
at com.sleepycat.je.Cursor.getSearchKey(Cursor.java:1351)
at com.sleepycat.util.keyrange.RangeCursor.doGetSearchKey(RangeCursor.java:966)
at com.sleepycat.util.keyrange.RangeCursor.getSearchKey(RangeCursor.java:593)
at com.sleepycat.collections.DataCursor.doGetSearchKey(DataCursor.java:571)
at com.sleepycat.collections.DataCursor.initForPut(DataCursor.java:812)
at com.sleepycat.collections.DataCursor.put(DataCursor.java:752)
at com.sleepycat.collections.StoredContainer.putKeyValue(StoredContainer.java:322)
at com.sleepycat.collections.StoredMap.put(StoredMap.java:280)
at com.taobao.shopservice.picture.core.util.BdbStoredQueueImpl.offer(BdbStoredQueueImpl.java:118)
at com.taobao.shopservice.picture.core.service.CdnClearServiceImpl.clearCdnCache(CdnClearServiceImpl.java:45)
at sun.reflect.GeneratedMethodAccessor484.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.taobao.shopservice.common.monitor.ProfileInterceptor.invoke(ProfileInterceptor.java:26)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy74.clearCdnCache(Unknown Source)
at com.taobao.shopservice.picture.core.service.PictureWriteServiceImpl.movePicturesToRecycleBin(PictureWriteServiceImpl.java:302)
at com.taobao.shopservice.picture.core.service.PictureWriteServiceImpl.deletePictures(PictureWriteServiceImpl.java:207)
at sun.reflect.GeneratedMethodAccessor483.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.taobao.shopservice.common.monitor.ProfileInterceptor.invoke(ProfileInterceptor.java:26)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy77.deletePictures(Unknown Source)
at sun.reflect.GeneratedMethodAccessor482.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.taobao.hsf.rpc.tbremoting.provider.ProviderProcessor.handleRequest0(ProviderProcessor.java:222)
at com.taobao.hsf.rpc.tbremoting.provider.ProviderProcessor.handleRequest(ProviderProcessor.java:174)
at com.taobao.hsf.rpc.tbremoting.provider.ProviderProcessor.handleRequest(ProviderProcessor.java:41)
at com.taobao.remoting.impl.DefaultMsgListener$1ProcessorExecuteTask.run(DefaultMsgListener.java:131)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: /home/admin/shopcenter/cdncleaner/00000064.jdb (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
at com.sleepycat.je.log.FileManager$1.<init>(FileManager.java:993)
at com.sleepycat.je.log.FileManager.openFileHandle(FileManager.java:992)
at com.sleepycat.je.log.FileManager.getFileHandle(FileManager.java:888)
at com.sleepycat.je.log.LogManager.getLogSource(LogManager.java:1073)
at com.sleepycat.je.log.LogManager.getLogEntry(LogManager.java:779)
at com.sleepycat.je.log.LogManager.getLogEntryAllowInvisibleAtRecovery(LogManager.java:743)
at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1225)
... 49 more
2011-03-24 00:00:27,967 INFO [org.quartz.core.JobRunShell] Job DEFAULT.cdnCleanerJobDetail threw a JobExecutionException:
org.quartz.JobExecutionException: Invocation of method 'clearCdn' on target class [class com.taobao.shopservice.picture.core.job.clearcdn.CdnCleaner] failed [See nested exception: com.sleepycat.je.EnvironmentFailureException: (JE 4.0.92) Environment must be closed, caused by: com.sleepycat.je.EnvironmentFailureException: Environment invalid because of previous exception: (JE 4.0.92) /home/admin/shopcenter/cdncleaner fetchTarget of 0x64/0x3b8f73 parent IN=8811763 IN class=com.sleepycat.je.tree.IN lastFullVersion=0xffffffff/0xffffffff parent.getDirty()=true state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.]
at sun.reflect.GeneratedConstructorAccessor102.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:283)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
* Nested Exception (Underlying Cause) ---------------
com.sleepycat.je.EnvironmentFailureException: (JE 4.0.92) Environment must be closed, caused by: com.sleepycat.je.EnvironmentFailureException: Environment invalid because of previous exception: (JE 4.0.92) /home/admin/shopcenter/cdncleaner fetchTarget of 0x64/0x3b8f73 parent IN=8811763 IN class=com.sleepycat.je.tree.IN lastFullVersion=0xffffffff/0xffffffff parent.getDirty()=true state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.
at com.sleepycat.je.EnvironmentFailureException.wrapSelf(EnvironmentFailureException.java:197)
at com.sleepycat.je.dbi.EnvironmentImpl.checkIfInvalid(EnvironmentImpl.java:1403)
at com.sleepycat.je.Database.checkEnv(Database.java:1772)
at com.sleepycat.je.Database.openCursor(Database.java:619)
at com.sleepycat.collections.CurrentTransaction.openCursor(CurrentTransaction.java:416)
at com.sleepycat.collections.MyRangeCursor.openCursor(MyRangeCursor.java:54)
at com.sleepycat.collections.MyRangeCursor.<init>(MyRangeCursor.java:30)
at com.sleepycat.collections.DataCursor.init(DataCursor.java:171)
at com.sleepycat.collections.DataCursor.<init>(DataCursor.java:59)
at com.sleepycat.collections.StoredContainer.getValue(StoredContainer.java:301)
at com.sleepycat.collections.StoredMap.get(StoredMap.java:241)
at com.taobao.shopservice.picture.core.util.BdbStoredQueueImpl.peek(BdbStoredQueueImpl.java:131)
at com.taobao.shopservice.picture.core.util.BdbStoredQueueImpl.poll(BdbStoredQueueImpl.java:169)
at com.taobao.shopservice.picture.core.job.clearcdn.CdnCleaner.clearCdn(CdnCleaner.java:194)
at sun.reflect.GeneratedMethodAccessor641.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:283)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:272)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: com.sleepycat.je.EnvironmentFailureException: Environment invalid because of previous exception: (JE 4.0.92) /home/admin/shopcenter/cdncleaner fetchTarget of 0x64/0x3b8f73 parent IN=8811763 IN class=com.sleepycat.je.tree.IN lastFullVersion=0xffffffff/0xffffffff parent.getDirty()=true state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.
at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1241)
at com.sleepycat.je.tree.Tree.searchSubTreeInternal(Tree.java:1858)
at com.sleepycat.je.tree.Tree.searchSubTree(Tree.java:1682)
at com.sleepycat.je.tree.Tree.search(Tree.java:1548)
at com.sleepycat.je.dbi.CursorImpl.searchAndPosition(CursorImpl.java:2054)
at com.sleepycat.je.Cursor.searchInternal(Cursor.java:2088)
at com.sleepycat.je.Cursor.searchAllowPhantoms(Cursor.java:2058)
at com.sleepycat.je.Cursor.search(Cursor.java:1926)
at com.sleepycat.je.Cursor.getSearchKey(Cursor.java:1351)
at com.sleepycat.util.keyrange.RangeCursor.doGetSearchKey(RangeCursor.java:966)
at com.sleepycat.util.keyrange.RangeCursor.getSearchKey(RangeCursor.java:593)
at com.sleepycat.collections.DataCursor.doGetSearchKey(DataCursor.java:571)
at com.sleepycat.collections.DataCursor.initForPut(DataCursor.java:812)
at com.sleepycat.collections.DataCursor.put(DataCursor.java:752)
at com.sleepycat.collections.StoredContainer.putKeyValue(StoredContainer.java:322)
at com.sleepycat.collections.StoredMap.put(StoredMap.java:280)
at com.taobao.shopservice.picture.core.util.BdbStoredQueueImpl.offer(BdbStoredQueueImpl.java:118)
at com.taobao.shopservice.picture.core.service.CdnClearServiceImpl.clearCdnCache(CdnClearServiceImpl.java:45)
at sun.reflect.GeneratedMethodAccessor484.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.taobao.shopservice.common.monitor.ProfileInterceptor.invoke(ProfileInterceptor.java:26)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy74.clearCdnCache(Unknown Source)
at com.taobao.shopservice.picture.core.service.PictureWriteServiceImpl.movePicturesToRecycleBin(PictureWriteServiceImpl.java:302)
at com.taobao.shopservice.picture.core.service.PictureWriteServiceImpl.deletePictures(PictureWriteServiceImpl.java:207)
at sun.reflect.GeneratedMethodAccessor483.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.taobao.shopservice.common.monitor.ProfileInterceptor.invoke(ProfileInterceptor.java:26)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy77.deletePictures(Unknown Source)
at sun.reflect.GeneratedMethodAccessor482.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.taobao.hsf.rpc.tbremoting.provider.ProviderProcessor.handleRequest0(ProviderProcessor.java:222)
at com.taobao.hsf.rpc.tbremoting.provider.ProviderProcessor.handleRequest(ProviderProcessor.java:174)
at com.taobao.hsf.rpc.tbremoting.provider.ProviderProcessor.handleRequest(ProviderProcessor.java:41)
at com.taobao.remoting.impl.DefaultMsgListener$1ProcessorExecuteTask.run(DefaultMsgListener.java:131)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: /home/admin/shopcenter/cdncleaner/00000064.jdb (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
at com.sleepycat.je.log.FileManager$1.<init>(FileManager.java:993)
at com.sleepycat.je.log.FileManager.openFileHandle(FileManager.java:992)
at com.sleepycat.je.log.FileManager.getFileHandle(FileManager.java:888)
at com.sleepycat.je.log.LogManager.getLogSource(LogManager.java:1073)
at com.sleepycat.je.log.LogManager.getLogEntry(LogManager.java:779)
at com.sleepycat.je.log.LogManager.getLogEntryAllowInvisibleAtRecovery(LogManager.java:743)
at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1225)
... 49 moreI mean that i can open the database and read some data from it, which was stored before the database was closed, and than the exception was thrown.
here is exception stack with JE 4.1.7:
com.sleepycat.je.EnvironmentFailureException: (JE 4.1.7) F:\job fetchTarget of 0x64/0x4735f7 parent IN=7847269 IN class=com.sleepycat.je.tree.IN lastFullVersion=0x66/0x927f09 parent.getDirty()=false state=0 LOG_FILE_NOT_FOUND: Log file missing, log is likely invalid. Environment is invalid and must be closed.
at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1337)
at com.sleepycat.je.tree.IN.fetchTargetWithExclusiveLatch(IN.java:1278)
at com.sleepycat.je.tree.Tree.getNextBinInternal(Tree.java:1358)
at com.sleepycat.je.tree.Tree.getPrevBin(Tree.java:1240)
at com.sleepycat.je.dbi.CursorImpl.getNextWithKeyChangeStatus(CursorImpl.java:1754)
at com.sleepycat.je.dbi.CursorImpl.getNext(CursorImpl.java:1617)
at com.sleepycat.je.Cursor.retrieveNextAllowPhantoms(Cursor.java:2488)
at com.sleepycat.je.Cursor.retrieveNext(Cursor.java:2304)
at com.sleepycat.je.Cursor.getPrev(Cursor.java:1190)
at com.ppsoft.bdb.test.Main.main(Main.java:52)
Caused by: java.io.FileNotFoundException: F:\job\00000064.jdb (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
at com.sleepycat.je.log.FileManager$1.<init>(FileManager.java:995)
at com.sleepycat.je.log.FileManager.openFileHandle(FileManager.java:994)
at com.sleepycat.je.log.FileManager.getFileHandle(FileManager.java:890)
at com.sleepycat.je.log.LogManager.getLogSource(LogManager.java:1074)
at com.sleepycat.je.log.LogManager.getLogEntry(LogManager.java:778)
at com.sleepycat.je.log.LogManager.getLogEntryAllowInvisibleAtRecovery(LogManager.java:742)
at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1320)
... 9 more -
To Recover The Database Using a New Version of Datafile
Please give me the solution immediately
My one of the datafile is new and it is very important. It contains many data. I have a backup. I copy all the old files exept the new one. How i attatch the new datafile to the old database files. Now it sees the new file does not match with the old datafile and controlfile. It shows the message
THE CONTROLFILE VERSION IS OLDER THAN THE NEW DATAFILE VERSION.
our database version is 8.0
How i recoverHi;
Please Give a Solution for the following problem.
First I shutdown the databae.
Copy all the redolog,control file and Datafile except one.
One datafile i miss at the time of copy.
Then I start the database and do some transactions.
At that time my system tablespace has been corrupted.
So i copy the old backup and overwrite with the actul file.
So one file backup is not there, that i forgot to take.
At the time of opening the database it shows that datafile version is higher than the controlfile.
Now what i did is came to mount stage and type the following command.
ALTER DATABASE DATAFILE <FILENAME> OFFLINE DROP;
After that i open the database.
Now the problem is that missing file contain very important data.
Is it possible to recover the data?
Please give me an immediate solution. -
I want to recover the Deleted Database
We have an accidentally deleted the database, there is no recent backup file for past 5 months. I want to recover the deleted database. Please give an idea/Suggestions to recover the database. And also we tried some third party tools like kernal,SQL Recovery,Steller
Phenix and those tools are repairing the corrupted database,but it could not find the deleted ".mdf" file for the database. Please give a best steps/suggestions to recover the database.Is there any option to recover the ".mdf" and ".ldf" files of deleted database by using file recovery softwares
You can try some of the Windows "undelete" tools, but there is no guarantee it will work or that the database files will be in a valid state afterwards.
The only reliable way is to restore a backup ... which you don't have.
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Hello All,
The disk failure caused our production data on the disk to be resotred with the backup data available and recovered through RMAN with cotrolfile , and no catalog DB is configured.
I had the restored the spfile and control file then recovered the database,
startup nomount;
RESTORE SPFILE FROM ' path ' ;
Shutdown immediate;
startup nomount
Restore controfile from autobackup;
restore database;
[AT POINT , A MESSAGE PROMPTED LIKE " failur of restored command - some targets not found" (thinking may be few archives are not found, i proceeded to incomeplete recovery of DB) ]
recover database;
Finished reocvery .
Now in the Grid control i see that 60 blocks of a particular datafile are corrupted and needs recovery. Do i need to get the data file resotred again and recover it or any simple way to recover this data file
When i perform the block recovery , it says recovery failed and when i run the data file recovery it succeeds. Please provide you inputs to recover the database as it is production BI database and pretty critical to our client.
Thanks for your valuable time in advance.
Regards,
Ran G.These is a common problem if the object are created due to NOLOGGIN option. If you check most of the object which are facing block corruption is indexes .
Use the below query to check the objects :
It will map each block from v$database_block_corruption to either a segment or if the block is free.
$ sqlplus / as sysdba
set pagesize 2000
set linesize 250
SELECT e.owner, e.segment_type, e.segment_name, e.partition_name, c.file#
, greatest(e.block_id, c.block#) corr_start_block#
, least(e.block_id+e.blocks-1, c.block#+c.blocks-1) corr_end_block#
, least(e.block_id+e.blocks-1, c.block#+c.blocks-1)
- greatest(e.block_id, c.block#) + 1 blocks_corrupted
, null description
FROM dba_extents e, v$database_block_corruption c
WHERE e.file_id = c.file#
AND e.block_id <= c.block# + c.blocks - 1
AND e.block_id + e.blocks - 1 >= c.block#
UNION
SELECT s.owner, s.segment_type, s.segment_name, s.partition_name, c.file#
, header_block corr_start_block#
, header_block corr_end_block#
, 1 blocks_corrupted
, 'Segment Header' description
FROM dba_segments s, v$database_block_corruption c
WHERE s.header_file = c.file#
AND s.header_block between c.block# and c.block# + c.blocks - 1
UNION
SELECT null owner, null segment_type, null segment_name, null partition_name, c.file#
, greatest(f.block_id, c.block#) corr_start_block#
, least(f.block_id+f.blocks-1, c.block#+c.blocks-1) corr_end_block#
, least(f.block_id+f.blocks-1, c.block#+c.blocks-1)
- greatest(f.block_id, c.block#) + 1 blocks_corrupted
, 'Free Block' description
FROM dba_free_space f, v$database_block_corruption c
WHERE f.file_id = c.file#
AND f.block_id <= c.block# + c.blocks - 1
AND f.block_id + f.blocks - 1 >= c.block#
order by file#, corr_start_block#;
Below oracle support note will help you :
ORA-1578 / ORA-26040 Corrupt blocks by NOLOGGING - Error explanation and solution (Doc ID 794505.1)
The Gains and Pains of Nologging Operations (Doc ID 290161.1)
SQL> select d.NAME as DBF_NAME, t.NAME as TS_NAME, d.UNRECOVERABLE_CHANGE# as NOLOG_CHNG#, to_char(d.UNRECOVERABLE_TIME, 'Dy DD-Mon-YYYY HH24:MI:SS') as NOLOG_TIME from V$DATAFILE d join V$TABLESPACE t on d.TS# = t.TS# order by t.NAME;
Thanks,
gssdba.wordpress.com -
Restoring only the tablespace from the database
How do we restore only a 'tablespace' from a Terabyte database without restoring the entire database.
ie... if a particular tablespace has been dropped from the database and we have the backup available for the database.
So, how do we go about it for restoring only that tablespace.
Version:10.2.0.4
OS : solaris 10
Edited by: user13364377 on Sep 29, 2010 3:49 AM
Edited by: user13364377 on Sep 29, 2010 3:51 AMIf you have a RMAN backup before dropping the tablespace then we can restore the tablespace by below method
It is a tablespace point in time recovery ,here we need to create a auxillary DB.
Recover a table/tablespace from Rman backup on same server:
===============================================
Here we have to create the auxillary database.
1.u should have valid backup of the database before dropping the tablespace.
2.create the password file of target database.
orapwd file=$ORACLE_HOME\dbs\PWDORCL2.ORA password=oracle
3.Take backup of the control file to trace for creating the new control file for new
auxillary database/
SQL> alter database backup controlfile to trace;
sample control file:
STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "aux1" RESETLOGS FORCE LOGGING ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 454
LOGFILE
GROUP 1 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO01.LOG' SIZE 10M,//make sure here to change the location of of redo
GROUP 2 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO02.LOG' SIZE 10M, logs to new location or change the location name before
GROUP 3 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO03.LOG' SIZE 10M //starating the database at the end.
-- STANDBY LOGFILE
DATAFILE
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\SYSTEM01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\UNDOTBS01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\SYSAUX01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\USERS01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\USERS02.DBF'
CHARACTER SET WE8MSWIN1252
4.create the password file of auxillary database.
orapwd file=$ORACLE_HOME\dbs\PWDORCL2.ORA password=oracle
5.create the control file
sqlplus "/as sysdba"
SQL>@create.sql
6 catalog all the backuppiece to the newly created database;
catalog backuppiece 'D:\oracle\product\10.1.0\LOG_707656915_50P1';
7.We have to restore system,sysaux,undo and the tablespace which was dropped
run
set newname for datafile 1 to 'D:\oracle\product\10.1.0\oradata\aux1\system01.dbf';
set newname for datafile 2 to 'D:\oracle\product\10.1.0\oradata\aux1\undotbs01.dbf';
set newname for datafile 5 to 'D:\oracle\product\10.1.0\oradata\aux1\users02.dbf';
set newname for datafile 3 to 'D:\oracle\product\10.1.0\oradata\aux1\sysaux01.dbf';
set newname for datafile 4 to 'D:\oracle\product\10.1.0\oradata\aux1\users01.dbf';
restore tablespace SYSTEM;
restore tablespace UNDOTBS1;
restore tablespace users;
restore tablespace sysaux;
switch datafile all;
8.Take the other tablespace offline
sqlplus>alter tablespace tablespace_name offline drop;
9.recover the database prior to the time when tha table/tablespace was dropped.
RMAN> run{
2> set until time "to_date('07-01-2010 14:00:00','dd-mm-yyyy hh24:mi:ss')";
3> recover database;
4> }
10.open the database in resetlog mode.
take a transpotable tablespace backup of that tablespace and import it on the database where you dropped it. -
How can i recover my database after losing system data file.
hi everyone,
how can i recover my database in the following scenario.
1. offline complete backup taken 2 days ago. database was in archive mode.
2. today i lost my system data file, and also lost my all archived files.
3. i started up the database but, the following error was generated.
SQL> startup
ORACLE instance started.
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'D:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF'
4. i copied the system data file from backup and wrote the following statement, to recover the database.
SQL> recover datafile 1;
ORA-00279: change 2234434 generated at 07/15/2009 10:52:10 needed for thread 1
ORA-00289: suggestion : C:\B\ARC00051.001
ORA-00280: change 2234434 for thread 1 is in sequence #51
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
now i don't have any archive file. is there any chance to recover the database ?
R e g a r d s,
Asif Iqbal
Software Engineer,
Lucky Tex, Karachi,
Pakistan.now i don't have any archive file. is there any chance to recover the database ?If no archive log files are available you can't recover the datafile.You need to have all the archives from the time of offline backup was taken till the system datafile is lost.
Anand -
How to recover a database with archive log
how to recover database with archivle log
Hi,
With in information no one can tell the answer.
Kindly post your qusetion in details information, you want to recover the database in archive log mode, what type of error you get, bcoz depending up on the errors you recover your database,
please mention all about your database
cheers
Senthil Kumar -
Problem in recovering a database on another machine
Dear All,
I need your help in restoring and recovering a database on another machine. I don't have access to old machine to get logfile or archivelogs. I have taken full backup using RMAN. I have restored the database using rman sucessfully and trying to recover the database. RMAN have't restored the logfile. Database version is 8.1.7.4, OS is Solaris 8. In recovery, its showing the problem in rbs file. I'm showing all command and error. Just give me any idea that how to recover it sucessfully.
SVRMGRL>recover database using backup controlfile until cancel;
ORA-0279: Change 1935345519 generated at 08/19/2005 16:45:50 needed for thread 1
ORA-0289: suggestion: /u07/oraexp/PROD/arch/arch_1_29958.arc
ORA-0280: Change 1935345519 for thread 1 is in sequence #29958
specify log : {RET}...
cancel
ORA-01547: warning: Recover succeeded but open resetlogs would get error below
ORA-01194: file 2 needs more recovery to be consistent
ORA-01110: data file 2: '/u06/oracle/oradata/PROD/rbs01-PROD.dbf'
This RBS file size is 7GB. Is it the reason of problem. Even I tried until time, but its also has same error.
SVRMGRL>recover database using backup controlfile until time '2005-08-16:20:10:00';
ORA-0279: Change 1935345519 generated at 08/19/2005 16:45:50 needed for thread 1
ORA-0289: suggestion: /u07/oraexp/PROD/arch/arch_1_29958.arc
ORA-0280: Change 1935345519 for thread 1 is in sequence #29958
specify log : {RET}...
cancel
ORA-01547: warning: Recover succeeded but open resetlogs would get error below
ORA-01194: file 2 needs more recovery to be consistent
ORA-01110: data file 2: '/u06/oracle/oradata/PROD/rbs01-PROD.dbf'
Why its asking for archive file which generated on 19th, when I'm trying to recover until 16th only.
Regards
RakeshHi.
What is the size of the redo logs in the database. With a small amount of transactions, there might be redo in this particular archived file from two days back. The timestamp of the archivelogfiles does not indicate that all redo in the file is from this day. It might have changes several days back if no logswitch occured inbetween.
So, if I were you, I would provide all archivelogs required to get the datafiles consistent.
As a matter of fact, if archived redo is in the following folder :
/u07/oraexp/PROD/arch/
I would use recover database until time and press return for all archived logs svrmgrl comes up with.
I assume that the database was closed normally prior to taking the offline backup.
Good luck.
Rgds
Kjell Ove -
How to recovery the database from a complete backup
I have a 10.2.0.3 database with archive log enabled.
I do a cold backup of database every Sunday night.
I shutdown the database, copy all the database files, control files and redo logs to a backup disk.
Then the database started and running again.
I am trying to test my backup and make sure I can recovery the database to the most current stage using the Sunday backup and the archive logs.
for example: use the backup from 4/01/2012, recover the database to today 4/04/2012 9:00am.
What's the steps of doing this?
I tried to copy all the Sunday backup files to the correct location, start the database, the database is started successfully. However, I don't know how to apply the logs from since the Sunday backup upto now.
Thanks a lot!hi,
rman is your friend to do backups, restores and recovers of database.
to do a full recover of database, for example to do a test on your current test database (no in crash):
rman time:
startup nomount;
restore controlfile;
alter database mount;
sql now
select archivelog_change#-1 from v$database;
then go back to rman and do the following :
RMAN> run{
2> set until scn xxxxxx;
3> restore database;
4> recover database;
5> alter database open resetlogs;
6> }
**where xxxxx is the result of your sql query
HTH
--edit:
forgot to told that You will need to set your ORACLE_HOME and ORACLE_SID env variables
Edited by: Me_101 on 04-abr-2012 8:41
Maybe you are looking for
-
Issue while installing Ms Project Server 2013 on MS Server 2012 R2 with Sharepoint Server 2013
Hello MS Support Team, I installed SQL server 2012 & Sharepoint server 2013 and after that the MS project Server 2013 is not installing on the same server -- pls hv a look the enclosed screenshot. sent at [email protected] and guide me to resolve it
-
I think it's the same for other websites as well. That is, that only the visible part of the monitor will print instead of the whole window. I am using the latest upgraded fire fox browser that a non intell I mac G5 can use which is 3.6.8 upgrades ab
-
这是我的代码,图片尺寸为3000*1500时,贴图显示完整,当图片的尺寸为5000*2500时,就出来不能衔接的问题,请问怎么解决? Fd.as package import com.adobe.display.Color; import com.adobe.scenegraph.MaterialBinding; import com.adobe.scenegraph.MaterialStandard; import
-
SEM_APIS.BULK_LOAD_FROM_STAGING_TABLE does not finish
Hi all, I am trying to bulk load an N-Triples file using a staging table according to instructions given in documentation (RDF Semantic Graph Overview). The file contains about 23,000,000 triples, and I have split it in 16 files of 1,437,500 triples,
-
Hi I confuse on how to transform set difference query into java code to work in java program. how do you write a sql query in java that perform set difference. R - S R Except S (in oracle) I want to get all the elements in Set R that are not availabl