Alter Database Create Datafile

Hi Fellows,
Can any body explain me if i dont have backup of datafile, how could i recover my database.
I will appreciate sooner response.
Thanks
Mustafa

Hi,
The only way out is, if you have a export dump, you can get back the data till the time of export.
Raghu.

Similar Messages

  • Alter database create datafile as

    Hi
    T1-)shutdown immediate;
    T2-)Take full backup
    T3-)startup;
    T4-)move the objects in tablespace test1 to some other tablespace
    T5-)drop tablespace test1;
    T6-)create tablespace test1
    datafile 'C:\oraclexe\oradata\XE\test1.dbf' reuse;
    T7-)alter system switch logfile;
    In some other server;
    startup nomount;
    restore the backupset which was taken at T2.
    restore controlfile at T7.
    startup mount;
    alter database create datafile 'C:\oraclexe\oradata\XE\test1.dbf' as 'C:\oraclexe\oradata\XE\test1.dbf';
    ALTER DATABASE RECOVER automatic database until cancel using backup controlfile;
    Recovery performed succefully.
    What I wanna ask is;
    Since First I issue:
    "alter database create datafile as ...."
    The contents of this datafile should be deleted with this statement.
    Why oracle doesnt give error in recovery, during appliying the statement at T4 ?
    I have already deleted the contents of the datafile, how come oracle move the objects?
    I hope I am clear

    Hi,
    although it is beyound my imagination what kind of real world scenario you are trying to simulate with your test, I can tell you why no error gets returned:
    You create a new tablespace t1 after you dropped the old one. That gets stored in the current controlfile. The previous backup of the datafile of the old tablespace that incidentally has the same name is now useless for the new tablespace.
    You then restore that controlfile and create the datafile manually as it looked after you created the new tablespace (empty) and then recover that. RMAN does that (without complaining even about the uselessness of your doing). If you look into that tablespace, you will see that it is empty as it was after you created it - unless you have put any objects into it after the second creation of that tablespace t1.
    Kind regards
    Uwe
    http://uhesse.wordpress.com

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

  • While running "alter database create control.....".

    oracle8i/windowsNT
    got a very big tracefile(750kb).
    at the end of file,desired script was there.,
    Normally the size of tracefile would be 3kb.
    "create controlfile....."
    max_dump_file_size=10240
    PLEASE CLARIFY
    [email protected]
    [email protected]

    What's the content of this file ?
    What's the exact command used?
    Is it
    ALTER DATABASE BACKUP CONTROLFILE TO TRACEOr
    ALTER DATABASE CREATE STANDBY CONTROLFILE ...
    "alter database create control.....". Is not correct syntax

  • ALTER DATABASE RENAME DATAFILE, what really needs to bu run later?

    Hi!
    If I "alter database" and move some datafiles to newly added luns, do I need to run:
    On DB side:
    1) perl adcfgclone.pl dbTechStack (according new luns!)
    2) If 1) is yes, then probably have to run "perl adcfgclone.pl dbconfig $CONTEXT_FILE"?
    On APPS side:
    1) Autoconfig?
    Second question. If on on new LUN is only having archived log files (no db datafiles are on that lun), should they be involved in Number of DATA_TOP's on the target system?
    THX

    If I "alter database" and move some datafiles to newly added luns, do I need to run:
    On DB side:
    1) perl adcfgclone.pl dbTechStack (according new luns!)
    2) If 1) is yes, then probably have to run "perl adcfgclone.pl dbconfig $CONTEXT_FILE"?
    On APPS side:
    1) Autoconfig?Damir,
    Could you please elaborate more? Why would you need to run perl adcfgclone.pl if you alter the database and add more datafiles?
    Second question. If on on new LUN is only having archived log files (no db datafiles are on that lun), should they be involved in Number of DATA_TOP's on the target system?When cloning, it is not required to copy the archivelog files. DATA_TOPs should point to the mount points where datafiles are located.

  • Importing Database, creating datafiles

    I have a large import file and the source db had a couple of tablespaces that each contained two datafiles. I am using export and import utilities, not the datapump.
    Before I run the import should I create two datafiles in the tablespaces or does import do that automagically for me>

    Before I run the import should I create two datafiles in the tablespaces or does import do that automagically for me>It depends on how the export dump was created and if you will use the same directory structure.
    If you have an FULL export dump, the dump contains the CREATE TABLESPACE command. However, you will have to perform a FULL import and have the directory structure identical to the source database. If all that holds, importing will create the tablespace. If that does not hold, then you'll have to precreate the tablespace and then do the import.
    HTH,
    Brian

  • Problem in creating Datafile

    Hi all,
    I am doing some kind of testing in my test maching and I faced the following situation.
    I have a good control file and all the archives starting from the 1st scn. Now I brought down the instance and physically deleted a datafile and tried bringing up the db. This time it couldnt open the db as a file is missing, so I created the datafile and gave the recover database command and things opened up fine. No I backed up the ctrl file to trace and brought down the instance. Now I deleted my controlfile and recreated it successfully by using the script that I got from trace and tried the datafile drop and recreate trick as before, but in this case I couldn't create the datafile. Can anybody explain me why is this behaviour?

    KRIS wrote:
    Version is 11.2.0.1.0
    OS is Red Hat Enterprise Linux Server release 5.5
    As told earlier I tried to create the deleted datafile and this is the error I got.
    13:20:44 SQL> alter database create datafile 4 as '/oracle/abhi/data/users.dbf'; alter database create datafile 4 as '/oracle/abhi/data/users.dbf'
    ERROR at line 1:
    ORA-01178: file 4 created before last CREATE CONTROLFILE, cannot recreate
    ORA-01110: data file 4: '/oracle/abhi/data/users.dbf'
    I can understand the error, but I want to understand what happens internally under such circumstances and why such a datafile recovery is not allowed in oracleonly you can re-create datafile without backup in archivelog mode, the datafile creation should be less than the control file creation time.
    if you re-create the control file then you cannot use the command "alter database create datafile" .
    you can use only for the datafiles created after control file creation time.
    check:-
    SQL> select creation_time,name from v$datafile;
    CREATION_ NAME
    17-APR-07 D:\ORACLE\PRODUCT\10.2.0\ORADATA\DEMODB\SYSTEM01.DBF
    17-APR-07 D:\ORACLE\PRODUCT\10.2.0\ORADATA\DEMODB\UNDOTBS01.DBF
    17-APR-07 D:\ORACLE\PRODUCT\10.2.0\ORADATA\DEMODB\SYSAUX01.DBF
    17-APR-07 D:\ORACLE\PRODUCT\10.2.0\ORADATA\DEMODB\USERS01.DBF
    27-JUL-11 D:\ORACLE\PRODUCT\10.2.0\ORADATA\DEMODB\EXAMPLE01.DBF
    27-JUL-11 D:\ORACLE\PRODUCT\10.2.0\ORADATA\DEMODB\USER02.DBF
    6 rows selected.
    6 rows selected.
    SQL> select controlfile_created from v$database;
    CONTROLFI
    27-JUL-11

  • Alter database datafile online:

    I wanted to do an online backup of a datafile.
    This is what happened (in archive mode):
    alter database datafile <filename> offline
    copied file with O/S command
    alter database datafile <filename> online
    ERROR at line 1:
    ORA-01113: file 5 needs media recovery
    so then I had to do this:
    recover datafile <filename>
    Then I was able to proceed.
    Why this error? Is it normal?
    DA
    And now, when I try to backup the control file, this is what happens:
    alter database backup controlfile to 'C:\control_file_backups'
    ERROR at line 1:
    ORA-01580: error creating control backup file C:\control_file_backups
    ORA-27038: skgfrcre: file exists
    OSD-04010: <create> option specified, file already exists
    Message was edited by:
    Dan A
    Just changed it to
    alter database backup controlfile to trace;
    no problem now.
    Message was edited by:
    Dan A

    I wanted to do an online backup of a datafile.
    This is what happened (in archive mode):
    alter database datafile <filename> offline
    copied file with O/S command
    alter database datafile <filename> online
    ERROR at line 1:
    ORA-01113: file 5 needs media recovery
    so then I had to do this:
    recover datafile <filename>
    Then I was able to proceed.
    Why this error? Is it normal?
    its normal whenver a datfile is taken offline either by you or automatically by oracle you need media recovery.
    >
    And now, when I try to backup the control file, this
    is what happens:
    alter database backup controlfile to
    'C:\control_file_backups'
    ERROR at line 1:
    ORA-01580: error creating control backup file
    C:\control_file_backups
    ORA-27038: skgfrcre: file exists
    OSD-04010: <create> option specified, file already
    exists
    check at c there probably control_file_backups exist?
    Khurram

  • 'alter database open resetlogs' didn't reset one of the datafiles

    I've spent the last three and a half weeks recovering an oracle database (11g 64-bit linux) because of a corrupt block in an online redo log (which I thought was being written to multiple locations). I restored the files, moving some of them around in the process; recovered to the latest possible point; moved files back to their proper location; ran 'alter database open resetlogs'; and one of the datafiles (from a bigfile tablespace) didn't get reset. I checked afterward, and it was marked offline. I do not remember placing the file offline, and cannot find such a statement in my last 300 sqlplus commands, which includes commands well before I renamed this file and the commands surrounding the rename.
    Restoring/recovering the database again will take too long, and is a remarkably poor option. Even if the database had opened correctly, the affected tablespace would not have been touched in the two or three minutes the database was open. Is there any way to force oracle to reset the logs again or otherwise fix this one file to mark it with the same date? Only allowing the resetlogs option after an incomplete recovery seems a poor restriction, especially, if files can slip through like this. I'm suspecting there is someway to just fix the checkpoint values for the tablespace, but I don't know where to begin. This particular file is <5% of the database, so if I have to do some sort of backup/restore with just it, that is probably doable.

    0: 11.1.0.6.0 on SUSE Linux Enterprise Server 10 SP2
    1: rman
    backup format '/opt/oracle/backup/mydatabase_%Y-%M-%D_%s_datafiles_%p' (database);
    backup format '/opt/oracle/backup/mydatabase_%Y-%M-%D_%s_archivelogs_%p' archivelog all delete input;
    backup format '/opt/oracle/backup/mydatabase_%Y-%M-%D_%s_control_%p' current controlfile spfile;
    2:
    restore database; --not sure what datafiles were restored with this
    restore datafile X; --several files were restored individually
    recover database until scn 1137554504; -- I verified that all datafiles were on the same checkpoint after this finished. Not having placed any files offline, I didn't bother checking that.
    3:
    SQL> alter database open resetlogs;
    Database altered.
    Elapsed: 00:04:20.34
    SQL> quit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    4: Nothing in the tablespace has been touched since I ran 'alter database open resetlogs;'. It also appears that oracle placed the file offline (without me telling it to do so) and left it that way through the resetlogs, leaving the tablespace unusable during the time it was opened. The only things that would be out of date are the 'RESETLOGS_CHANGE#', the 'CHECKPOINT_CHANGE#', and associated values. It's still at the last scn before the resetlogs, and the system has been in archivelog mode the entire time. This is all information that Oracle could be tracking, and from a program logic standpoint there is no reason why Oracle cannot tie together the changes before the resetlogs, the resetlogs command and the changes after the resetlogs into a new, continuous string of changes. I assume there is some such feature in a high-caliber program because I'm actually a programmer (who would have included such advanced tracking features), and I've become a DBA out of necessity. I admit to not knowing all of the oracle DBA commands, hence me posting here before doing the work of submitting a request to metalink.
    5: I consider it a poor restriction because it doesn't always reset the logs on all files, and as far as my knowledge goes it has rendered my 3.5 week recovery process WORTHLESS. I suppose it could cause numerous errors, especially if the database wasn't cleanly shut down, but having the ability to do something equivalent to datafiles that oracle skipped the process on seems quite useful in my situation. I guess the more fundamental problem to complain about is that it would apply such changes to only some of the files, while leaving others unusable, instead of just giving me an error that some files weren't going to be reset, but I think I'm done venting my Oracle frustrations for now.
    Am I stuck with a tablespace that I cannot bring online with the database open, or is there some sort of 'alter database datafile' command (or anything else) that I know nothing of that will fix the straggling file?
    Edited by: jbo5112 on Oct 5, 2009 3:33 PM -- obfuscated some file names to secure identity.

  • Sql "ALTER DATABASE DATAFILE x OFFLINE" not working??(solved)

    Hi all,
    I'm playing around with RMAN on a test instance, and am trying to just restore and recover a datafile. I can't see what I'm doing wrong.
    I've renamed the users01.dbf file like it is lost...
    I get RMAN going...I do a startup mount;
    When I try:
    RMAN> sql "alter database datafile '/data1/oradata/testdb5/users01.dbf' offline";
    sql statement: alter database datafile '/data1/oradata/testdb5/users01.dbf' offline
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 04/06/2009 16:13:28
    RMAN-10015: error compiling PL/SQL program
    Now....I did this with the number of the datafile, and it let me do the offine that way
    RMAN> sql "alter database datafile 4 offline";
    sql statement: alter database datafile 4 offline
    But, I want to try it with the file name, and I can't understand why it is giving me an error.
    Any suggestions?
    TIA,
    cayenne
    Edited by: cayenne on Apr 6, 2009 2:01 PM

    bigdelboy wrote:
    When I try:
    RMAN> sql "alter database datafile '/data1/oradata/testdb5/users01.dbf' offline";
    Try following, you need to put in the single quotes twice.
    RMAN> sql "alter database datafile ''/data1/oradata/testdb5/users01.dbf'' offline";Rgds - bigdelboyWow...ok, that was NOT in the book. This did work with double quotes on the outside " but, the datafile quoting required me to use 2 SINGLE quotes around that.
    RMAN> sql "alter database datafile ''/data1/oradata/testdb5/users01.dbf'' offline";
    sql statement: alter database datafile ''/data1/oradata/testdb5/users01.dbf'' offline
    Any explanation for this? Granted the oracle press example was for a windows machine...
    cayenne

  • Standby database applying newly created datafiles

    Hi
    I created standby database out of cold back up of my production database(taken 1 month back). I copied all the archive logs of production db since that time to standby database.
    After I took COLD backup I added few datafiles to the production database.
    Also after I set up standby database,I added few datafiles to the production database.
    Now having all archive logs on standby,if I use my standby database in the event of my production database failure ,do the standby database creates all the data files created after the cold back up ,out of archive files.Do I need to issue any special statement for that.
    If I open standby database in read only mode does the standby database creates those added datafiles out of archive files.
    Please give your input.
    Thanks in advance.
    Gopal

    You haven't given any usefuly information on your problem.
    show parameter log_archive_dest
    show parameter fal
    show parameter dg
    What errors are in your alert logs ?
    What command are you using to recover ?
    Check the contents of v$archived_log
    # run on primary to detect failures :-
    select destination, status, fail_date, valid_now
    from v$archive_dest
    where status != 'VALID' or VALID_NOW != 'YES';
    # run on standby to get exact position of rollforward :-
    select thread#, to_char(snapshot_time,'dd-mon-yyyy:hh24:mi'),
    to_char(applied_time,'dd-mon-yyyy:hh24:mi'),
    to_char(newest_time,'dd-mon-yyyy:hh24:mi') from V$STANDBY_APPLY_SNAPSHOT;
    Are you using dataguard broker ?

  • ORA-01180: can not create datafile 1 during RMAN restore.

    Hello,
    I am trying to refresh one of our QA environments and I am getting this error message:
    RMAN> run
    2> {
    3> allocate channel c1 device type disk;
    4> allocate channel c2 device type disk;
    5> restore database;
    6> recover database;
    7> }
    allocated channel: c1
    channel c1: SID=5 device type=DISK
    allocated channel: c2
    channel c2: SID=131 device type=DISK
    Starting restore at 08-NOV-12
    using channel ORA_DISK_1
    creating datafile file number=1 name=+DATA1/alephpr/datafile/system.269.722874729
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/08/2012 16:27:40
    ORA-01180: can not create datafile 1
    ORA-01110: data file 1: '+DATA1/alephpr/datafile/system.269.722874729' I created a new database from scratch with the same name as is in Production, later on I will proceed to rename it to the right one. I started the steps for refreshing the PRD copy:
    RMAN> shutdown immediate
    using target database control file instead of recovery catalog
    database dismounted
    Oracle instance shut down
    RMAN> startup nomount
    connected to target database (not started)
    Oracle instance started
    Total System Global Area 534462464 bytes
    Fixed Size 2228200 bytes
    Variable Size 176160792 bytes
    Database Buffers 348127232 bytes
    Redo Buffers 7946240 bytes
    RMAN> set dbid=3573460394
    executing command: SET DBID
    RMAN> restore controlfile from '/restorealeph/c-3573460394-20121106-01';
    Starting restore at 08-NOV-12
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=130 device type=DISK
    channel ORA_DISK_1: restoring control file
    channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
    +output file name=+DATA1/alephpr/controlfile/current.260.798747585+
    +output file name=+FLASH/alephpr/controlfile/current.276.798747585+
    Finished restore at 08-NOV-12
    RMAN> alter database mount;
    database mounted
    released channel: ORA_DISK_1Once the control file is restored, I need to crosscheck, delete expired and catalog the backups at the new server:
    RMAN> crosscheck backup;
    Crosschecked 48 objects
    RMAN> delete noprompt expired backup;
    Deleted 48 EXPIRED objects
    RMAN> list backup summary;
    specification does not match any backup in the repositoryI need now to catalog the backups we transferred from Prod into the QA server's directory /restorealeph:
    RMAN> catalog start with '/restorealeph/';
    searching for all files that match the pattern /restorealeph/
    List of Files Unknown to the Database
    =====================================
    File Name: /restorealeph/9cnpm51u_1_1
    File Name: /restorealeph/9enpm6lj_1_1
    File Name: /restorealeph/c-3573460394-20121107-00
    File Name: /restorealeph/c-3573460394-20121107-01
    File Name: /restorealeph/c-3573460394-20121106-01
    Do you really want to catalog the above files (enter YES or NO)? YES
    cataloging files...
    cataloging done
    List of Cataloged Files
    =======================
    File Name: /restorealeph/9cnpm51u_1_1
    File Name: /restorealeph/9enpm6lj_1_1
    File Name: /restorealeph/c-3573460394-20121107-00
    File Name: /restorealeph/c-3573460394-20121107-01
    File Name: /restorealeph/c-3573460394-20121106-01
    RMAN> list backup summary;
    List of Backups
    ===============
    Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
    4097    B  F  A DISK        07-NOV-12       1       1       NO         BACKUP_ALEPHPR.TUR_110712030000
    4098    B  A  A DISK        07-NOV-12       1       1       NO         BACKUP_ALEPHPR.TUR_110712030000
    RMAN> list backup tag="BACKUP_ALEPHPR.TUR_110712030000";
    List of Backup Sets
    ===================
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    4097    Full    178.04G    DISK        00:00:00     07-NOV-12
            BP Key: 4097   Status: AVAILABLE  Compressed: NO  Tag: BACKUP_ALEPHPR.TUR_110712030000
            Piece Name: /restorealeph/9cnpm51u_1_1
      List of Datafiles in backup set 4097
      File LV Type Ckp SCN    Ckp Time  Name
      1       Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/system.269.722874729
      2       Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/sysaux.266.722874731
      3       Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/undotbs1.289.722874727
      4       Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/undotbs2.257.722874727
      5       Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/users.298.722874731
      6       Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/audit.299.723372305
      7       Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/case_datos.260.723372307
      8       Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/case_indices.261.723372307
      9       Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_hist.262.723372309
      10      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_l.264.723372319
      11      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_long.265.723372349
      12      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_md.270.723372355
      13      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_sm.271.723372369
      14      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_xl.272.723372375
      15      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/index_l.273.723372401
      16      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/index_md.274.723372427
      17      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/index_sm.275.723372455
      18      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/index_xl.276.723372473
      19      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/tools.278.723372501
      26      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/data_sm.300.736088959
      27      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/dev_disco_ptm5_meta.301.746385117
      28      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/dev_disco_pstore.302.746385119
      29      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/dev_disco_ptm5_cache.304.746385121
      30      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/undotbs1.305.796391931
      31      Full 6919879655786 07-NOV-12 +DATA1/alephpr/datafile/undotbs2.306.796392185
    BS Key  Size       Device Type Elapsed Time Completion Time
    4098    16.89G     DISK        00:00:00     07-NOV-12
            BP Key: 4098   Status: AVAILABLE  Compressed: NO  Tag: BACKUP_ALEPHPR.TUR_110712030000
            Piece Name: /restorealeph/9enpm6lj_1_1
      List of Archived Logs in backup set 4098
      Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
      1    35722   6919870864350 06-NOV-12 6919871887697 06-NOV-12
      1    35723   6919871887697 06-NOV-12 6919872372211 06-NOV-12
      1    35724   6919872372211 06-NOV-12 6919872410158 06-NOV-12
      1    35725   6919872410158 06-NOV-12 6919872447301 06-NOV-12
      1    35726   6919872447301 06-NOV-12 6919872503332 06-NOV-12
      1    35727   6919872503332 06-NOV-12 6919872551564 06-NOV-12
      1    35728   6919872551564 06-NOV-12 6919872603881 06-NOV-12
      1    35729   6919872603881 06-NOV-12 6919872655942 06-NOV-12
      1    35730   6919872655942 06-NOV-12 6919872698722 06-NOV-12
      1    35731   6919872698722 06-NOV-12 6919872741655 06-NOV-12
      1    35732   6919872741655 06-NOV-12 6919872782284 06-NOV-12
      1    35733   6919872782284 06-NOV-12 6919872872302 06-NOV-12
      1    35734   6919872872302 06-NOV-12 6919872910206 06-NOV-12
      1    35735   6919872910206 06-NOV-12 6919872945577 06-NOV-12
      1    35736   6919872945577 06-NOV-12 6919872980056 06-NOV-12
      1    35737   6919872980056 06-NOV-12 6919873013411 06-NOV-12
      1    35738   6919873013411 06-NOV-12 6919873050761 06-NOV-12
      1    35739   6919873050761 06-NOV-12 6919873084996 06-NOV-12
      1    35740   6919873084996 06-NOV-12 6919873122049 06-NOV-12
      1    35741   6919873122049 06-NOV-12 6919873521767 06-NOV-12
      1    35742   6919873521767 06-NOV-12 6919873952773 06-NOV-12
      1    35743   6919873952773 06-NOV-12 6919874258549 06-NOV-12
      1    35744   6919874258549 06-NOV-12 6919874472213 06-NOV-12
      1    35745   6919874472213 06-NOV-12 6919874744856 06-NOV-12
      1    35746   6919874744856 06-NOV-12 6919875113086 06-NOV-12
      1    35747   6919875113086 06-NOV-12 6919875733337 06-NOV-12
      1    35748   6919875733337 06-NOV-12 6919876139061 06-NOV-12
      1    35749   6919876139061 06-NOV-12 6919876707162 06-NOV-12
      1    35750   6919876707162 06-NOV-12 6919877706313 06-NOV-12
      1    35751   6919877706313 06-NOV-12 6919877919039 06-NOV-12
      1    35752   6919877919039 06-NOV-12 6919878024429 06-NOV-12
      1    35753   6919878024429 06-NOV-12 6919878107673 06-NOV-12
      1    35754   6919878107673 06-NOV-12 6919878258511 06-NOV-12
      1    35755   6919878258511 06-NOV-12 6919878308336 06-NOV-12
      1    35756   6919878308336 06-NOV-12 6919878424419 06-NOV-12
      1    35757   6919878424419 06-NOV-12 6919878488485 06-NOV-12
      1    35758   6919878488485 06-NOV-12 6919878827092 06-NOV-12
      1    35759   6919878827092 06-NOV-12 6919879350098 07-NOV-12
      1    35760   6919879350098 07-NOV-12 6919879675556 07-NOV-12
      2    35949   6919870864360 06-NOV-12 6919871494640 06-NOV-12
      2    35950   6919871494640 06-NOV-12 6919871887487 06-NOV-12
      2    35951   6919871887487 06-NOV-12 6919872410655 06-NOV-12
      2    35952   6919872410655 06-NOV-12 6919872552468 06-NOV-12
      2    35953   6919872552468 06-NOV-12 6919872698940 06-NOV-12
      2    35954   6919872698940 06-NOV-12 6919872872690 06-NOV-12
      2    35955   6919872872690 06-NOV-12 6919872980371 06-NOV-12
      2    35956   6919872980371 06-NOV-12 6919873085902 06-NOV-12
      2    35957   6919873085902 06-NOV-12 6919873569082 06-NOV-12
      2    35958   6919873569082 06-NOV-12 6919873949096 06-NOV-12
      2    35959   6919873949096 06-NOV-12 6919874404640 06-NOV-12
      2    35960   6919874404640 06-NOV-12 6919875011814 06-NOV-12
      2    35961   6919875011814 06-NOV-12 6919875631429 06-NOV-12
      2    35962   6919875631429 06-NOV-12 6919876324885 06-NOV-12
      2    35963   6919876324885 06-NOV-12 6919876363526 06-NOV-12
      2    35964   6919876363526 06-NOV-12 6919876748508 06-NOV-12
      2    35965   6919876748508 06-NOV-12 6919877741784 06-NOV-12
      2    35966   6919877741784 06-NOV-12 6919878108943 06-NOV-12
      2    35967   6919878108943 06-NOV-12 6919878424477 06-NOV-12
      2    35968   6919878424477 06-NOV-12 6919879012111 06-NOV-12
      2    35969   6919879012111 06-NOV-12 6919879260589 07-NOV-12
      2    35970   6919879260589 07-NOV-12 6919879350086 07-NOV-12
      2    35971   6919879350086 07-NOV-12 6919879464935 07-NOV-12
      2    35972   6919879464935 07-NOV-12 6919879548399 07-NOV-12
      2    35973   6919879548399 07-NOV-12 6919879675564 07-NOV-12
    RMAN> list incarnation;
    List of Database Incarnations
    DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
    1       1       ALEPHPR  3573460394       PARENT  1          13-MAY-10
    2       2       ALEPHPR  3573460394       PARENT  2229467    28-JUN-10
    3       3       ALEPHPR  3573460394       CURRENT 6918261828355 26-SEP-12The ASM structure is created...
    ASMCMD> lsdg
    State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
    MOUNTED EXTERN N 512 4096 1048576 509282 507421 0 507421 0 N DATA1/
    MOUNTED EXTERN N 512 4096 1048576 50641 42850 0 42850 0 N FLASH/
    ASMCMD> cd DATA1/ALEPHPR/DATAFILE
    ASMCMD> pwd
    +DATA1/ALEPHPR/DATAFILEBoth source and target databases are 11.2.0.2 PSU 6 running on Linux x64. I cannot use RMAN Duplicate since there is no visibility among different environments (PROD - QA in this case).
    Any idea?
    Thanks
    Martin
    Edited by: martin.morono on Nov 8, 2012 11:19 AM
    Edited by: martin.morono on Nov 8, 2012 11:49 AM

    Thanks Levi,
    I slightly modified your script to recatalog the backup pieces since they are note stored at the same location in PR and QA.
    No luck. The error message is different but the result is the same... it keeps failing.
    RMAN> run {
    2> allocate channel c1 device type disk;
    3> allocate channel c2 device type disk;
    4> restore controlfile from '/restorealeph/c-3573460394-20121107-01';
    5> startup mount;
    6> catalog start with '/restorealeph/';
    7> restore database from tag 'BACKUP_ALEPHPR.TUR_110712030000';
    8> }
    allocated channel: c1
    channel c1: SID=191 device type=DISK
    allocated channel: c2
    channel c2: SID=131 device type=DISK
    Starting restore at 09 NOV 2012 13:11:09
    channel c2: skipped, AUTOBACKUP already found
    channel c1: restoring control file
    channel c1: restore complete, elapsed time: 00:00:15
    output file name=+DATA1/alephpr/controlfile/current.260.798747585
    output file name=+FLASH/alephpr/controlfile/current.276.798747585
    Finished restore at 09 NOV 2012 13:11:24
    database is already started
    database mounted
    Starting implicit crosscheck backup at 09 NOV 2012 13:11:31
    Crosschecked 52 objects
    Finished implicit crosscheck backup at 09 NOV 2012 13:11:39
    Starting implicit crosscheck copy at 09 NOV 2012 13:11:39
    Crosschecked 2 objects
    Finished implicit crosscheck copy at 09 NOV 2012 13:11:40
    searching for all files in the recovery area
    cataloging files...
    cataloging done
    List of Cataloged Files
    =======================
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_2_seq_1.279.795017193
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_2_seq_34950.273.795014469
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_1.281.795017413
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_2.283.795017519
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_3.290.795018411
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_4.291.795018559
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_5.292.795018707
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_6.293.795018811
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_7.294.795018899
    File Name: +flash/ALEPHPR/ARCHIVELOG/2012_09_26/thread_1_seq_8.295.795020509
    File Name: +flash/ALEPHPR/CONTROLFILE/Current.268.798725123
    searching for all files that match the pattern /restorealeph/
    List of Files Unknown to the Database
    =====================================
    File Name: /restorealeph/9cnpm51u_1_1
    File Name: /restorealeph/9enpm6lj_1_1
    File Name: /restorealeph/c-3573460394-20121107-00
    File Name: /restorealeph/c-3573460394-20121107-01
    File Name: /restorealeph/c-3573460394-20121106-01
    Do you really want to catalog the above files (enter YES or NO)? YEs
    cataloging files...
    cataloging done
    List of Cataloged Files
    =======================
    File Name: /restorealeph/9cnpm51u_1_1
    File Name: /restorealeph/9enpm6lj_1_1
    File Name: /restorealeph/c-3573460394-20121107-00
    File Name: /restorealeph/c-3573460394-20121107-01
    File Name: /restorealeph/c-3573460394-20121106-01
    Starting restore at 09 NOV 2012 13:11:48
    released channel: c1
    released channel: c2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/09/2012 13:11:48
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 31 found to restore
    RMAN-06023: no backup or copy of datafile 30 found to restore
    RMAN-06023: no backup or copy of datafile 29 found to restore
    RMAN-06023: no backup or copy of datafile 28 found to restore
    RMAN-06023: no backup or copy of datafile 27 found to restore
    RMAN-06023: no backup or copy of datafile 26 found to restore
    RMAN-06023: no backup or copy of datafile 19 found to restore
    RMAN-06023: no backup or copy of datafile 18 found to restore
    RMAN-06023: no backup or copy of datafile 17 found to restore
    RMAN-06023: no backup or copy of datafile 16 found to restore
    RMAN-06023: no backup or copy of datafile 15 found to restore
    RMAN-06023: no backup or copy of datafile 14 found to restore
    RMAN-06023: no backup or copy of datafile 13 found to restore
    RMAN-06023: no backup or copy of datafile 12 found to restore
    RMAN-06023: no backup or copy of datafile 11 found to restore
    RMAN-06023: no backup or copy of datafile 10 found to restore
    RMAN-06023: no backup or copy of datafile 9 found to restore
    RMAN-06023: no backup or copy of datafile 8 found to restore
    RMAN-06023: no backup or copy of datafile 7 found to restore
    RMAN-06023: no backup or copy of datafile 6 found to restore
    RMAN-06023: no backup or copy of datafile 5 found to restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    RMAN>Just in case, I re-run this script including the crosscheck backup and the delete noprompt expired backups before restoring an the error messages were the same.
    THanks again for your help.
    Regards.
    Martin
    Edited by: martin.morono on Nov 9, 2012 7:21 AM

  • Alter database recover to logical standby is hanging

    Hi,
    when I try to convert my physical standby to logical standby using
    alter database recover to logical standby STANDBYL;
    the command just hangs
    I have seen the usual hit on this which is to create the Redo Dictionary on the Primary using
    execute dbms_logstdby.build;
    which I did but the alter database command still keeps hanging on my Standby
    Any ideas,
    thanks
    Jim

    Hello;
    Does your Standby alert log have any lines like this:
    RECOVER TO LOGICAL ...
    If yes look for the message ( after this )
    Starting datafile conversion
    and post any errors or warnings you have.
    Best Regards
    mseberg

  • How to recover database SYSTEM datafile get corrupt ?

    Database is in ARCHIVELOG mode, and the datafile belonging to SYSTEM tablespace gets corrupted. Up to what point can I recover the database ?
    A. Until last commit.
    B. Until the time you perform recovery.
    C. Until the time the datafile got corrupted.
    D. You cannot recover the SYSTEM tablespace and you must be re-create the database.
    and 1 more doubt :
    If redologfiles are not multiplexed and redolog blocks get corrupt in group 2, and archiving stops. All redolog files are filled and database activity is halted.
    DBWR has written everything to disk. What command can be used to proceed further ?
    A. recover logfile block group 2;
    B. alter database drop logfile group 2;
    C. alter database clear logfile group 2;
    D. alter database recover logfile group 2;
    E. alter database clear unarchived lofile group 2;
    Edited by: user642367 on Sep 18, 2008 8:45 PM

    1. A. Since the DB is in archivelog mode, so you can always restore and recover the whole DB including system tablespace datafile till last SCN generated provided the redo record is available in archive/online logfiles.
    2. E. Since only redolog is corrupted so archiver won't proceed and hence a db hang is obvious, So, in order to proceed further you need to clear online (un archived log file) and then db will work as usual. Care should be taken that you must take a full backkup of DB(cold backup wherever feasible) as soon as possible after issuing this command. As now you don't have redo info in archivelog files to recover the db in case of a crash.
    Please go through Oracle 10g DB Administrators guide (available on OTN) for more details.
    Thanks

  • Alter database begin backup; missing keyword error

    Hi all,
    I am trying to put my database in backup mode using the command "alter database begin backup", but it is giving error shown below:
    $ sqlplus '/as sysdba'
    SQL*Plus: Release 9.2.0.5.0 - Production on Wed Nov 25 16:52:58 2009
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production
    SQL> select name,open_mode from v$database;
    NAME OPEN_MODE
    N05PCS07 READ WRITE
    SQL> alter database begin backup;
    alter database begin backup
    ERROR at line 1:
    ORA-00905: missing keyword
    NE one can tell why the command is failing??
    pls...
    Thanks in advance.
    SHAILESH

    Hello,
    All the former posts are right, alter database begin backup; doesn't exists in 9.2 althought
    you already have in this release the alter database end backup;.
    So as to put all the tablespaces in backup mode in one command I suggest you to create a
    stored procedure as follows:
    CREATE OR REPLACE PROCEDURE begin_backup IS
    TYPE RefCurTyp IS REF CURSOR;
    cv RefCurTyp;
    sql_cv VARCHAR2(400);
    tbs VARCHAR2(128);
    sql_stmt VARCHAR2(200);
    BEGIN
    -- Mise en BEGIN BACKUP des TABLESPACES
    sql_cv := 'SELECT distinct (A.name) FROM sys.v_$tablespace A, sys.v_$datafile B, sys.v_$backup C where A.TS# = B.TS# and B.FILE# = C.FILE# and C.STATUS = ''NOT ACTIVE''';
    OPEN cv FOR sql_cv;
    LOOP
    FETCH cv INTO tbs;
    EXIT WHEN cv%NOTFOUND;
    sql_stmt := 'ALTER TABLESPACE '||tbs||' BEGIN BACKUP';
    EXECUTE IMMEDIATE sql_stmt;
    END LOOP;
    CLOSE cv;
    END;
    Then, I just have to call the Procedure like that:
    execute <schema>.begin_backup; and all the tablespaces are in backup mode.
    This procedure must be created on a User/Schema with the following privileges:
    alter tablespace
    select on sys.v_$tablespace
    select on sys.v_$datafile
    select on sys.v_$backupHope it can help.
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Nov 25, 2009 9:44 PM

