Bo's Oracle Station

查看: 1765|回复: 0

课程第35次(2018-04-23星期一)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2018-4-23 20:14:20 | 显示全部楼层 |阅读模式
SET NEWNAME指导restore:

  1. run{
  2. set newname for datafile 5 to '/home/oracle/examplettio.dbf';
  3. restore datafile 5;
  4. delete datafilecopy '/home/oracle/examplettio.dbf';
  5. }
复制代码
  1. RMAN> report schema;

  2. using target database control file instead of recovery catalog
  3. Report of database schema for database with db_unique_name ORCL

  4. List of Permanent Datafiles
  5. ===========================
  6. File Size(MB) Tablespace           RB segs Datafile Name
  7. ---- -------- -------------------- ------- ------------------------
  8. 1    690      SYSTEM               ***     +DATA/orcl/datafile/system.267.972323303
  9. 2    560      SYSAUX               ***     +DATA/orcl/datafile/sysaux.259.972323303
  10. 3    100      UNDOTBS1             ***     +DATA/orcl/datafile/undotbs1.273.972323303
  11. 4    5        USERS                ***     +DATA/orcl/datafile/users.262.972323303
  12. 5    100      EXAMPLE              ***     +DATA/orcl/datafile/example.265.972323303
  13. 6    0        TBSOCP05_TEST        ***     +DATA/orcl/datafile/tbsocp05_test.257.974234897

  14. List of Temporary Files
  15. =======================
  16. File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
  17. ---- -------- -------------------- ----------- --------------------
  18. 1    50       TEMP                 32767       +DATA/orcl/datafile/temp01.dbf

  19. RMAN> list backup of tablespace TBSOCP05_TEST;

  20. specification does not match any backup in the repository

  21. RMAN> exit                             


  22. Recovery Manager complete.
  23. [oracle@station11 ~]$ sqlplus /nolog

  24. SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 23 20:54:40 2018

  25. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  26. SQL> conn / as sysdba
  27. Connected.
  28. SQL> alter database create datafile 6 ;   

  29. Database altered.

  30. SQL> recover datafile 6 ;
  31. ORA-00283: recovery session canceled due to errors
  32. ORA-01110: data file 6: '+DATA/orcl/datafile/tbsocp05_test.257.974234897'
  33. ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
  34. ORA-01110: data file 6: '+DATA/orcl/datafile/tbsocp05_test.257.974234897'


  35. SQL> alter database create datafile 6 as new;

  36. Database altered.

  37. SQL> recover datafile 6 ;
  38. ORA-00279: change 2328927 generated at 04/23/2018 20:48:16 needed for thread 1
  39. ORA-00289: suggestion : /u01/app/oracle/oradata/archivelog/1_38_972323822.dbf
  40. ORA-00280: change 2328927 for thread 1 is in sequence #38


  41. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  42. auot
  43. ORA-00308: cannot open archived log 'auot'
  44. ORA-27037: unable to obtain file status
  45. Linux-x86_64 Error: 2: No such file or directory
  46. Additional information: 3


  47. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  48. auto
  49. ORA-00279: change 2329205 generated at 04/23/2018 20:48:17 needed for thread 1
  50. ORA-00289: suggestion : /u01/app/oracle/oradata/archivelog/1_39_972323822.dbf
  51. ORA-00280: change 2329205 for thread 1 is in sequence #39


  52. ORA-00279: change 2329224 generated at 04/23/2018 20:48:18 needed for thread 1
  53. ORA-00289: suggestion : /u01/app/oracle/oradata/archivelog/1_40_972323822.dbf
  54. ORA-00280: change 2329224 for thread 1 is in sequence #40


  55. ORA-00279: change 2329229 generated at 04/23/2018 20:48:22 needed for thread 1
  56. ORA-00289: suggestion : /u01/app/oracle/oradata/archivelog/1_41_972323822.dbf
  57. ORA-00280: change 2329229 for thread 1 is in sequence #41


  58. Log applied.
  59. Media recovery complete.
  60. SQL>

复制代码




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-3-28 22:01 , Processed in 0.044228 second(s), 24 queries .

快速回复 返回顶部 返回列表