Recover datafile in standy database

Hi All,
I have few queries in standby database.I need your help.
1)If a datafile is corrupted(ex sysaux) in standby.How to recover that file in standby.Need steps.
2)If a datafile is corrupted in primary.we will recover the datafile in primary.Will it affect standby database do we have to perform any recovery operations in standby?.
Thanks & Regards
Raj

Welcome to the Forum,
follow the steps bellow
1-Stop Redo Apply.
2-Determine the value of the UNTIL_SCN column, as follows:
SQL> SELECT MAX(NEXT_CHANGE#)+1 UNTIL_SCN FROM V$LOG_HISTORY LH, V$DATABASE
DB WHERE LH.RESETLOGS_CHANGE#=DB.RESETLOGS_CHANGE# AND LH.RESETLOGS_TIME =
DB.RESETLOGS_TIME;
UNTIL_SCN
967786
3-Execute the following RMAN commands to restore and recover datafiles on the standby database. You must be connected to both the standby and recovery catalog databases (use the TARGET keyword to connect to standby instance):
RESTORE DATAFILE <n,m,...>;
RECOVER DATABASE UNTIL SCN 967786;
To restore a tablespace, use the RMAN 'RESTORE TABLESPACE <tbs_name1, tbs_name2, ...>' command.
4- Restart Redo Apply.
See this link for Recovery from Loss of Datafiles on the Standby Database
http://download.oracle.com/docs/cd/B14117_01/server.101/b10823/manage_ps.htm#1026452

Similar Messages

  • Diff btw "recover datafile file#" & "alter database recover datafile file#"

    What is the difference between
    "recover datafile file#"
    "alter database recover datafile file#"
    Thanks
    Naveen

    I don't mean to be rude, but the statement that "There is no difference in both the commands" is facile in the extreme. Sounds like more off-the-cuff instant advice than the considered thoughts of someone who's actually bothered to try both commands out.
    The "alter database recover..." command is a disaster waiting to happen and should never be used by anyone who actually wants to achieve a successful database recovery. It has the effect of suppressing most of the interactive dialogue you get when you submit the shorter "recover..." command, and indeed causes spurious errors to be displayed because the non-interactive recovery process gets it wrong.
    For example, here's me recovering my database using the "alter database" syntax:
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
    ORA-01110: data file 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\WIN10\USERS01.DBF'
    SQL> alter database recover datafile 4;
    alter database recover datafile 4
    ERROR at line 1:
    ORA-00279: change 642359 generated at 07/04/2008 09:03:18 needed for thread 1
    ORA-00289: suggestion :
    C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\WIN10\ARCHIVELOG\2008_07_04\O1_MF_1_9_%U_.ARC
    ORA-00280: change 642359 for thread 1 is in sequence #9Note the slightly alarming report of an 'error at line 1'. What's difficult to convey in mere text, however, is that at the end of that output, the thing just sits there, and you've no idea what on Earth is happening on the database. The text tells you it's making a suggestion, but there's no indication of how you accept the suggestion, of what's happening when you do accept it or where anything is up to.
    I've interrupted one of those once (fortunately only in a training room) and lost the entire database as a result (because a half-complete, interrupted recovery is worse than no recovery at all).
    Compare that with the plain "recover..." syntax example:
    SQL> recover datafile 4;
    ORA-00279: change 642359 generated at 07/04/2008 09:03:18 needed for thread 1
    ORA-00289: suggestion :
    C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\WIN10\ARCHIVELOG\2008_07_04\O1_MF_1_9_%U_.ARC
    ORA-00280: change 642359 for thread 1 is in sequence #9
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00279: change 642571 generated at 07/04/2008 09:06:26 needed for thread 1
    ORA-00289: suggestion :
    C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\WIN10\ARCHIVELOG\2008_07_04\O1_MF_1_10_%U_.ARC
    ORA-00280: change 642571 for thread 1 is in sequence #10
    ORA-00278: log file
    'C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\WIN10\ARCHIVELOG\2008_07_04\O1_MF_1_9_46TPVL2G_.ARC' no longer needed for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00279: change 642576 generated at 07/04/2008 09:06:32 needed for thread 1
    ORA-00289: suggestion :
    C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\WIN10\ARCHIVELOG\2008_07_04\O1_MF_1_12_%U_.ARC
    ORA-00280: change 642576 for thread 1 is in sequence #12
    ORA-00278: log file
    'C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\WIN10\ARCHIVELOG\2008_07_04\O1_MF_1_11_46TPVRMK_.ARC' no longer needed for this recovery
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    Log applied.
    Media recovery complete.There are no weird error messages reported here. The suggestion is accompanied by a prompt that tells you how to accept it. Every time a new log is required, a new prompt is given. You can cleanly cancel at any time by typing 'cancel'. You are kept informed throughout and are in charge throughout.
    Anyone that uses "alter database" syntax during a recovery is, therefore, either brave or foolhardy. In either case, there is a very profound difference between the two.
    Your parting shot that 'alter database' is a SQL command and 'recover' can be an RMAN command misses the point by a wide mile, too. RMAN can issue pretty much any piece of SQL you like, so long as you wrap it in the SQL command:
    RMAN> sql 'alter database recover datafile 4';
    using target database control file instead of recovery catalog
    sql statement: alter database recover datafile 4
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 07/04/2008 09:23:16
    ORA-00279: change  generated at  needed for thread
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover datafile 4
    ORA-00279: change 642359 generated at 07/04/2008 09:03:18 needed for thread 1
    ORA-00289: suggestion : C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\WIN10\ARCHIVELOG\2008_07_04\O1_MF_1_9_%U_.ARC
    ORA-00280: change 642359 for thread 1 is in sequence #9We don't get much further in RMAN with this dodgy form of the recovery command than we did in SQL*Plus, it's true -but that's just because it's a silly command to use in the first place, wherever you thought to use it. The distinction you seek to draw between 'SQL commands' and 'RMAN commands' is false in this case, in other words.

  • Restoring and recovering datafiles in standby database

    Hi,
    oracle version : 8i(8.1.7.0.0)
    os : sun solaris
    I have scenerio where i lost some of the datafiles in standby database(physical standby) and i do have standby cold backup 3 months older since database size is 1TB is can i restore the the only lost files from cold backup and recover using archivelog files. since i only lost 4 data files of size 4gb each it will be faster compare to restoring the whole TB size database.
    appreciated for valuable inputs.
    Thanks
    Prakash GR

    Normal copy command can do your work:
    sys@SANTU> startup
    ORACLE instance started.
    Total System Global Area  535662592 bytes
    Fixed Size                  1334380 bytes
    Variable Size             180355988 bytes
    Database Buffers          348127232 bytes
    Redo Buffers                5844992 bytes
    Database mounted.
    Database opened.
    sys@SANTU> archive log list
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     4
    Next log sequence to archive   6
    Current log sequence           6
    sys@SANTU> host copy D:\APP\SANTOSKU\ORADATA\SANTU\USERS01.DBF d:\
            1 file(s) copied.
    sys@SANTU> shu immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    *Renamed the datafile 'D:\APP\SANTOSKU\ORADATA\SANTU\USERS01.DBF' to 'D:\APP\SANTOSKU\ORADATA\SANTU\USERS011.DBF'*
    sys@SANTU> startup
    ORACLE instance started.
    Total System Global Area  535662592 bytes
    Fixed Size                  1334380 bytes
    Variable Size             180355988 bytes
    Database Buffers          348127232 bytes
    Redo Buffers                5844992 bytes
    Database mounted.
    ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
    ORA-01110: data file 4: 'D:\APP\SANTOSKU\ORADATA\SANTU\USERS01.DBF'
    sys@SANTU> host move  d:\USERS01.DBF D:\APP\SANTOSKU\ORADATA\SANTU\
    sys@SANTU> shu immediate
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    sys@SANTU> startup
    ORACLE instance started.
    Total System Global Area  535662592 bytes
    Fixed Size                  1334380 bytes
    Variable Size             180355988 bytes
    Database Buffers          348127232 bytes
    Redo Buffers                5844992 bytes
    Database mounted.
    ORA-01113: file 4 needs media recovery
    ORA-01110: data file 4: 'D:\APP\SANTOSKU\ORADATA\SANTU\USERS01.DBF'
    sys@SANTU> recover datafile 'D:\APP\SANTOSKU\ORADATA\SANTU\USERS01.DBF';
    Media recovery complete.
    sys@SANTU> alter database open;
    Database altered.
    sys@SANTU>N.B. I have not done the demo on standby database.
    but just i want to know is this procedure is valid that is instead of taking the lost datafiles from production can i use lost datafiles from standby database to recover other standby database.That would be fine.
    Regards,
    S.K.
    Edited by: Santosh Kumar on Oct 8, 2009 11:09 AM

  • Error when trying to recover datafile from standby database to primary

    hi friends,
    getting problem with restoring datafile from backupset taken on standby database to primary database.
    os: windows server 2003
    db: oracle 11gR1(11.1.0.6)
    i've configured standby database on two different hosts.
    host1 - primary (db_uinque_name= prod)
    host2 - standby (db_uniue_name= prodsby)
    I've configure both database with recovery catalog. I take backup on standby database. users' datafile of primary database has been lost.i'm trying to restore from the backupsets taken on standby database.
    with the help of - http://download.oracle.com/docs/cd/B28359_01/server.111/b28294/rman.htm#BAJCEFEG
    on primary
    c:\>rman target sys/password catalog rcat/password
    rman>list backup for db_unique_name prodsby;
    display the backupsets
    rman>restore datafile 4;
    Starting restore at 06-NOV-08
    starting full resync of recovery catalog
    full resync complete
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=1051 device type=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/06/2008 12:12:18
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    also use to tag to restore the datafile
    rman>restore datafile 4 from tag='base0_prodsby';
    Starting restore at 06-NOV-08
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/06/2008 11:27:21
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    i'm getting above errors when try to restore the datafile.
    when i issue the following command.
    BACKUP AS COPY DATAFILE 4 AUXILIARY FORMAT 'C:\app\Administrator\oradata\prod\USERS01.DBF';
    Starting backup at 06-NOV-08
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=1068 device type=DISK
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00004 name=C:\APP\ADMINISTRATOR\ORADATA\prod\USERS01.
    DBF
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/06/2008 12:49:
    15
    ORA-17628: Oracle error 19505 returned by remote Oracle server
    please friends, try to help me to solve the problem.
    Thanks,
    Vihang

    hi.
    Its not necessary its a otherway around to recover datafile from this backupset and apply archivelogs to make datafile consistent.
    yes, it ain't the right way to restore backup to primary location.
    so how would i connect to standby database with primary and recovery catalog.
    i need to connect to recovery catalog and primary site because i need to restore to primary location and recovery catalog contain all metadata and backupsets related information.
    i also tried the following steps from oracle documentation.
    Connect to the standby database as the target database:
    CONNECT TARGET sys@standby
    You are prompted for a password:
    target database Password: password
    Connect to the primary database as the auxiliary database:
    CONNECT AUXILIARY sys@primary
    You are prompted for a password:
    target database Password: password
    Back up the datafile on the standby host across the network to a location on the primary host. For example, suppose that /disk1/df2.dbf is the name of datafile 2 on the standby host. Suppose that /disk8/datafile2.dbf is the name of datafile 2 on the primary host. The following command would copy datafile 2 over the network to /disk9/df2copy.dbf:
    BACKUP AS COPY DATAFILE 2 AUXILIARY FORMAT '/disk9/df2copy.dbf';
    Starting backup at 06-NOV-08
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=1068 device type=DISK
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00004 name=C:\APP\ADMINISTRATOR\ORADATA\prod\USERS01.
    DBF
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/06/2008 12:49:
    15
    ORA-17628: Oracle error 19505 returned by remote Oracle server
    getting this error.

  • How to recover datafile.when control file auto backup is off

    hi friend
    i took hot backup of my database using following command
    rman>backup database;
    in my case controlfile auto backup is off.
    and i have lost my all controlfiles as well as datafiles except spfile.
    i have recovered control file using dbms_backup_restore package.
    know i am able to mount database using following command
    rman> startup mount;
    when i wrote following command
    rman> restore database;
    i got following error
    RMAN-06023: no backup or copy of datafile name found to restore
    enven i have backup of datbase.
    can anybody tell me how to recover datafiles in this case.
    thanking you
    sohail

    hi,
    I think you might have a problem here as the error from RMAN is described in the following metalink note
    Doc ID: Note:100565.1
    You should change you backup script to be something like
    rman {
    backup database include current controlfile;
    do you have any earlier backups of your database?
    regards
    Alan

  • Error during recover datafile - ORA-01422: exact fetch returns more than ..

    Hi,
    we have got actual a serious problem in our database. Some days ago we created a new datafile for a tablespace in the wrong directory:
    ALTER TABLESPACE "ANZSIIDX" ADD DATAFILE '/oralunadata/anzora8/ANZSIIDX08.dbf' SIZE 500M
    We recognized our mistake and generated the datafile with the same name in teh right directory:
    ALTER TABLESPACE "ANZSIIDX" ADD DATAFILE '/oralunaindex/anzora8/ANZSIIDX08.dbf' SIZE 500M
    We set the "wrong" datafile offline in order to rename and replace this in file in the right directory:
    alter database datafile '/oralunadata/anzora8/ANZSIIDX08.dbf' offline;
    ALTER TABLESPACE 'ANZSIIDX'
    RENAME DATAFILE '/oralunadata/anzora8/ANZSIIDX08.dbf',
    TO '/oralunaindex/anzora8/ANZSIIDX09.dbf';
    After this we wanted to bring the datafile online again with a recovery but
    this fails with teh strange error-message:
    SQL> recover datafile 109;
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 20
    ORA-00279: change 10322956311023 generated at 04/10/2013 18:51:23 needed for
    thread 1
    ORA-00289: suggestion : /oralunaarchiv/anzora8/anzora8_1_315326_636567403.arc
    ORA-00280: change 10322956311023 for thread 1 is in sequence #315326
    A similar thing happens with our RMAN backup from last weekend, which failed:
    channel c4: backup set complete, elapsed time: 00:32:33
    input datafile fno=00109 name=/oralunadata/anzora8/ANZSIIDX08.dbf
    input datafile fno=00103 name=/oralunaindex/anzora8/ITOPROTOKOLLEIDX01.dbf
    input datafile fno=00097 name=/oralunadata/anzora8/ITOPROTOKOLLE03.dbf
    input datafile fno=00096 name=/oralunadata/anzora8/ITOPROTOKOLLE02.dbf
    channel c4: specifying datafile(s) in backupset
    channel c4: starting compressed incremental level 0 datafile backupset
    continuing other job steps, job failed will not be re-run
    ORA-00600: internal error code, arguments: [krbbfmx_notfound], [109], [12801], [], [], [], [], []
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-00604: error occurred at recursive SQL level 1
    Has anybody an idea, how can we bring back the datafile online in order to run succesfull an RMAN backup?
    Actually we see just the workaraound to move the objects from the affected tablespace to new tablespace
    and the drop the empty tablespace what would be quite time consuming and not really practicable for us.
    kind regards,
    Marco

    Hi,
    actual we see this in v$datafile:
    /oralunaindex/anzora8/ANZSIIDX01.dbf     15     ANZSIIDX     10737418240     1310720     AVAILABLE     15     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX02.dbf     46     ANZSIIDX     10737418240     1310720     AVAILABLE     46     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX03.dbf     58     ANZSIIDX     10737418240     1310720     AVAILABLE     58     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX04.dbf     65     ANZSIIDX     10737418240     1310720     AVAILABLE     65     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX05.dbf     78     ANZSIIDX     10737418240     1310720     AVAILABLE     78     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX06.dbf     85     ANZSIIDX     10737418240     1310720     AVAILABLE     85     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX07.dbf     88     ANZSIIDX     10737418240     1310720     AVAILABLE     88     NO     0     0     0     10737352704     1310712     ONLINE
    /oralunaindex/anzora8/ANZSIIDX09.dbf     109     ANZSIIDX               AVAILABLE     109                                   RECOVER
    /oralunaindex/anzora8/ANZSIIDX08.dbf     110     ANZSIIDX     10737418240     1310720     AVAILABLE     110     NO     0     0     0     10737352704     1310712     ONLINE
    We dont use RMAN-Catalog for backup the information is only stored in the controlfile.
    The recovery datafile command with full path including for the datafile failed with the same error message:
    SQL> connect / as sysdba
    Connected.
    SQL> recover datafile '/oralunaindex/anzora8/ANZSIIDX09.dbf';
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at line 20
    ORA-00279: change 10322956311023 generated at 04/10/2013 18:51:23 needed for
    thread 1
    ORA-00289: suggestion : /oralunaarchiv/anzora8/anzora8_1_315326_636567403.arc
    ORA-00280: change 10322956311023 for thread 1 is in sequence #315326
    I guess it is a bug of oracle which will sometimes occur when you give two datafiles the same name in different directories that this poduces errors as above in the RMAN inerface(packages)!?
    Maybe we could force to set he tablespace offline, rename the new added datafiles and ry to bring the tablespace online but nobody knows if it works really and we get the tablespace online again?
    Therefore at the moment maybe it's the best way to move the objects away from this tablespace and than drop them, isn't it?
    regards,
    Marco

  • Relocating datafiles on standby database after mount point on stanby is ful

    Hi,
    We have a physical standby database.
    The location of datafiles on primary database are at /oracle/oradata/ and the location of datafiles on standby database are at /oracle/oradata/
    Now we are facing a situation of mount mount getting full on standby database so we need to move some tablespaces to another location on standby.
    Say old location is /oracle/oradata/ and new location is /oradata_new/ and the tablespaces to be relocated are say tab1 and tab2.
    Can anybody tell me whether following steps are correct.
    1. Stop managed recovery on standby database
    alter database recover managed standby database cancel;
    2. Shutdown standby database
    shutdown immediate;
    3. Open standby database in mount stage
    startup mount;
    4. Copy the datafiles to new location say /oradata_new/ using os level command
    4. Rename the datafile
    alter database rename file
    '/oracle/oradata/tab1.123451.dbf', '/oracle/oradata/tab1.123452.dbf','/oracle/oradata/tab2.123451.dbf',''/oracle/oradata/tab2.123452.dbf'
    to '/oradata_new/tab1.123451.dbf', '/oradata_new/tab1.123452.dbf','/oradata_new/tab2.123451.dbf',''/oradata_new/tab2.123452.dbf';
    5. Edit the parameter db_file_name_convert
    alter system set db_file_name_convert='/oracle/oradata/tab1','/oradata_new/tab1','/oracle/oradata/tab2','/oradata_new/tab2'
    6. Start a managed recovery on standby database
    alter database recover managed standby database disconnect from session;
    I am littelbit confused in step 5 as we want to relocate only two tablespaces and not all tablespaces so we have used.
    Can we use db_file_name_convert like this i.e. does this work for only two tablespaces tab1 and tab2.
    Thanks & Regards
    GirishA

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1010428
    8.3.4 Renaming a Datafile in the Primary Database
    When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
    The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database.
    To rename the datafile in the primary database, take the tablespace offline:
    SQL> ALTER TABLESPACE tbs_4 OFFLINE;
    Exit from the SQL prompt and issue an operating system command, such as the following UNIX mv command, to rename the datafile on the primary system:
    % mv /disk1/oracle/oradata/payroll/tbs_4.dbf
    /disk1/oracle/oradata/payroll/tbs_x.dbf
    Rename the datafile in the primary database and bring the tablespace back online:
    SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE 2> '/disk1/oracle/oradata/payroll/tbs_4.dbf'
    3> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
    SQL> ALTER TABLESPACE tbs_4 ONLINE;
    Connect to the standby database, query the V$ARCHIVED_LOG view to verify all of the archived redo log files are applied, and then stop Redo Apply:
    SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
    SEQUENCE# APP
    8 YES
    9 YES
    10 YES
    11 YES
    4 rows selected.
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    Shut down the standby database:
    SQL> SHUTDOWN;
    Rename the datafile at the standby site using an operating system command, such as the UNIX mv command:
    % mv /disk1/oracle/oradata/payroll/tbs_4.dbf /disk1/oracle/oradata/payroll/tbs_x.dbf
    Start and mount the standby database:
    SQL> STARTUP MOUNT;
    Rename the datafile in the standby control file. Note that the STANDBY_FILE_MANAGEMENT initialization parameter must be set to MANUAL.
    SQL> ALTER DATABASE RENAME FILE '/disk1/oracle/oradata/payroll/tbs_4.dbf'
    2> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
    On the standby database, restart Redo Apply:
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
    2> DISCONNECT FROM SESSION;
    If you do not rename the corresponding datafile at the standby system, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
    ORA-00283: recovery session canceled due to errors
    ORA-01157: cannot identify/lock datafile 4 - see DBWR trace file
    ORA-01110: datafile 4: '/Disk1/oracle/oradata/payroll/tbs_x.dbf'

  • 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 datafile

    Hi All,
    DB: 10g No Archive mode
    OS: windows
    I am unable to recover my datafile after renaming the same. Following are the steps that I have taken:
    I have a old controlfile trace and the latest controlfile is lost. The old controlfile doesnt have the new datafile entry.So i am mounting the database with the old trace with resetlog option and then i will be renaming the unamed datafiles.
    STARTUP MOUNTThen i create controlfile
    ALTER DATABASE OPEN RESETLOGS;Now the newly added datafile is as below:
    SQL> select name from v$datafile;
    NAME
    D:\ORAHOME_XPRESS10G\ORADATA\XE\SYSTEM.DBF
    D:\ORAHOME_XPRESS10G\ORADATA\XE\UNDO.DBF
    D:\ORAHOME_XPRESS10G\ORADATA\XE\SYSAUX.DBF
    D:\ORAHOME_XPRESS10G\ORADATA\XE\USERS.DBF
    D:\ORAHOME_XPRESS10G\ORADATA\XE\TEST01.DBF
    D:\ORAHOME_XPRESS10G\APP\ORACLE\PRODUCT\10.2.0\SERVER\DATABASE\MISSING00006Then i rename the datafile as
    SQL> alter database rename file 'D:\ORAHOME_XPRESS10G\APP\ORACLE\PRODUCT\10.2.0\SERVER\DATABASE\MISSING00006' to 'D:\ORAHOME_XPRESS10G\ORADATA\XE\TEST02.DBF';
    Database altered.
    SQL> select FILE#,STATUS,NAME from v$datafile;FILE# STATUS NAME
    1 SYSTEM D:\ORAHOME_XPRESS10G\ORADATA\XE\SYSTEM.DBF
    2 ONLINE D:\ORAHOME_XPRESS10G\ORADATA\XE\UNDO.DBF
    3 ONLINE D:\ORAHOME_XPRESS10G\ORADATA\XE\SYSAUX.DBF
    4 ONLINE D:\ORAHOME_XPRESS10G\ORADATA\XE\USERS.DBF
    5 ONLINE D:\ORAHOME_XPRESS10G\ORADATA\XE\TEST01.DBF
    6 RECOVER D:\ORAHOME_XPRESS10G\ORADATA\XE\TEST02.DBF
    After this when i am trying to recover the concern datafiel i am getting the following errors:
    SQL> recover datafile 6;
    ORA-00283: recovery session canceled due to errors
    ORA-00600: internal error code, arguments: [krhpfh_03-1202], [fno =], [6], [fhcrt =], [794948267], [cptim =], [0], []
    ORA-01110: data file 6: 'D:\ORAHOME_XPRESS10G\ORADATA\XE\TEST02.DBF'
    and also,
    SQL> RECOVER AUTOMATIC DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL
    ORA-00283: recovery session canceled due to errors
    ORA-01124: cannot recover data file 1 - file is in use or recovery
    ORA-01110: data file 1: 'D:\ORAHOME_XPRESS10G\ORADATA\XE\SYSTEM.DBF'
    BR
    Sphinx
    Edited by: $phinx19 on Sep 25, 2012 7:47 AM

    Hi Vreddy,
    I have tried the same by but it aint working. I am getting the following error:
    SQL> recover datafile 6;
    ORA-00283: recovery session canceled due to errors
    ORA-00600: internal error code, arguments: [krhpfh_03-1202], [fno =], [6], [fhcrt =], [794948267], [cptim =], [0], []
    ORA-01110: data file 6: 'D:\ORAHOME_XPRESS10G\ORADATA\XE\TEST02.DBF'
    Br
    Sphinx

  • How to add datafile to standby database

    Hi,
    We have standby database on another site and we are using manual recovery. How to add datafile to standby database after datafile is added to primary database.
    We are on Oracle 9i R2.
    Please help.
    Thanks in advance

    Hi,
    When you recover the standby database after you added a datafile to the production, you will get an error that the file that needs recovery does not exist.
    At this point you can connect to the standby and issue:
    alter database create datafile '<original_name>' as '<new_name>';the new name is optional if the location of the files are the same.
    After that, you can continue recovering the standby database.
    Liron Amitzi
    Senior DBA consultant
    [www.dbsnaps.com]
    [www.orbiumsoftware.com]

  • Recover datafile doubt

    After did a switchover(DataGuard), on my current primary database I did a level 0 backup RMAN and it did not end due to an error with an datafile that needs recover, specifically the datafile 2 (sysaux tablespace). The last level 0 backup I have is 9 days ago. The first thing I do was restore the datafile and try to recover it.
    RMAN> run{sql 'alter database datafile 2 offline';  restore datafile 2; recover datafile 2;}
    The second step (recover) show me the following error:
    unable to find archived log
    archived log thread=1 sequence=1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 08/17/2010 12:19:01
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 1 and starting SCN of 1757
    I appreciate any help, thank you.

    Dear user12100209,
    Please see the error message;
    RMAN-06054: media recovery requesting unknown archived log for thread string with sequence string and starting SCN of string
    Cause: Media recovery is requesting a log whose existence is not recorded in the recovery catalog or target database control file.
    Action: If a copy of the log is available, then add it to the recovery catalog and/or control file via a CATALOG command and then retry the RECOVER command.
    If not, then a point-in-time recovery up to the missing log is the only alternative and database can be opened using ALTER DATABASE OPEN RESETLOGS command.So what i am thinking is that is happening because of a missing archivelog metadata(information) in the standby controlfile.
    Below link may give you a general information;
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmadvre.htm#BRADV89834
    Hope That Helps.
    Ogan

  • Recover datafile that has extended beyond OS limit?

    We have a Linux server running Oracle 8.1.7 and we have a data file (users01.dbf) that had "autoextend" enabled and has now grown past the upper limit of the underlying filesystem. Oracle will not open the file, as the OS returns an error: "Linux Error: 75: Value too large for defined data type"
    Here are some details:
    OS: Redhat 7
    Filesystem: Ext2
    Oracle Ver: 8.1.7
    DBF Size: >2gb
    I have attempted to copy the .dbf files to a new server with little luck. Redhat 10 with Oracle 10 complained that the ctl files were corrupt, so I deleted them and recreated them based on the data files. After that, the DB indicated that the datafiles needed a media recovery, so I performed a "recover datafile..." on each of them successfully. Once I try to open the database, I get a "End of communication channel" error. I cannot mount it in Windows as the blocksizes are different (8192 vs. 4096)
    I am at the end of my ideas on how to recover this file. Any suggestions?
    I have thought of:
    1. Bring a copy of 8.1.7 up on a new Redhat system running a newer FS (Reiser) and try to open the file
    2. Add a new drive to the old sever and format that with the new FS, copy the dbf files there and point the DB to those files
    Any tools that I try to run on the old server all hit the roadblock of the Linux:75 error.
    Thanks for any ideas that come to mind.

    Can you give more detail about how you tried to copy the database files?
    First, I assume you are copying with the database down right?
    I would not change versions of Oracle during the copy, only the OS.
    SuSE Linux Enterprise Server 8 will work with your version of Oracle but I cannot from memory remember what its OS limit is.
    I would research either Suse 9 or Red Hat 9 and see if they work with your version of Oracle and support larger file limits.
    This site appears not to have info on Oracle 8 http://www.puschitz.com/
    However, he can had it in the past and he might provide some help.
    I like the copy idea, but I think you might lose some data.
    I'm thinking you will try this if you iron out the OS issue
    Start the database mount
    SQLPLUS> alter database recover database until cancel using backup controlfile;
    SQLPLUS> alter database recover cancel;
    SQLPLUS> alter database open resetlogs;
    I wish you luck and no loss of data!

  • Recover datafile problem

    Hi, I am using Oracle 7.3.4 on NT 4.
    I am having problem with one of my rollback segments call HISTORY which contain two datafiles in e:\rollback\history.ora and f:\rollback\history.ora
    This rollback segment was used for transfer old data to HISTORY datafile in
    f:\HISTORY\HISTORY.ora
    (the sql look like this -
    set transaction use rollback segment history;
    insert into history.bk_tableA
    where ..... )
    Recently the HISTORY rollback was droped by mistake. Since then I lost access to history tables( in HISTORY datafile). When I open the storage manager
    it shows these 3 files are in recover status.
    What is the relationship between the History rollback seqment and History datafile?
    The list below were the errors I got when trying to recover a datafile
    First attemp:
    SVRMGR>
    recover datafile 'f:\history\history.ora';
    ORA-00279: Change 525082216 generated at 12/08/99 16:24:02 needed for thread 1
    ORA-00289: Suggestion : d:\ORANT\RDBMS73\%ORACLE_SID%25290.001
    ORA-00280: Change 525082216 for thread 1 is in sequence #252904
    Specify log: {=suggested | filename | AUTO | CANCEL}
    ORA-00310: archived log contains sequence 252909; sequence 252904 required
    ORA-00334: archived log: 'D:\ORANT\RDBMS73\ORCL25290.001'
    I try auto, and even the suggested log file orcl25290.001 and still could not recover the datafile. It seems the recover program
    cannot find the specific sequence # in the log file! Any suggestion?
    Second attemp:
    I try the incomplete, change base recovery -
    SVRMGR>recover until chang 525082215
    it shows Media recovery complete. Then, I open the database with
    'alter database open noresetlogs'
    But I still cannot access to that data file.
    svrmgr>select count(*) from history.bk_sn_err;
    count(*)
    ora-00376: file 5 cannot be read at this time
    ora-01110: data file 5: 'f:\history\history.ora'
    From the storage manager the file is still in recover status.
    Does the file been recovered at all?
    Is it possible that I could drop the damaged
    rollback segment and recreate a new one.
    Should I be able to gain access to the f:\history\HISTORY.ora datafile?
    [email protected]
    null

    Hi Micheal,
    when you said you had dropped the history, did you drop the rollback segment or did you delete the history.ora file from the NT or did you drop the file from Oracle by doing an
    alter database adatfile '...history...'offline drop?
    also is your database running in archivelog mode?
    depending on the above, you will have to use different methods to recover.
    from the error messages you seem to be running with no archivelog mode so you have to offline drop the datafile.
    If you do an offline drop on the datafile, then you will have to drop tha tablespace and recreate it.
    Thanks,
    Mandar
    null

  • Recover datafile datafile_name until consistent with controlfile;

    Hi.
    When I tried to start a database I got message
    Database mounted.
    ORA-01113: file 22 needs media recovery
    ORA-01110: data file 22: '/d01/ORACLE/DEV06/DEV06_sl_def_eo_01.dbf'
    Can I use the above command in subject i.e.
    recover datafile <datafile_name> until consistent with controlfile;
    and then use alter database open to bring up the database.
    It is a 10.1.0.4
    Thanks
    /SKH

    Did you try what Eric recommended?
    Restore the affected datafiles from backup and perform recovery
    SQL> RECOVER DATAFILE <FILE NUMBER>
    or
    SQL> RECOVER DATABASE  ;
    V$DATAFILE
    V$RECOVER_FILE 
    V$RECOVERY_FILE_STATUS
    V$RECOVERY_PROGRESS   Also check if you experience the below explained situation (Query V$BACKUP) :-
    Ending a Backup After an Instance Failure or SHUTDOWN ABORT
    http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14191/osbackup004.htm
    Hope it helps,
    Babu Rangasamy

  • Recover datafile error ora-00279,00289,00280

    alter database recover datafile 'xxx'
    error at line 1
    ora-00279 change 36xxxxx generated at x-x-x needed for thread1
    ora-00289 suggestion
    ora-00280 change 36xxxx for thread 1 is in sequence #76xx
    Please guide how can i resolve this issue

    Hi,
    Please see: https://community.oracle.com/thread/497955?start=0&tstart=0
    Thank you

Maybe you are looking for

  • Not work correctly

     Hi  I try to update  a value   inside a table (ExTable01) but updated value  is not true.Please help. When I apply update  Saved wrong value is   891257536,00  (Column type real  False  )  but       True value is  891257560   ( -->  97352 * 9155 =  

  • How to use shift_jis encoding in eclipse 3.2???

    i can't use shift_jis encoding in eclipse 3.2 how to add this encoding to eclipse???? please help me

  • Need Ideas For Storage Units Data Storage Capabilities - Special Attributes? History? 2 Ind-UMs

    Hello experts, The company I'm working for is looking into permanently-storing pallet level information (keep a history of the pallet movements) and use RF-scanners to move product in the warehouse. They have made a decision to implement Warehouse Ma

  • Apple & Windows 7 Authentication Methods Cisco 1242AP EAP

    Hi CSC Members, I'm pretty new to wireless (so go easy on me): My situation is I need to be able to provide secure wireless internet access to guests with BYODs. Namely Apple iPads, iPhones, Windows PCs and Apple Macs, without them being under my adm

  • Can't manually drag iTunes to iPhone

    I have a new iphone.  I can upload songs to to my Windows XP pc, but I can't get any songs to "sync" to the iphone.  The phone shows up in the itunes window.  Even if I try to manually drag a song to the device I see the "ghostbuster" sign.  Plz help