Creating Datafiles

I installed 8iR2 on RH6.2. and it is working fine.I created Oracle_Home in Root.I am running out of space under root folder.But I have enough space in /usr and /home.Is it possible to create additional data files in the /usr or /home.
One more thing /usr and /home are in differnt Physical Hard Disk i.e. hda2, where as /root is in hda1.
null

Yes, certainly it's possible to create datafiles elsewhere on your system. From a Unix point of view it would be very advisable to install your Oracle home under another mount point than root. Root is intended only - as the name implies - for use by the root user.

Similar Messages

  • 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

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

  • Pre-create Datafiles before import or not ?

    I'm facing the almost the same problem. I have empty tablespaces created in My database. I want to perform Regaular Import (imp) .When i did Full database Import..There were Errors like
    Not able to create Tablespaces, users does not exist.
    There is also Difference in the Os level Directory structure from the Source Database to Target Database.So somebody can help me how to Perform Full database Import with already created tablespaces, What are the options??

    Database version is 11.2.0.2. The Export is full database Export ( EXP). I don't have much details of this.
    what i have is Export dump(exp) dump file now.
    My database 11.2.0.2 is new Created. It does not contain any schemas etc.It is created using DBCA.
    Now i want to to perform Full database Import. Source database and Target database filesystem structre are different.
    I'm not aware of the schemas in the source database and their File strucutre.
    I did :
    imp sys/pwd file=export_full.dmp FULL=Y IGNORE=Y log=imp.log
    Errors:
    Import: Release 11.2.0.2.0 - Production on Thu Dec 20 16:29:07 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    IMP-00058: ORACLE error 1017 encountered
    ORA-01017: invalid username/password; logon deniedUsername: / as sysdba
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Export file created by EXPORT:V11.02.00 via conventional path
    import done in US7ASCII character set and AL16UTF16 NCHAR character set
    import server uses AL32UTF8 character set (possible charset conversion)
    . importing SYSTEM's objects into SYSTEM
    IMP-00017: following statement failed with ORACLE error 1119:
    "CREATE TABLESPACE "XXX" BLOCKSIZE 8192 DATAFILE '/dbs/XXX40p/oradata/XXX"
    "40p/XXX1_data01.dbf' SIZE 32767M , '/dbs/kfs40p/oradata/XXX40p/kfst1_"
    "data02.dbf' SIZE 32712M AUTOEXTEND ON NEXT 1048576 MAXSIZE 32767M EX"
    "TENT MANAGEMENT LOCAL AUTOALLOCATE ONLINE PERMANENT SEGMENT SPACE MANAGE"
    "MENT AUTO"
    IMP-00003: ORACLE error 1119 encountered
    ORA-01119: error in creating database file '/dbs/XXX40p/oradata/XXX40p/XXX_data01.dbf'
    ORA-27040: file create error, unable to create file
    Linux-x86_64 Error: 2: No such file or directory.
    and some more errors are
    "CREATE USER "xxx_ADMIN" IDENTIFIED BY VALUES xxxx DEFAULT"
    " TABLESPACE "xxx1" TEMPORARY TABLESPACE "TEMP""
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'xxxxx' does not exist
    IMP-00017: following statement failed with ORACLE error 959:
    Like this.
    Please help me on this.
    Thanks..

  • 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

  • HELP: can't create datafile.

    Hi, friends,
    I installed Oracle 10.2.0 one hour ago.
    Then I tried to create a tablespace.
    In this tablespace, I add one datafile, the size is 5GB.
    I used OEM to do this.
    But I don't know why the creating procedure still running.
    Based on my experience, it takes about 5 minutes to
    add a 5GB datafile into a tablespace. Now, 40 minutes has
    gone by, the program is still running.
    What is the problem?
    My system is Windows Server 2003, standard edition.
    Thanks in advance.
    Xiannian

    Hi, friends,
    I have a new finding about adding datafile to tablespace.
    I can't add any datafile to any tablespace to my H drive,
    either my created tablespace, or system-related tablespace,
    except the TEMP tablespace.
    That means, I successfully added datafile to TEMP tablespace with my
    H drive.
    But I can't add datafile to any other system-related tablespace, such as
    SYSTEM, SYSAUX, USER, etc with my H drive.
    My login has administrator previliges. I restarted the whole computer system
    There is no any help.
    Thanks.
    Xiananian

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

  • User created datafiles not showing up in backup

    I've created two extra datafiles. One called USER_DATA the other TEMPORARY_DATA. Both are not being shown as backedup in Enterprise Manager (10g). I've looked in the system directory (Win2003) and notice neither has the extenstion ".DBF". The database is working fine but is Oracle looking for the dbf extension?
    thanks.

    When I first created my podcast, I noticed quite a bit of lag between the time my feed got accepted and the time when it would be found when i did a search on iTunes... I think it was like 2 days before a search on my name or the name of my podcast would bring up my feed.
    Give it a little while to all come together.
    R

  • Creating datafile performance issues

    Hi guys,
    I´m using a oracle rac 10g with 3 nodes, and i needed do create a new datafile in production environment, then i had some performance issues, do you guys have any idea what the cause of this ?
    CREATE TABLESPACE "TBS_TDE_CMS_DATA"
    DATAFILE
    '+RDATA' SIZE 1000M REUSE AUTOEXTEND ON NEXT 1000M MAXSIZE 30000M
    LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
    Any hint would be helpful.
    thanks.

    BrunoSales wrote:
    Hi guys,
    I´m using a oracle rac 10g with 3 nodes, and i needed do create a new datafile in production environment, then i had some performance issues, do you guys have any idea what the cause of this ?
    CREATE TABLESPACE "TBS_TDE_CMS_DATA"
    DATAFILE
    '+RDATA' SIZE 1000M REUSE AUTOEXTEND ON NEXT 1000M MAXSIZE 30000M
    LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
    Any hint would be helpful.
    thanks.why are creating 1GB of initial extent? I think is too big. Remember whenever you add datafile to database, oracle first formats the complete datafile. So doing this can have performance issue as it depends upon the datafile size. check if you face any issue in I/O or check if there are any spikes in I/O.
    You can try adding a datafile with default values and check how much time it take

  • How to create datafile on other patition

    i m using oracle 9i , datafiles are being stored on hard disk partition D:\\ that left with only 200 mb how can i use extra space for my data files

    Hi!
    You are may in the wrong forum ...
    Before you get now in trouble, take a quick look at this:
    just an example for windows
    alter tablespace <your_tablespace>
    add datafile 'free_harddisk:\your_folder\datafileX.extension'
    size 200M autoextend on next 200M maxsize 2000M;and now hit the road ;)
    Regards

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

  • Creating the datafiles in SQL2000

    i am using SQL2000 with win2003server.
    My query is, is that possible to create more datafiles in SQL2000?
    i mean, currently i am having three datafiles with one logfile.
    (i.e. prddata1.mdf,prddata2.ldf,prddata3.ldf and prdlog1.ldf)
    i want to create the three more datafiles.
    after creating the new datafiles, database growth should be with newly created datafiles only.
    is there such concept exists in sql?
    Regards,
    Gayathry.

    Hello my friend
    To have a multiple data files is a good idea with 100 - 200GB each, locates on separated logical drives which span as many disk as you can to maximize I/O performance. In SQL 2000, it must be performed while SAP instances are offline.
    And regarding free percentage in each data file, I don't think it can be controlled in SQL server world if I'm right here. As long as SQL server has sufficient space for this DB, it distributes this kind of space resource automatically. But for performance perspective, there's another option called "fill factor" that you can control, which is about how full each index page can be. It's introduced in here: http://msdn.microsoft.com/en-us/library/aa196711(SQL.80).aspx
    Generally, if you have enough resource of storage, I'd like to set it to 90. But with SQL 2000, if this value of fill factor is higher than 95, storage I/O performance could be vary, depends on what kind and which brand of your storage device is.
    Thanks,
    Effan

  • Control file lost and datafile addeed restore/recovery with no data loss

    Here i have tried to the following
    created new table called t2 and made sure data went to a specific tablespace...
    took a level 0 backup
    removed the control file
    added couple of datafile to above tablespace and then inserted more data
    then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
    SQL> @datafile
    -- list of datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          1          9         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    7 rows selected.
    -- new table is created called t2 and its going into TS called cnt_tst
    SQL> CREATE TABLE TEST.T2
      C1  DATE,
      C2  NUMBER,
      C3  NUMBER,
      C4  VARCHAR2(300 BYTE)
    TABLESPACE cnt_tst;  2    3    4    5    6    7    8
    Table created.
    -- data inserted
    SQL> INSERT INTO
      test.T2
    SELECT
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    10000 rows created.
    SQL> commit;
    Commit complete.
    -- to check of cnt_tst has any free space or not, as we can see its full
    SQL> @datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    7 rows selected.
    SQL> select count(*) from test.t2;
      COUNT(*)
         10000
    1 row selected.
    -- to get a count and max on date
    SQL> select max(c1) from test.t2;
    MAX(C1)
    29-feb-12 13:47:52
    1 row selected.
    SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog)
    SQL> -- now control files are removed
    SQL> select name from v$controlfile;
    NAME
    /ctrl/trgt/control01.ctl
    /ctrl/trgt/control02.ctl
    2 rows selected.
    SQL>
    SQL> ! rm /ctrl/trgt/control01.ctl
    SQL> ! rm /ctrl/trgt/control02.ctl
    SQL> ! ls -ltr /ctrl/trgt/
    ls: /ctrl/trgt/: No such file or directory
    SQL>
    -- new datafile is added to CNT_TST TABLESPACE and new data is added as well
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF;
    Tablespace altered.
    SQL> ALTER SYSTEM CHECKPOINT;
    System altered.
    SQL> alter system switch logfile;
    System altered.
    SQL> /
    System altered.
    SQL> /
    System altered.
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST03.dbf' SIZE 100M AUTOEXTEND OFF;
    Tablespace altered.
    SQL>  INSERT INTO
      test.T2
    SELECT
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    10000 rows created.
    SQL> /
    10000 rows created.
    SQL> commit;
    Commit complete.
    SQL> INSERT INTO
      test.T2
    SELECT
    FROM
      (SELECT
        SYSDATE,
        ROWNUM C2,
        DECODE(MOD(ROWNUM,100),99,99,1) C3,
        RPAD('A',300,'A') C4
      FROM
        DUAL
      CONNECT BY
        LEVEL <= 40000)
    ;  2    3    4    5    6    7    8    9   10   11   12   13   14   15
    40000 rows created.
    SQL> commit;
    Commit complete.
    SQL> @datafile
    -- to make sure new datafile has been registered with the DB
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    CNT_TST    Datafile ONLINE    AVAILABLE          9         91        100        0 /data3/trgt/CNT_TST03.dbf               9 NO
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf                3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf                  5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          9         91        100        0 /data3/trgt/CNT_TST02.dbf               8 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf                 2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf            4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf                 1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf                 6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf               7 NO
    9 rows selected.
    -- now the count and max ... note count before backup was 10000 and max(c1) was diff
    SQL> select count(*) from test.t2;
      COUNT(*)
         70000
    1 row selected.
    SQL> select max(c1) from test.t2;
    MAX(C1)
    29-feb-12 13:58:25
    1 row selected.
    SQL> -- now restore starts
    SQL> shutdown abort;
    ORACLE instance shut down.
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@berry trgt]$ rman
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed Feb 29 14:01:48 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    RMAN>  connect catalog rman/pass@rcat
    connected to recovery catalog database
    RMAN>  connect target /
    connected to target database (not started)
    RMAN> startup nomount;
    Oracle instance started
    Total System Global Area     188313600 bytes
    Fixed Size                     1335388 bytes
    Variable Size                125833124 bytes
    Database Buffers              58720256 bytes
    Redo Buffers                   2424832 bytes
    RMAN> restore controlfile from autobackup;
    Starting restore at 29-FEB-12 14:02:37
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=20 device type=DISK
    recovery area destination: /backup/trgt/flash_recovery_area
    database name (or database unique name) used for search: TRGT
    channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area
    channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120229
    channel ORA_DISK_1: AUTOBACKUP found: /backup/trgt/backup/cont_c-3405317011-20120229-09
    channel ORA_DISK_1: restoring control file from AUTOBACKUP /backup/trgt/backup/cont_c-3405317011-20120229-09
    channel ORA_DISK_1: control file restore from AUTOBACKUP complete
    output file name=/ctrl/trgt/control01.ctl
    output file name=/ctrl/trgt/control02.ctl
    Finished restore at 29-FEB-12 14:02:39
    RMAN> alter database mount;
    database mounted
    released channel: ORA_DISK_1
    RMAN> recover database;
    Starting recover at 29-FEB-12 14:02:55
    Starting implicit crosscheck backup at 29-FEB-12 14:02:55
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=20 device type=DISK
    Crosschecked 96 objects
    Finished implicit crosscheck backup at 29-FEB-12 14:02:57
    Starting implicit crosscheck copy at 29-FEB-12 14:02:57
    using channel ORA_DISK_1
    Finished implicit crosscheck copy at 29-FEB-12 14:02:57
    searching for all files in the recovery area
    cataloging files...
    no files cataloged
    using channel ORA_DISK_1
    starting media recovery
    archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
    archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
    archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
    archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
    archived log file name=/redo_archive/trgt/archive/1_10_776523284.dbf thread=1 sequence=10
    archived log file name=/redo_archive/trgt/archive/1_11_776523284.dbf thread=1 sequence=11
    archived log file name=/redo_archive/trgt/archive/1_12_776523284.dbf thread=1 sequence=12
    archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 02/29/2012 14:02:59
    ORA-01422: exact fetch returns more than requested number of rows
    RMAN-20505: create datafile during recovery
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/redo_archive/trgt/online/redo01.log'
    ORA-00283: recovery session canceled due to errors
    ORA-01244: unnamed datafile(s) added to control file by media recovery
    ORA-01110: data file 9: '/data3/trgt/CNT_TST03.dbf'
    RMAN> -- wnet to session 2 and renamed datafile from unammed-- wnet to session 2 and renamed datafile for unammed file
    SQL> select name from v$datafile;
    NAME
    /data/trgt/system01.dbf
    /data/trgt/sysaux01.dbf
    /data/trgt/undotbs01.dbf
    /data3/trgt/move/users01.dbf
    /data3/trgt/user02.dbf
    /data3/trgt/users03.dbf
    /data3/trgt/cnt_tst01.dbf
    /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008
    /oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009
    9 rows selected.
    SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00008' as '/data3/trgt/CNT_TST02.dbf';
    Database altered.
    SQL> alter database create datafile '/oracle/app/product/11.2.0/dbhome_1/dbs/UNNAMED00009' as '/data3/trgt/CNT_TST03.dbf';
    Database altered.
    SQL>  select name from v$datafile;
    NAME
    /data/trgt/system01.dbf
    /data/trgt/sysaux01.dbf
    /data/trgt/undotbs01.dbf
    /data3/trgt/move/users01.dbf
    /data3/trgt/user02.dbf
    /data3/trgt/users03.dbf
    /data3/trgt/cnt_tst01.dbf
    /data3/trgt/CNT_TST02.dbf
    /data3/trgt/CNT_TST03.dbf
    9 rows selected.after above was done, went back to session 1 and tried recovered the DB
    RMAN> recover database;
    Starting recover at 29-FEB-12 14:06:16
    using channel ORA_DISK_1
    starting media recovery
    archived log for thread 1 with sequence 13 is already on disk as file /redo_archive/trgt/online/redo01.log
    archived log for thread 1 with sequence 14 is already on disk as file /redo_archive/trgt/online/redo02.log
    archived log for thread 1 with sequence 15 is already on disk as file /redo_archive/trgt/online/redo03.log
    archived log file name=/redo_archive/trgt/online/redo01.log thread=1 sequence=13
    archived log file name=/redo_archive/trgt/online/redo02.log thread=1 sequence=14
    archived log file name=/redo_archive/trgt/online/redo03.log thread=1 sequence=15
    media recovery complete, elapsed time: 00:00:00
    Finished recover at 29-FEB-12 14:06:17
    RMAN> alter database open resetlogs;
    database opened
    new incarnation of database registered in recovery catalog
    starting full resync of recovery catalog
    full resync complete
    starting full resync of recovery catalog
    full resync complete
    RMAN> exit
    Recovery Manager complete.
    [oracle@berry trgt]$
    [oracle@berry trgt]$
    [oracle@berry trgt]$ sq
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 29 14:07:18 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss:
      2
    SQL>
    SQL> alter session set NLS_DATE_FORMAT="dd-mon-yy hh24:mi:ss";
    Session altered.
    SQL> select count(*) from test.t2;
    select count(*) from test.t2
    ERROR at line 1:
    ORA-00376: file 8 cannot be read at this time
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    SQL> select max(c1) from test.t2;
    select max(c1) from test.t2
    ERROR at line 1:
    ORA-00376: file 8 cannot be read at this time
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    SQL> alter database datafile 8 online;
    alter database datafile 8 online
    ERROR at line 1:
    ORA-01190: control file or data file 8 is from before the last RESETLOGS
    ORA-01110: data file 8: '/data3/trgt/CNT_TST02.dbf'
    {code}
    so what did i do wrong in my recovery that i could not get my data?? how can i avoid this?? and restore my DB?
    Edited by: user8363520 on Feb 29, 2012 12:24 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    user8363520 wrote:
    Here i have tried to the following
    created new table called t2 and made sure data went to a specific tablespace...
    took a level 0 backup
    removed the control file
    added couple of datafile to above tablespace and then inserted more data
    then went out to restore control file and the database...but datafile still could not be opened ?? what did i do wrong here....
    SQL> @datafile
    -- list of datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf ;               3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf ;                 5 YES
    CNT_TST    Datafile ONLINE    AVAILABLE          1          9         10        0 /data3/trgt/cnt_tst01.dbf ;              7 NO
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf ;                2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf ;           4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf ;                1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf ;                6 YES
    7 rows selected.
    -- new table is created called t2 and its going into TS called cnt_tst
    SQL> CREATE TABLE TEST.T2
    C1  DATE,
    C2  NUMBER,
    C3  NUMBER,
    C4  VARCHAR2(300 BYTE)
    TABLESPACE cnt_tst;  2    3    4    5    6    7    8
    Table created.
    -- data inserted
    SQL> INSERT INTO
    test.T2
    SELECT
    FROM
    (SELECT
    SYSDATE,
    ROWNUM C2,
    DECODE(MOD(ROWNUM,100),99,99,1) C3,
    RPAD('A',300,'A') C4
    FROM
    DUAL
    CONNECT BY
    LEVEL <= 10000)
    ;   2    3    4    5    6    7    8    9   10   11   12   13   14   15
    10000 rows created.
    SQL> commit;
    Commit complete.
    -- to check of cnt_tst has any free space or not, as we can see its full
    SQL> @datafile
    Tablespace File Typ Tablespac File Stat    Used MB    Free MB    FILE_MB    MAXMB Datafile_name                     FILE_ID AUT
    UNDOTBS1   Datafile ONLINE    AVAILABLE         16         84        100    1,024 /data/trgt/undotbs01.dbf ;               3 YES
    USERS      Datafile ONLINE    AVAILABLE       1153        895       2048    3,072 /data3/trgt/user02.dbf ;                 5 YES
    SYSAUX     Datafile ONLINE    AVAILABLE        626         35        660   32,768 /data/trgt/sysaux01.dbf ;                2 YES
    USERS      Datafile ONLINE    AVAILABLE       2031         17       2048    2,048 /data3/trgt/move/users01.dbf ;           4 YES
    SYSTEM     Datafile ONLINE    AVAILABLE        712         58        770   32,768 /data/trgt/system01.dbf ;                1 YES
    USERS      Datafile ONLINE    AVAILABLE         65         35        100   32,768 /data3/trgt/users03.dbf ;                6 YES
    CNT_TST    Datafile ONLINE    AVAILABLE         10          0         10        0 /data3/trgt/cnt_tst01.dbf ;              7 NO
    7 rows selected.
    SQL> select count(*) from test.t2;
    COUNT(*)
    10000
    1 row selected.
    -- to get a count and max on date
    SQL> select max(c1) from test.t2;
    MAX(C1)
    29-feb-12 13:47:52
    1 row selected.
    SQL> -- AT THIS POINT A LEVEL 0 BACKUP IS TAKEN (using backup database plus archivelog)
    SQL> -- now control files are removed
    SQL> select name from v$controlfile;
    NAME
    /ctrl/trgt/control01.ctl
    /ctrl/trgt/control02.ctl
    2 rows selected.
    SQL>
    SQL> ! rm /ctrl/trgt/control01.ctl
    SQL> ! rm /ctrl/trgt/control02.ctl
    SQL> ! ls -ltr /ctrl/trgt/
    ls: /ctrl/trgt/: No such file or directory
    SQL>
    -- new datafile is added to CNT_TST TABLESPACE and new data is added as well
    SQL> ALTER TABLESPACE CNT_TST ADD DATAFILE '/data3/trgt/CNT_TST02.dbf' SIZE 100M AUTOEXTEND OFF;
    Tablespace altered.
    SQL> ALTER SYSTEM CHECKPOINT;
    System altered. Upto this i was clear, but now i cann't understand when you actually dropped the control file from you database(in running stat) how can you perform "alter system checkpoint" and other "alter tablespace.." command? Once controlfile is inaccessible, oracle database is not suppose to function.

  • Rman datafile recovery ORA-01178

    Hi Team,
    I need to suggestion in recovering this file.
    SQL> /
    NAME STATUS
    +DATA_GRP/demo/datafile/test.dbf RECOVER
    Here I manually removed the file from asm.
    ASMCMD> ls -ltr
    Type Redund Striped Time Sys Name
    DATAFILE UNPROT COARSE SEP 02 14:00:00 Y SYSAUX.264.695779475
    DATAFILE UNPROT COARSE SEP 02 14:00:00 Y SYSTEM.263.695779475
    DATAFILE UNPROT COARSE SEP 02 14:00:00 Y UNDOTBS1.266.695779475
    DATAFILE UNPROT COARSE SEP 02 14:00:00 Y USERS.262.695779511
    DATAFILE UNPROT COARSE SEP 02 15:00:00 Y TEST.271.696521689
    N test.dbf => +DATA_GRP/DEMO/DATA
    FILE/TEST.271.696521689
    ASMCMD> rm -f test.dbf
    ASMCMD> ls -ltr
    Type Redund Striped Time Sys Name
    DATAFILE UNPROT COARSE SEP 02 14:00:00 Y SYSAUX.264.695779475
    DATAFILE UNPROT COARSE SEP 02 14:00:00 Y SYSTEM.263.695779475
    DATAFILE UNPROT COARSE SEP 02 14:00:00 Y UNDOTBS1.266.695779475
    DATAFILE UNPROT COARSE SEP 02 14:00:00 Y USERS.262.695779511
    Then I tried to recreate the datafile, But I failed
    SQL> alter database create datafile 5;
    alter database create datafile 5
    ERROR at line 1:
    ORA-01178: file 5 created before last CREATE CONTROLFILE, cannot recreate
    ORA-01110: data file 5: '+DATA_GRP/demo/datafile/test.dbf'
    and also I tried to restore the datafile.same error.
    RMAN> restore datafile 5;
    Starting restore at 02-SEP-09
    using channel ORA_DISK_1
    creating datafile fno=5 name=+DATA_GRP/demo/datafile/test.dbf
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 09/02/2009 17:50:47
    ORA-01178: file 5 created before last CREATE CONTROLFILE, cannot recreate
    ORA-01110: data file 5: '+DATA_GRP/demo/datafile/test.dbf'
    could anyone suggest me to recover the datafile and my retention policy is set to none.
    Thanks & Regards,
    Muhammed Thameem. S

    You look remarkably close to both toast and a runner up spot on a reality TV show titled "What were you thinking when you ....?"
    Open an SR at metalink.

Maybe you are looking for

  • Route in stock transfer order

    Hi I just want to check whether if route is not mentioned in the sto can we process the sto till goods receipt. movement type for goods issyue is 641. In delivery document flow I see following  for the sto which have route. Delivery WMS TO TF to stoc

  • Any hope for syncing a "LG Dare" (Verizon)

    Well as i'm sure many of you have seen the new "3G iPhone Competitor" will be released on verizon this week. any hope for syncing with iCal and or Contacts? Please don't rip on me for this I just cannot afford a plan on ATT.

  • Compress audio file to mp3 or aiff of 5 MB?

    Hello, Does anyone know if I cam compress an audio file on GarageBand for the iPad 2? I'd like to take a file 30 minutes in length and be able to email it, so I need to compress it to 5 MB or less.

  • Migrate to 10g from 6i, Mouse related trigger replacement

    I am new in JDeveloper. While implementing the Mouse related trigger (say, when-mouse-enter) for a text item, I am following the example of button provided by the Oracle for the same purpose. But somehow I was unable to implement that. Can some body

  • Ipod windows and mac

    It is possible to use ipod nano both itunes in mac and in windows if I have two pc with different operation system? TK