Select from .. as of - using archived redo logs - 10g

Hi,
I was under the impression I could issue a "Select from .. as of" statement back in time if I have the archived redo logs.
I've been searching for a while and cant find an answer.
My undo_management=AUTO, database is 10.2.0.1, the retention is the default of 900 seconds as I've never changed it.
I want to query a table as of 24 hours ago so I have all the archived redo logs from the last 48 hours in the correct directory
When is issue the following query
select * from supplier_codes AS OF TIMESTAMP
TO_TIMESTAMP('2009-08-11 10:01:00', 'YYYY-MM-DD HH24:MI:SS')
I get a snapshot to old ORA-01555 error. I guess that is because my retention is only 900 seconds but I thought the database should query the archive redo logs or have I got that totally wrong?!
My undo tablespace is set to AUTOEXTEND ON and MAXSIZE UNLIMITED so there should be no space issues
Any help would be greatly appreciated!
Thanks
Robert

If you want to go back 24 hours, you need to undo the changes...
See e.g. the app dev guide - fundamentals, chapter on Flashback features: [doc search|http://www.oracle.com/pls/db102/ranked?word=flashback&remark=federated_search].

Similar Messages

  • Is it possible to use Archive Redo log file

    Hi friends,
    My database is runing in archive log mode.I had taken cold backup on Sunday but i am taking archive log file daily evening.
    Wednesday my database crash that means i lost all control file,redo log file,datafile etc.
    I have archived log file backup till Tuesday Night and other files like control file,datafile etc of Sunday .
    1)Is it possible to recover database till tuesday if yes HOW to use archive log file.
    (See SCN no of control file and datafiles is same ,if we use RECOVER DATABASE command oracle shows that media recovery is not requide.)
    we don't have current control file we had lost in media crash.
    null

    Dear friend
    In this scenario
    you lost the contorl file
    1>If you have old copy of Contorl file,
    which has the current structure of the
    database and all the archive files then
    you can recover the database with
    Ponint in time recovery (Using Backup Controlfile)
    suresh

  • How could I find specified date of REDO log and archive REDO log ?

    we use Oracle11gr2 on win2008R2.
    1
    How could I find specified date of REDO log(2013/10/17,etc) and archive REDO log ?
    2
    What is the format of archive REDO log.? (zipped file ?)

    user12075536123 wrote:
    1)
    select * from v$archived_log;
    select * from v$log_history;
    but there is a possibility there is no old data
    below contains no filename column
    SQL> desc v$log_history
    Name                                      Null?    Type
    RECID                                              NUMBER
    STAMP                                              NUMBER
    THREAD#                                            NUMBER
    SEQUENCE#                                          NUMBER
    FIRST_CHANGE#                                      NUMBER
    FIRST_TIME                                         DATE
    NEXT_CHANGE#                                       NUMBER
    RESETLOGS_CHANGE#                                  NUMBER
    RESETLOGS_TIME                                     DATE
    there is NO data when archive mode is disabled

  • Hoping for a quick response : EXP and Archived REDO log files

    I apologize in advance if this question has been asked and answered 100 times. I admit I didn't search, I don't have time. I'm leaving on vacation tomorrow, and I need to know if I'm correct about something to do with backup / restore.
    we have 10g R2 running a single instance on a single server. The application vendor has "embedded" oracle with their application. The vendor's backup is a batch file using EXP - thus:
    exp system/xpwdxx@db full=y file=D:\Orant\admin\db\EXP\db_full.dmp log=D:\Orant\admin\db\EXP\db_full.txt direct=y compress=y
    This command is executed nightly at midnight. The files are then backed up by our nightly backup to offsite storage media.
    Te database is running in autoarchive mode. The problem is, the archived redo files filled the drive they were being stored on, and it is the drive the database is on. I used OS commands to move 136G of archived redo logs onto other storage media to free the drive.
    My question: Since the EXP runs at midnight, when there is likely NO activity, do I need to run in AutoArchive Mode? From what I have read, you cannot even apply archived redo log files to this type of backup strategy (IMP) Is that true? We are ok losing changes since our last EXP. I have read a lot of stuff about restoring consistent vs. inconsistent, and just need to know: If my disk fails, and I have to start with a clean install of Oracle and nothing else, can I IMP this EXP and get back up and running as of the last EXP? Or do I need the autoarchived redo log files back to July 2009 (136G of them).
    Hoping for a quick response
    Best Regards, and thanks in advance
    Bruce Davis

    Bruce Davis wrote:
    Amardeep Sidhu
    Thank you for your quick reply. I am reading in the other responses that since I am using EXP without consistent=y, I might not even have a backup. The application vendor said that with this dmp file they can restore us to the most recent backup. I don't really care for this strategy as it is untested. I asked them to verify that they could restore us and they said they tested the dmp file and it was OK.
    Thank you for taking the time to reply.
    Best Regards
    BruceThe dump file is probably ok in the sense it is not corrupted and can be used in an imp operation. That doesn't mean the data in it is transactionally consistent. And to use it at all, you have to have a database up and running. If the database is physically corrupted, you'll have to rebuild a new database from scratch before you can even think about using your dmp file.
    Vendors never understand databases. I once had a vendor tell me that Oracle's performance would be intolerable if there were more than 5 concurrent connections. Well, maybe in HIS product ..... Discussions terminated quickly after he made that statement.

  • The file structure online redo log, archived redo log and standby redo log

    I have read some Oracle documentation for file structure and settings in Data Guard environment. But I still have some doubts. What is the best file structure or settings in Oracle 10.2.0.4 on UNIX for a data guard environment with 4 primary databases and 4 physical standby databases. Based on Oracle documents, there are 3 redo logs. They are: online redo logs, archived redo logs and standby redo logs. The basic settings are:
    1. Online redo logs --- This redo log must be on Primary database and logical standby database. But it is not necessary to be on physical standby database because physical standby is not open. It doesn't generate redo log. However, if don't set up online redo log on physical standby, when primary failover and switch standby as primary. How can standby perform without online redo logs? In my standby databases, online redo logs have been set up.
    2. Archived redo logs --- It is obviously that primary database, logical and physical standby database all need to have this log file being set up. Primary use it to archive log files and ship to standby. Standby use it to receive data from archived log and apply to database.
    3. Standby redo logs --- In the document, it says A standby redo log is similar to an online redo log, except that a standby redo log is used to store redo data received from another database. A standby redo log is required if you want to implement: The maximum protection and maximum availability levels of data protection and Real-time apply as well as Cascaded destinations. So it seems that this standby redo log only should be set up on standby database, not on primary database. Am my understanding correct? Because I review current redo log settings on my environment, I have found that Standby redo log directory and files have been set up on both primary and standby databases. I would like to get more information and education from experts. What is the best setting or structure on primary and standby database?

    FZheng:
    Thanks for your input. It is clear that we need 3 type of redo logs on both databases. You answer my question.
    But I have another one. In oracle ducument, it says If you have configured a standby redo log on one or more standby databases in the configuration, ensure the size of the current standby redo log file on each standby database exactly matches the size of the current online redo log file on the primary database. It says: At log switch time, if there are no available standby redo log files that match the size of the new current online redo log file on the primary database. The primary database will shut down
    My current one data gurard envirnment setting is: On primary DB, online redo log group size is 512M and standby redo log group size is 500M. On the standby DB, online redo log group size is 500M and standby redo log group size is 750M.
    This was setup by someone I don't know. Is this setting OK? or I should change Standby Redo Log on standby DB to 512M to exactly meatch with redo log size on primary?
    Edited by: 853153 on Jun 22, 2011 9:42 AM

  • Recover Database is taking more time for first archived redo log file

    Hai,
    Environment Used :
    Hardware : IBM p570 machine with P6 processor Lpar of .5 CPU and 2.5 GB Ram
    OS : AIX 5.3 ML 07
    Cluster: HACMP 5.4.1.2
    Oracle Version: 9.2.0.4 RAC
    SAN : DS8100 from IBM
    I have used flash copy option to copy the database from production to test machine. Then tried to recover the database to an consistent state using the command "recover automatic database until cancel". System is taking long time and after viewing the alert log it was found that, for the first time, if it is reading all the datafiles and it is taking 3 seconds for each datafile. Since i have more than 500 datafiles, it is nearly taking 25 mins for applying the first archived redo log file. All other log files are applied immeidately without any delay. Any suggession to improve the speed will be highly appreciated.
    Regards
    Sridhar

    After chaning the LPAR settings with 2 CPU and 5GB RAM, the problem solved.

  • Delete old and unused Archived Redo Log Files

    Hello forum!
    My db was in ARCHIVELOG mode and It created 9GB of archived redo log files.
    Now I put the db in NOARCHIVELOG mode, can I delete all the ARLF? am I sure that the DB never need those files in the future?
    If yes, how can I delete them? I will use 'del' operative system command?
    In addition, I found this command:
    SQL>alter database open resetlogs;
    is it useful for my purpose?
    thank you!

    You are safe to remove those archivelog files if you altered your database to no archive log mode. Just remove them from OS level
    Please bear in mind that database in no archivelog mode will lost data in the event of disaster.
    SQL>alter database open resetlogs;Doesn't help in your situation, it's use to bring up database after incomplete recovery.

  • ASM Migrate Archive Redo Logs

    Hi all,
    Is there any way to migrate existing archived redo logs to the ASM diskgroup?
    Regards,
    Vijayaraghavan K

    Thanks..
    I have copied the spfile from the last backup to the asmdiskgroup by using below command
    RESTORE SPFILE TO '+DATA/spfilesid.ora';
    When i try to start the database it is picking the spfile from file system alone. It is possible to rmap the spfile to the diskgroup?
    Regards,
    Vijayarghavan K

  • Where RFS exactly write redo data ?  ( archived redo log or standby redo log ) ?

    Good Morning to all ;
    I am getting bit confused from oracle official link . REF_LINK : Log Apply Services
    Redo data transmitted from the primary database is received by the RFS on the standby system ,
    where the RFS process writes the redo data to either archived redo log files  or  standby redo log files.
    In standby site , does rfs write redo data in any one file or both ?
    Thanks in advance ..

    Hi GTS,
    GTS (DBA) wrote:
    Primary & standby log file size should be same - this is okay.
    1) what are trying to disclose about  largest & smallest here ? -  You are confusing.
    Read: http://docs.oracle.com/cd/E11882_01/server.112/e25608/log_transport.htm#SBYDB4752
    "Each standby redo log file must be at least as large as the largest redo log file in the redo log of the redo source database. For administrative ease, Oracle recommends that all redo log files in the redo log at the redo source database and the standby redo log at a redo transport destination be of the same size."
    GTS (DBA) wrote:
    2) what abt group members ? should be same as primary or need  to add some members additionally. ?
    Data Guard best practice for performance, is to create one member per each group in standby DB. on standby DB, one member per group is reasonable enough. why? to avoid write penalty; writing to more than one log files at the standby DB.
    SCENARIO 1: if in your source primary DB you have 2 log member per group, in standby DB you can have 1 member  per group, additionally create an extra group.
    primary
    standby
    Member per group
    2
    1
    Number of log group
    4
    5
    SCENARIO 2: you can also have this scenario 2 but i will not encourage it
    primary
    standby
    Member per group
    2
    2
    Number of log group
    4
    5
    GTS (DBA) wrote:
    All standby redo logs of the correct size have not yet been archived.
      - at this situation , can we force on standby site ? any possibilities ? 
    you can not force it , just size your standby redo files correctly and make sure you don not have network failure that will cause redo gap.
    hope there is clarity now
    Tobi

  • Printing a selection from a document using HP E Print

    Hello all,
    Is it possible to print a selection from a document using e-Print? I currently can emailt he entire document to my printer however that is it.

    Hi dayanks101,
    Thank you for being a member of the HP Support Community. I see that you would like to learn how to choose which pages print from a multi-page document.
    Since you have the document in an email already it’s fairly easy to choose which pages you would like to print if you are using the HP ePrint app. I’m presuming that you have already download the HP ePrint mobile app to your iPad and added your email account to the app.
    Please follow these steps after you have opened the HP ePrint app
    Choose the email with the document you need to print.
    Please choose the document you want to print (for my screen shot the file is titled “scan 2014_05_29 08-55-01.pdf). This will load the document with the available print options.
    Please tap on “Page Range”. It will give you the options of ‘Single’ or ‘Multiple’.
    If you are choosing to print just one page please choose ‘Single’ and then choose the page you would like to print.
    If you are choosing to print a range of pages please choose ‘Multiple’ and then choose the page range you would like to print.
    I hope this helps you print just want you need.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Select * from tab is not working in oracle 10g

    select * from tab is not working in oracle 10g. But at the same time,
    select * from <<table>> is working.
    Please advise me.

    This works for me in 10.2.0.2
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from tab;
    TNAME                          TABTYPE            CLUSTERID
    LOAN_DETAIL                    TABLE
    PLAN_TABLE                     TABLE
    ...

  • Archived redo log size more less than online redo logs

    Hi,
    My database size around 27 GB and redo logs sizes are 50M. But archive log size 11M or 13M, and logs are switching every 5-10min. Why?
    Regards
    Azer Imamaliyev

    Azer_OCA11g wrote:
    1) Almost all archive logs sizes are 11 or 13M.. But sometimes 30, 37M.
    2)
    select to_char(completion_time, 'dd.mm.yyyy HH24:MI:SS')
    from v$archived_log
    order by completion_time desc;
    10.02.2012 11:00:26
    10.02.2012 10:50:23
    10.02.2012 10:40:05
    10.02.2012 10:29:34
    10.02.2012 10:28:26
    10.02.2012 10:18:07
    10.02.2012 10:05:04
    10.02.2012 09:55:03
    10.02.2012 09:40:54
    10.02.2012 09:28:06
    10.02.2012 09:13:44
    10.02.2012 09:00:17
    10.02.2012 08:45:04
    10.02.2012 08:25:04
    10.02.2012 08:07:12
    10.02.2012 07:50:06
    10.02.2012 07:25:05
    10.02.2012 07:04:50
    10.02.2012 06:45:04
    10.02.2012 06:20:04
    10.02.2012 06:00:12
    3) There arent any serious change at DB level.. almost these messages show in alert log since creating DB..Two simple thoughts:
    1) Are you running with archive log compression - add the "compressed" column to the query above to see if the archived log files are compressed
    2) The difference may simply be a reflection of the number and sizes of the public and private redo threads you have enabled - when anticipating a log file switch Oracle leaves enough space to cater for threads that need to be flushed into the log file, and then doesn't necessarily have to use it.
    Here's a query (if you can run as SYS) to show you your allocation of public and private threads
    select
         PTR_KCRF_PVT_STRAND           ,
         FIRST_BUF_KCRFA               ,
         LAST_BUF_KCRFA                ,
         TOTAL_BUFS_KCRFA              ,
         STRAND_SIZE_KCRFA             ,
         indx
    from
         x$kcrfstrand
    ;Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    Author: <b><em>Oracle Core</em></b>

  • Can we use online redo log to recover lost datafile in NOARCHIVE mode?

    I am working on OCA exam and confued about these 2 sample questions. (similar questions with totally different answer)
    Please give me hint about the different between these 2 questions.
    ** If the database is in NOARCHIVELOG mode, and one of the datafile for tablespace USERS is lost, what kind of recovery is possible? (answer: B)
    A. All transactions except those in the USERS tablespace are recoverable up to the loss of the datafile.
    B. Recovery is possible only up to the point in time of the last full database backup.
    C. The USERS tablespace is recoverable from the online redo log file as long as none of the redo log files have been reused since the last backup.
    D. Tablespace point in time recovery is available as long as a full backup of the USERS tablespace exists.
    ** The database of your company is running in the NOARCHIVELOG mode. You perform a complete backup of the database every night. On Monday morning, you lose the USER1.dbf file belonging to the USERS tablespace. Your database has four redo log groups, and there have been two log switches since Sunday night's backup.
    Which is true (answer: B)
    A. The database cannot be recovered.
    B. The database can be recovered up to the last commit.
    C. The database can be recovered only up to the last completed backup.
    D. The database can be recovered by performing an incomplete recovery.
    E. The database can be recovered by restoring only the USER!.dbf datafile from the most recent backup.

    I think Gaurav is correct, you can recover to the last commit even in NOARCHIVELOG, as long as all the changes in the redo logs have not been overwritten. So answer should be B for question 2.
    Here is my test:
    SQL> select log_mode from v$database;
    LOG_MODE
    NOARCHIVELOG
    SQL> select tablespace_name, file_name from dba_data_files;
    TABLESPACE_NAME
    FILE_NAME
    USERS
    C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\USERS01.DBF
    SYSAUX
    C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\SYSAUX01.DBF
    UNDOTBS1
    C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\UNDOTBS01.DBF
    SYSTEM
    C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\SYSTEM01.DBF
    DATA
    C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\DATA01.DBF
    SQL> create table names
    2 ( name varchar(16))
    3 tablespace users;
    Table created.
    so this segment 'names' is created in the datafile users01.
    At this point I shut down and mount the DB, then:
    RMAN> backup database;
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:29
    Finished backup at 06-OCT-07
    SQL>alter database open
    SQL> insert into names values ('pippo');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    At this point I delete datafile users01 and restart:
    SQL> startup
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 1247900 bytes
    Variable Size 67110244 bytes
    Database Buffers 96468992 bytes
    Redo Buffers 2945024 bytes
    Database mounted.
    ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
    ORA-01110: data file 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\USERS01.DBF'
    restoring the backup taken before inserting the value 'pippo' in table names:
    RMAN> restore database;
    Starting restore at 06-OCT-07
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\SYSTEM01.D
    BF
    restoring datafile 00002 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\UNDOTBS01.
    DBF
    restoring datafile 00003 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\SYSAUX01.D
    BF
    restoring datafile 00004 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\USERS01.DB
    F
    restoring datafile 00005 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORA101RC\DATA01.DBF
    channel ORA_DISK_1: reading from backup piece C:\ORACLE\PRODUCT\10.2.0\DB_1\DATA
    BASE\0AITR52K_1_1
    channel ORA_DISK_1: restored backup piece 1
    piece handle=C:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\0AITR52K_1_1 tag=TAG20071006
    T181337
    channel ORA_DISK_1: restore complete, elapsed time: 00:02:07
    Finished restore at 06-OCT-07
    RMAN> recover database;
    Starting recover at 06-OCT-07
    using channel ORA_DISK_1
    starting media recovery
    media recovery complete, elapsed time: 00:00:05
    Finished recover at 06-OCT-07
    SQL> alter database open;
    Database altered.
    SQL> select * from names;
    NAME
    pippo
    SQL>
    enrico

  • Use or redo log

    if the database is in NON ARCHIVE mode then
    what is the use of redo log

    In that case is there any redo generate when an insert occurs?
    SQL*Plus: Release 9.2.0.6.0 - Production on Thu Mar 13 18:57:20 2008
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    [email protected]> set autotrace on
    [email protected]> create table redo(redo varchar2(10));
    Table created.
    [email protected]> insert into redo values ('&redo');
    Enter value for redo: Maran
    old   1: insert into redo values ('&redo')
    new   1: insert into redo values ('Maran')
    1 row created.
    Execution Plan
       0      INSERT STATEMENT Optimizer=CHOOSE
    Statistics
              2  recursive calls
              7  db block gets
              2  consistent gets
              0  physical reads
            588  redo size
            618  bytes sent via SQL*Net to client
            533  bytes received via SQL*Net from client
              3  SQL*Net roundtrips to/from client
              2  sorts (memory)
              0  sorts (disk)
              1  rows processed
    [email protected]> Message was edited by:
    Maran Viswarayar

  • Number of bytes used by redo logs

    What sql command will tell me how much or number of bytes of the memory being utilized by redo logs in 9i.

    Help yourself
    select * from dict_columns where table_name like '%LOG%' and column_name like '%BYTES%'
    Note there is also a DICT view, with a list of all dictionary views.
    And then of course there are the fine manuals, you obviously don't want to read.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • Thinking of buying a new iPod, do I have to delete the songs already there?

    Hi This is probably the completely wrong forum for this question, but I don't know exactly where to put it. The thing is, I have an iPod mini (green) with 4 GB, which now is full and I am thinking of buying a 60 GB one. Last year I got a laptop, and

  • My Itunes won't open after a failed attempt at upgrading.

    My ITunes won't open after a failed attempt at upgrading.  Keep getting the error message...Failed to start because MSVCR80.dll was not found.  I have tried uninstalling and reinstalling and notheing works.  Help!

  • Hey guys..., Hey guys...

    Hey guys, first of a all I'm german and using this Community for the first time! so please don't blame me for anything . I have got a Problem with my Itunes (Using on a Windows 7 - 64bit) It is like itunes cuts the first 0,3-1 seconds of the songs so

  • Moving music from pc (crashed) based ipod to new imac

    I haven't found this exact situation on the forums, so I hope someone can help. I have a windows-based ipod mini. My windows machine crashed and the only place I have all of my music is on my ipod. I am ordering a new imac next week and can't wait to

  • Need to send iPhone 4 to Taiwan

    I need to send my 4 to a Taiwan friend when I get my 4S... what do I need to do to the 4?  She says it needs to be unlocked for her carrier.