Maybe you are looking for

  • Importing Playlists from an older version itunes

    I have a new machine and installed the latest itunes. I have the backup files of itunes from two old machines that are no longer available. I was able to drag/drop the music in no problem. The old itunes backups each have a folder called playlists an

  • 4.0EA1 - Connection Color Not Resetting

    In SQL Developer 4.0 EA 1, when you use a connection with a "Connection Color" set in the connection properties, that connection's SQL Worksheet border properly shows the right color. But, when you switch that same worksheet to a different connection

  • Unable to find Idoc in XI

    Hi, Idoc -> XI -> File I am trying to send an Idoc (ZANSO_MT) from R/3 side to XI. Status of the message is green in we05 in R/3 but I am unable to find it in XI. I have checked in idx5, we05. All the RFC connections are working fine with authorizati

  • Space available going down everyday. It should be 1gb or more but now its 80mb only.

    My iPhone 5's space is going down daily. I havnt downloaded anything at all. This happened a month back too so i restored my phone. And restore the backup too. And at time its was more than 2gb available evem after the sync. And in a one month time i

  • Probleme de lecture en boucle while

    Bonjour, Je dois realiser un programme permettant de mesurer la temperature donné par une sonde pt100. Pour cela je dispose d'un multimetre keithley 2700 avec multiplexer 7708. Mon probléme est le suivant: Lorsque je lance mon programme, une erreur (