12 Replies Latest reply: Apr 11, 2008 12:11 PM by 517070 RSS

    ORA-01180: can not create datafile

    556637
      I created a standby database using RMAN backup file.

      1. backup primary database and create standby control file
      RMAN> run
      {
      allocate channel c1 type disk;
      backup database format '/u01/app/oracle/admin/confgdb/db_%u_%d_%s';
      backup format '/u01/app/oracle/admin/confgdb/log_t%t_s%s_p%p' (archivelog all);
      }

      SQL> alter database create standby controlfile as '/u01/app/oracle/admin/confgdb/control01.dbf';

      2. Get thest file from primary database server via sftp command.

      3. copy init file from primary database to standby database. Add following:
      standby_file_management=auto
      fal_server='DBPRIMARY'
      fal_client='DBSTANDBY'

      4. startup standby database
      SQL> startup nomount pfile='/u01/app/oracle/admin/confgdb/initconfgdb.ora';
      SQL> alter database mount standby database;

      5. connect mounted standby database and start to restore backup file
      $ $ORACLE_HOME/bin/rman target /
      RMAN> restore database;

      Starting restore at 26-MAR-08
      using target database control file instead of recovery catalog
      allocated channel: ORA_DISK_1
      channel ORA_DISK_1: sid=83 devtype=DISK

      creating datafile fno=1 name=/u01/app/oracle/admin/confgdb/system01.dbf
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of restore command at 03/26/2008 08:40:40
      ORA-01180: can not create datafile 1
      ORA-01110: data file 1: '/u01/app/oracle/admin/confgdb/system01.dbf'


      I checked directory
      ls -l /u01/app/oracle/admin/confgdb
      total 337768
      drwxr-xr-x 2 oracle oinstall 4096 Mar 26 08:40 adump
      drwxr-xr-x 2 oracle oinstall 4096 Mar 26 08:38 archive
      drwxr-xr-x 2 oracle oinstall 4096 Mar 26 08:45 bdump
      drwxr-xr-x 2 oracle oinstall 4096 Mar 26 08:38 cdump
      -rw-r----- 1 oracle oinstall 6209536 Mar 26 09:51 control01.dbf
      -rw-r----- 1 oracle oinstall 333012992 Mar 25 16:58 db_01jc4ohg_CONFGDB_1
      -rw-r----- 1 oracle oinstall 6258688 Mar 25 17:01 db_02jc4oia_CONFGDB_2
      -rwxr-xr-x 1 oracle oinstall 9353 Mar 26 08:32 initconfgdb.ora
      drwxr-xr-x 2 oracle oinstall 4096 Mar 26 08:38 recover
      drwxr-xr-x 2 oracle oinstall 4096 Mar 26 08:40 udump

      I do not know the root cause and how to resolve it.

      Can you help me to find the root cause?

      -Doris
        • 1. Re: ORA-01180: can not create datafile
          26741
          You don't have enough free space in the filesystem ?
          • 2. Re: ORA-01180: can not create datafile
            556637
            the restore process was successfully. But after restore, I can not login database using system and other account exclude sys.

            it always throw error:
            ORA-01033: ORACLE initialization or shutdown in progress

            Can you help me?
            • 3. Re: ORA-01180: can not create datafile
              26741
              I do not know how you resolved the
              "ORA-01180: can not create datafile 1" to understand that caused the error.

              You could check the permissions on the oracle binary under $ORACLE_HOME/bin.
              • 4. Re: ORA-01180: can not create datafile
                556637
                The issue did not resolved.

                I checked the permissions on the oracle binary under $ORACLE_HOME/bin

                drwxrwxrwx 2 oracle dba 8192 Mar 10 10:53 bin
                • 5. Re: ORA-01180: can not create datafile
                  556637
                  seems that the backupset can not be found

                  RMAN> list backup;

                  using target database control file instead of recovery catalog

                  List of Backup Sets
                  ===================

                  BS Key Type LV Size Device Type Elapsed Time Completion Time
                  ------- ---- -- ---------- ----------- ------------ ---------------
                  1 Full 317.58M DISK 00:00:25 25-MAR-08
                  BP Key: 1 Status: EXPIRED Compressed: NO Tag: TAG20080325T072848
                  Piece Name: /u01/app/oracle/admin/confgdb/db_01jc4ohg_CONFGDB_1
                  List of Datafiles in backup set 1
                  File LV Type Ckp SCN Ckp Time Name
                  ---- -- ---- ---------- --------- ----
                  1 Full 330396 25-MAR-08 /u01/app/oracle/admin/confgdb/system01.dbf
                  2 Full 330396 25-MAR-08 /u01/app/oracle/admin/confgdb/undotbs01.dbf
                  3 Full 330396 25-MAR-08 /u01/app/oracle/admin/confgdb/sysaux01.dbf
                  4 Full 330396 25-MAR-08 /u01/app/oracle/admin/confgdb/wbxobj_large01.dbf

                  BS Key Type LV Size Device Type Elapsed Time Completion Time
                  ------- ---- -- ---------- ----------- ------------ ---------------
                  2 Full 5.95M DISK 00:00:01 25-MAR-08
                  BP Key: 2 Status: EXPIRED Compressed: NO Tag: TAG20080325T072848
                  Piece Name: /u01/app/oracle/admin/confgdb/db_02jc4oia_CONFGDB_2
                  Control File Included: Ckp SCN: 330404 Ckp time: 25-MAR-08

                  BS Key Size Device Type Elapsed Time Completion Time
                  ------- ---------- ----------- ------------ ---------------
                  3 703.25M DISK 00:01:14 25-MAR-08
                  BP Key: 3 Status: EXPIRED Compressed: NO Tag: TAG20080325T072917
                  Piece Name: /u01/app/oracle/admin/confgdb/log_t650273358_s3_p1

                  List of Archived Logs in backup set 3
                  Thrd Seq Low SCN Low Time Next SCN Next Time
                  ---- ------- ---------- --------- ---------- ---------
                  1 1 1 25-MAR-08 36673 25-MAR-08
                  1 2 36673 25-MAR-08 67081 25-MAR-08
                  1 3 67081 25-MAR-08 84000 25-MAR-08
                  1 4 84000 25-MAR-08 102759 25-MAR-08
                  1 5 102759 25-MAR-08 118941 25-MAR-08
                  1 6 118941 25-MAR-08 144947 25-MAR-08
                  1 7 144947 25-MAR-08 164589 25-MAR-08
                  1 8 164589 25-MAR-08 183384 25-MAR-08
                  1 9 183384 25-MAR-08 207298 25-MAR-08
                  1 10 207298 25-MAR-08 229164 25-MAR-08
                  1 11 229164 25-MAR-08 248487 25-MAR-08
                  1 12 248487 25-MAR-08 271884 25-MAR-08
                  1 13 271884 25-MAR-08 284059 25-MAR-08
                  1 14 284059 25-MAR-08 301700 25-MAR-08
                  1 15 301700 25-MAR-08 319121 25-MAR-08
                  1 16 319121 25-MAR-08 330415 25-MAR-08

                  The backup sets are all expired and the piece name is not the current backupset.

                  My server do not have actual directory /u01/app/oracle/admin/confgdb, I just create a symbolic link using command: ln -s.

                  I have copy the backupset from source server to dest server.
                  • 6. Re: ORA-01180: can not create datafile
                    ebrian
                    the restore process was successfully. But after
                    restore, I can not login database using system and
                    other account exclude sys.
                    How was your restore successful when you say RMAN can't find the backup pieces?
                    • 7. Re: ORA-01180: can not create datafile
                      26741
                      If you "just created a symbolic link" HOW do you expect Oracle to find
                      files and create files under what is expected to be a directory ?
                      How would "'/u01/app/oracle/admin/confgdb/system01.dbf' be restored if
                      "configdb" does not allow writes ?

                      Did your restore succeed OR did it not ?
                      Was your issue resolved OR was it not ?

                      WHAT WHAT WHAT was your issue ?
                      • 8. Re: ORA-01180: can not create datafile
                        556637
                        Sorry, I think that I did not describe my issue clearly.

                        Let me describe again:

                        My primary database and standby database exist on different server, due to their $ORACLE_HOME are not same, so I use symbolic link to replace actual directory. I do not know whether it will influence RMAN restore?

                        -Doris
                        • 9. Re: ORA-01180: can not create datafile
                          26741
                          The "list backup" output that you presented -- is it from the primary server
                          (reading the active controlfile) or from the standby server (reading the
                          backup/standby controlfile) ?


                          Can you CATALOG the backup pieces ?
                          • 10. Re: ORA-01180: can not create datafile
                            556637
                            Read from standby server, I can not find the backupset name which has been exist under that directory.

                            -Doris
                            • 11. Re: ORA-01180: can not create datafile
                              26741
                              Either the backupset was not even copied to the standby server (to the
                              correct directory, check your soft-links and paths again) OR the backupset
                              was deleted by someone / someother script.
                              • 12. Re: ORA-01180: can not create datafile
                                517070
                                Doris,

                                The root cause is that the current controlfile does not find the datafile. So there is nothing to restore to.

                                You may want to restore controlfile from your backup init or spfile(generally rman backup also backup init or spfiles along with datafiles). This way it finds the datafile heading in the newly restored controlfile.

                                MTGOAT