ORA-01180: can not create datafile 1

NeilZhang
NeilZhang
管理员
140
文章
106.8千
浏览
Oracle评论2,461字数 617阅读2分3秒阅读模式

Last night I prepared one restore guide for a friend, and I found when I restored the full database, I always got below error:

  1. creating datafile file number=1 name=+DATA/ORATEST/datafile/system01.dbf
  2. released channel: d1
  3. released channel: d2
  4. RMAN-00571: ===========================================================
  5. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  6. RMAN-00571: ===========================================================
  7. RMAN-03002: failure of restore command at 05/05/2017 00:59:49
  8. ORA-01180: can not create datafile 1
  9. ORA-01110: data file 1: '/oradata/ora11g/system01.dbf'

I already set new name for the system data file, while what the new name was, I always got this error.

It was weird that I had been restored databases many many times, and I double checked the restore statements to make sure they were correct.

I did not found way to fix it and until the next day I realized maybe I made one simple mistake and caused this issue. From Oracle support webiste, I found a reply said that Oracle would do similar thing when there was no backup of the datafile, so the reason was that there was no backup for the database?

  1. RMAN> list backup of database;
  2.  
  3. specification does not match any backup in the repository
  4.  
  5. RMAN> catalog start with '/oradata/oraback';
  6.  
  7. searching for all files that match the pattern /oradata/oraback
  8.  
  9. List of Files Unknown to the Database
  10. =====================================
  11. File Name: /oradata/oraback/ORA11G_20170504_7_1_07s3c3bo.ctl
  12. File Name: /oradata/oraback/ora11g_full.log
  13. File Name: /oradata/oraback/ORA11G_20170504_3_1_03s3c3bm.ctl
  14. File Name: /oradata/oraback/ORA11G_20170504_8_1_08s3c3bp.ora
  15. File Name: /oradata/oraback/ORA11G_20170504_5_1_05s3c3bm.ctl
  16. File Name: /oradata/oraback/ORA11G_20170504_4_1_04s3c3bm.ctl
  17. File Name: /oradata/oraback/ORA11G_20170504_6_1_06s3c3bm.ctl
  18. File Name: /oradata/oraback/ORA11G_20170504_9_1_09s3c3c0.arc
  19.  
  20. Do you really want to catalog the above files (enter YES or NO)? YES
  21. cataloging files...
  22. cataloging done
  23.  
  24. List of Cataloged Files
  25. =======================
  26. File Name: /oradata/oraback/ORA11G_20170504_7_1_07s3c3bo.ctl
  27. File Name: /oradata/oraback/ORA11G_20170504_3_1_03s3c3bm.ctl
  28. File Name: /oradata/oraback/ORA11G_20170504_8_1_08s3c3bp.ora
  29. File Name: /oradata/oraback/ORA11G_20170504_5_1_05s3c3bm.ctl
  30. File Name: /oradata/oraback/ORA11G_20170504_4_1_04s3c3bm.ctl
  31. File Name: /oradata/oraback/ORA11G_20170504_6_1_06s3c3bm.ctl
  32. File Name: /oradata/oraback/ORA11G_20170504_9_1_09s3c3c0.arc
  33.  
  34. List of Files Which Where Not Cataloged
  35. =======================================
  36. File Name: /oradata/oraback/ora11g_full.log
  37. RMAN-07517: Reason: The file header is corrupted

Then I restored it again and it worked well.

So, why I did catalog the backup first?

  1. [oracle@olinux69 oradata]$ rman target / log='/oradata/oraback/ora11g_full.log' <<EOF
  2. > run {
  3. > allocate channel d1 type disk;
  4. > allocate channel d2 type disk;
  5. > allocate channel d3 type disk;
  6. > allocate channel d4 type disk;
  7. > backup AS COMPRESSED BACKUPSET INCREMENTAL LEVEL = 0 database
  8. > format '/oradata/oraback/full_%d_%T_%s_%p_%u.bak' tag 'full_backup'
  9. > include current controlfile
  10. > format '/oradata/oraback/%d_%T_%s_%p_%u.ctl' tag 'ctl_backup'
  11. > plus archivelog SKIP INACCESSIBLE
  12. > format '/oradata/oraback/%d_%T_%s_%p_%u.arc' tag 'arc_backup'
  13. > delete all input;
  14. > release channel d4;
  15. > release channel d3;
  16. > release channel d2;
  17. > release channel d1;
  18. > }
  19. > EOF

I made the backup both database and controlfile at the same time, and I though the contofile should already have the backup information, and the restore was on the same server, so I made such assumption.

So if I double checked the backup information, I could finish the restore in several minutes.

And how to backup them both and the control file will contain the backup information? Is it possible? ORA-01180: can not create datafile 1

 
  • 本文由 NeilZhang 发表于07/05/2017 15:51:24
  • Repost please keep this link: https://www.dbcloudsvc.com/blogs/oracle/ora-01180-can-not-create-datafile-1/
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定