Bo's Oracle Station

查看: 2851|回复: 2

课程第17次(2018-07-05星期四)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2018-7-5 19:36:33 | 显示全部楼层 |阅读模式
TDE(默认没打开):
  1. [oracle@station86 ~]$ sqlplus /nolog

  2. SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 5 19:33:55 2018

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

  4. SQL> conn / as sysdba
  5. Connected.
  6. SQL> set linesize 1000
  7. SQL> select  * from v$encryption_wallet;

  8. WRL_TYPE
  9. --------------------
  10. WRL_PARAMETER
  11. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  12. STATUS
  13. ------------------
  14. file
  15. /u01/app/oracle/admin/orcl/wallet
  16. CLOSED


  17. SQL>
复制代码
制造主密钥:
  1. [oracle@station86 wallet]$ sqlplus /nolog

  2. SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 5 19:37:47 2018

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

  4. SQL> conn / as sysdba
  5. Connected.
  6. SQL> alter system set encryption key identified by "oracle123";

  7. System altered.

  8. SQL> exit
  9. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
  10. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  11. and Real Application Testing options
  12. [oracle@station86 wallet]$ ls
  13. ewallet.p12
  14. [oracle@station86 wallet]$ file ewallet.p12
  15. ewallet.p12: data
  16. [oracle@station86 wallet]$ du -sh ewallet.p12
  17. 4.0K        ewallet.p12
  18. [oracle@station86 wallet]$
复制代码
  1. [oracle@station86 wallet]$ sqlplus /nolog

  2. SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 5 19:40:11 2018

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

  4. SQL> conn / as sysdba
  5. Connected.
  6. SQL> select  * from v$encryption_wallet;

  7. WRL_TYPE
  8. --------------------
  9. WRL_PARAMETER
  10. --------------------------------------------------------------------------------
  11. STATUS
  12. ------------------
  13. file
  14. /u01/app/oracle/admin/orcl/wallet
  15. OPEN

复制代码
  1. SQL> conn hr/oracle_4U
  2. Connected.
  3. SQL> create table t05304_a ( a  number encrypt  using '3des168' ) ;

  4. Table created.

  5. SQL> insert into t05304_a values (1) ;

  6. 1 row created.

  7. SQL> commit;

  8. Commit complete.

  9. SQL> select  * from t05304_a;

  10.          A
  11. ----------
  12.          1

  13. SQL>
复制代码
打开和关闭主密钥:
  1. SQL> conn / as sysdba
  2. Connected.
  3. SQL> alter system set encryption wallet close identified by "oracle1234";
  4. alter system set encryption wallet close identified by "oracle1234"
  5. *
  6. ERROR at line 1:
  7. ORA-28391: cannot close wallet or HSM, password mismatch


  8. SQL> alter system set encryption wallet close identified by "oracle123";

  9. System altered.

  10. SQL> select  * from v$encryption_wallet;

  11. WRL_TYPE
  12. --------------------
  13. WRL_PARAMETER
  14. --------------------------------------------------------------------------------
  15. STATUS
  16. ------------------
  17. file
  18. /u01/app/oracle/admin/orcl/wallet
  19. CLOSED


  20. SQL> conn hr/oracle_4U
  21. Connected.
  22. SQL> select  * from t05304_a;
  23. select        * from t05304_a
  24.                *
  25. ERROR at line 1:
  26. ORA-28365: wallet is not open


  27. SQL> conn / as sysdba
  28. Connected.
  29. SQL> alter system set encryption wallet open identified by "oracle1234";
  30. alter system set encryption wallet open identified by "oracle1234"
  31. *
  32. ERROR at line 1:
  33. ORA-28353: failed to open wallet


  34. SQL> alter system set encryption wallet open identified by "oracle123";

  35. System altered.

  36. SQL> conn hr/oracle_4U
  37. Connected.
  38. SQL> select  * from t05304_a;

  39.          A
  40. ----------
  41.          1

  42. SQL>

复制代码
双重加密模式:
  1. RMAN> set encryption identified by "oracle456"  ;

  2. executing command: SET encryption
  3. using target database control file instead of recovery catalog

  4. RMAN> backup tag '5TEP_USERS_FULL' tablespace users;

  5. Starting backup at 2018-07-05:20:12:12
  6. allocated channel: ORA_SBT_TAPE_1
  7. channel ORA_SBT_TAPE_1: SID=52 device type=SBT_TAPE
  8. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  9. allocated channel: ORA_SBT_TAPE_2
  10. channel ORA_SBT_TAPE_2: SID=57 device type=SBT_TAPE
  11. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  12. channel ORA_SBT_TAPE_1: starting full datafile backup set
  13. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  14. input datafile file number=00004 name=+DATA/orcl/datafile/users.265.980712241
  15. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-05:20:12:24
  16. RMAN-00571: ===========================================================
  17. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  18. RMAN-00571: ===========================================================
  19. RMAN-03009: failure of backup command on ORA_SBT_TAPE_1 channel at 07/05/2018 20:12:25
  20. ORA-19914: unable to encrypt backup
  21. ORA-28365: wallet is not open

  22. RMAN> backup tag '5TEP_USERS_FULL' tablespace users;

  23. Starting backup at 2018-07-05:20:12:42
  24. using channel ORA_SBT_TAPE_1
  25. using channel ORA_SBT_TAPE_2
  26. channel ORA_SBT_TAPE_1: starting full datafile backup set
  27. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  28. input datafile file number=00004 name=+DATA/orcl/datafile/users.265.980712241
  29. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-05:20:12:42
  30. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-07-05:20:13:47
  31. piece handle=45t78v9q_1_1 tag=5TEP_USERS_FULL comment=API Version 2.0,MMS Version 10.3.0.2
  32. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:01:05
  33. Finished backup at 2018-07-05:20:13:47

  34. Starting Control File and SPFILE Autobackup at 2018-07-05:20:13:48
  35. piece handle=c-1359978017-20180705-01 comment=API Version 2.0,MMS Version 10.3.0.2
  36. Finished Control File and SPFILE Autobackup at 2018-07-05:20:14:23

  37. RMAN>
复制代码

用口令解密:
  1. [oracle@station86 wallet]$ rman target /

  2. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jul 5 20:18:19 2018

  3. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  4. connected to target database: ORCL (DBID=1359978017)

  5. RMAN> restore datafile 4;

  6. Starting restore at 2018-07-05:20:18:25
  7. using target database control file instead of recovery catalog
  8. allocated channel: ORA_DISK_1
  9. channel ORA_DISK_1: SID=143 device type=DISK
  10. allocated channel: ORA_DISK_2
  11. channel ORA_DISK_2: SID=52 device type=DISK
  12. allocated channel: ORA_DISK_3
  13. channel ORA_DISK_3: SID=10 device type=DISK
  14. allocated channel: ORA_DISK_4
  15. channel ORA_DISK_4: SID=53 device type=DISK
  16. allocated channel: ORA_DISK_5
  17. channel ORA_DISK_5: SID=103 device type=DISK
  18. allocated channel: ORA_DISK_6
  19. channel ORA_DISK_6: SID=56 device type=DISK
  20. allocated channel: ORA_DISK_7
  21. channel ORA_DISK_7: SID=102 device type=DISK
  22. allocated channel: ORA_DISK_8
  23. channel ORA_DISK_8: SID=141 device type=DISK
  24. allocated channel: ORA_SBT_TAPE_1
  25. channel ORA_SBT_TAPE_1: SID=11 device type=SBT_TAPE
  26. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  27. allocated channel: ORA_SBT_TAPE_2
  28. channel ORA_SBT_TAPE_2: SID=100 device type=SBT_TAPE
  29. channel ORA_SBT_TAPE_2: Oracle Secure Backup

  30. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  31. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  32. channel ORA_SBT_TAPE_1: restoring datafile 00004 to +DATA/orcl/datafile/users.265.980712241
  33. channel ORA_SBT_TAPE_1: reading from backup piece 45t78v9q_1_1
  34. RMAN-00571: ===========================================================
  35. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  36. RMAN-00571: ===========================================================
  37. RMAN-03002: failure of restore command at 07/05/2018 20:19:24
  38. ORA-19870: error while restoring backup piece 45t78v9q_1_1
  39. ORA-19913: unable to decrypt backup
  40. ORA-28365: wallet is not open

  41. RMAN> set decryption identified by "java123","microsoft123","redhat123","oracle123","oracle456";

  42. executing command: SET decryption

  43. RMAN> restore datafile 4;

  44. Starting restore at 2018-07-05:20:21:11
  45. using channel ORA_DISK_1
  46. using channel ORA_DISK_2
  47. using channel ORA_DISK_3
  48. using channel ORA_DISK_4
  49. using channel ORA_DISK_5
  50. using channel ORA_DISK_6
  51. using channel ORA_DISK_7
  52. using channel ORA_DISK_8
  53. using channel ORA_SBT_TAPE_1
  54. using channel ORA_SBT_TAPE_2

  55. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  56. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  57. channel ORA_SBT_TAPE_1: restoring datafile 00004 to +DATA/orcl/datafile/users.265.980712241
  58. channel ORA_SBT_TAPE_1: reading from backup piece 45t78v9q_1_1
  59. channel ORA_SBT_TAPE_1: piece handle=45t78v9q_1_1 tag=5TEP_USERS_FULL
  60. channel ORA_SBT_TAPE_1: restored backup piece 1
  61. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:41
  62. Finished restore at 2018-07-05:20:21:53

  63. RMAN> recover datafile 4;

  64. Starting recover at 2018-07-05:20:22:32
  65. using channel ORA_DISK_1
  66. using channel ORA_DISK_2
  67. using channel ORA_DISK_3
  68. using channel ORA_DISK_4
  69. using channel ORA_DISK_5
  70. using channel ORA_DISK_6
  71. using channel ORA_DISK_7
  72. using channel ORA_DISK_8
  73. using channel ORA_SBT_TAPE_1
  74. using channel ORA_SBT_TAPE_2

  75. starting media recovery

  76. archived log for thread 1 with sequence 59 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_59.313.980713007
  77. archived log for thread 1 with sequence 60 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_60.346.980713009
  78. archived log for thread 1 with sequence 61 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_61.342.980713009
  79. archived log for thread 1 with sequence 62 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_62.353.980713013
  80. archived log for thread 1 with sequence 63 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_63.258.980713015
  81. archived log for thread 1 with sequence 64 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_64.267.980713015
  82. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_59.313.980713007 thread=1 sequence=59
  83. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_60.346.980713009 thread=1 sequence=60
  84. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_61.342.980713009 thread=1 sequence=61
  85. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_62.353.980713013 thread=1 sequence=62
  86. media recovery complete, elapsed time: 00:00:01
  87. Finished recover at 2018-07-05:20:22:34

  88. RMAN> sql "alter tablespace users online";

  89. sql statement: alter tablespace users online

复制代码

或者用TDE解密:
  1. [oracle@station86 wallet]$ rman target /

  2. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jul 5 20:28:01 2018

  3. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  4. connected to target database: ORCL (DBID=1359978017)

  5. RMAN> restore datafile 4;

  6. Starting restore at 2018-07-05:20:28:07
  7. using target database control file instead of recovery catalog
  8. allocated channel: ORA_DISK_1
  9. channel ORA_DISK_1: SID=56 device type=DISK
  10. allocated channel: ORA_DISK_2
  11. channel ORA_DISK_2: SID=100 device type=DISK
  12. allocated channel: ORA_DISK_3
  13. channel ORA_DISK_3: SID=52 device type=DISK
  14. allocated channel: ORA_DISK_4
  15. channel ORA_DISK_4: SID=103 device type=DISK
  16. allocated channel: ORA_DISK_5
  17. channel ORA_DISK_5: SID=141 device type=DISK
  18. allocated channel: ORA_DISK_6
  19. channel ORA_DISK_6: SID=12 device type=DISK
  20. allocated channel: ORA_DISK_7
  21. channel ORA_DISK_7: SID=57 device type=DISK
  22. allocated channel: ORA_DISK_8
  23. channel ORA_DISK_8: SID=102 device type=DISK
  24. allocated channel: ORA_SBT_TAPE_1
  25. channel ORA_SBT_TAPE_1: SID=143 device type=SBT_TAPE
  26. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  27. allocated channel: ORA_SBT_TAPE_2
  28. channel ORA_SBT_TAPE_2: SID=11 device type=SBT_TAPE
  29. channel ORA_SBT_TAPE_2: Oracle Secure Backup

  30. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  31. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  32. channel ORA_SBT_TAPE_1: restoring datafile 00004 to +DATA/orcl/datafile/users.265.980713303
  33. channel ORA_SBT_TAPE_1: reading from backup piece 45t78v9q_1_1
  34. channel ORA_SBT_TAPE_1: piece handle=45t78v9q_1_1 tag=5TEP_USERS_FULL
  35. channel ORA_SBT_TAPE_1: restored backup piece 1
  36. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:55
  37. Finished restore at 2018-07-05:20:29:16

  38. RMAN> recover datafile 4;

  39. Starting recover at 2018-07-05:20:29:22
  40. using channel ORA_DISK_1
  41. using channel ORA_DISK_2
  42. using channel ORA_DISK_3
  43. using channel ORA_DISK_4
  44. using channel ORA_DISK_5
  45. using channel ORA_DISK_6
  46. using channel ORA_DISK_7
  47. using channel ORA_DISK_8
  48. using channel ORA_SBT_TAPE_1
  49. using channel ORA_SBT_TAPE_2

  50. starting media recovery

  51. archived log for thread 1 with sequence 59 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_59.313.980713007
  52. archived log for thread 1 with sequence 60 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_60.346.980713009
  53. archived log for thread 1 with sequence 61 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_61.342.980713009
  54. archived log for thread 1 with sequence 62 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_62.353.980713013
  55. archived log for thread 1 with sequence 63 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_63.258.980713015
  56. archived log for thread 1 with sequence 64 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_64.267.980713015
  57. archived log for thread 1 with sequence 65 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_65.354.980713601
  58. archived log for thread 1 with sequence 66 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_66.338.980713603
  59. archived log for thread 1 with sequence 67 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_67.330.980713605
  60. archived log for thread 1 with sequence 68 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_68.355.980713607
  61. archived log for thread 1 with sequence 69 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_69.286.980713611
  62. archived log for thread 1 with sequence 70 is already on disk as file +FRA/orcl/archivelog/2018_07_05/thread_1_seq_70.257.980713611
  63. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_59.313.980713007 thread=1 sequence=59
  64. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_60.346.980713009 thread=1 sequence=60
  65. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_61.342.980713009 thread=1 sequence=61
  66. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_62.353.980713013 thread=1 sequence=62
  67. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_63.258.980713015 thread=1 sequence=63
  68. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_64.267.980713015 thread=1 sequence=64
  69. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_65.354.980713601 thread=1 sequence=65
  70. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_66.338.980713603 thread=1 sequence=66
  71. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_67.330.980713605 thread=1 sequence=67
  72. archived log file name=+FRA/orcl/archivelog/2018_07_05/thread_1_seq_68.355.980713607 thread=1 sequence=68
  73. media recovery complete, elapsed time: 00:00:02
  74. Finished recover at 2018-07-05:20:29:25

  75. RMAN> sql "alter tablespace users online";

  76. sql statement: alter tablespace users online

  77. RMAN>
复制代码

改主密钥:
a.png


关于cumulative:
  1. RMAN> backup tag '6TE_USERS_INCR0' incremental level 0 tablespace users;

  2. Starting backup at 2018-07-05:21:14:29
  3. released channel: ORA_DISK_1
  4. released channel: ORA_DISK_2
  5. released channel: ORA_DISK_3
  6. released channel: ORA_DISK_4
  7. released channel: ORA_DISK_5
  8. released channel: ORA_DISK_6
  9. released channel: ORA_DISK_7
  10. released channel: ORA_DISK_8
  11. using channel ORA_SBT_TAPE_1
  12. using channel ORA_SBT_TAPE_2
  13. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  14. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  15. input datafile file number=00004 name=+DATA/orcl/datafile/users.265.980714801
  16. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-05:21:14:29
  17. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-07-05:21:15:24
  18. piece handle=49t792tl_1_1 tag=6TE_USERS_INCR0 comment=API Version 2.0,MMS Version 10.3.0.2
  19. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:55
  20. Finished backup at 2018-07-05:21:15:24

  21. Starting Control File and SPFILE Autobackup at 2018-07-05:21:15:24
  22. piece handle=c-1359978017-20180705-04 comment=API Version 2.0,MMS Version 10.3.0.2
  23. Finished Control File and SPFILE Autobackup at 2018-07-05:21:16:09

  24. RMAN>

  25. RMAN>

  26. RMAN> backup tag '7TE_USERS_INCR1' incremental level 1 tablespace users;

  27. Starting backup at 2018-07-05:21:16:28
  28. using channel ORA_SBT_TAPE_1
  29. using channel ORA_SBT_TAPE_2
  30. channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set
  31. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  32. input datafile file number=00004 name=+DATA/orcl/datafile/users.265.980714801
  33. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-05:21:16:28
  34. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-07-05:21:17:03
  35. piece handle=4bt7931c_1_1 tag=7TE_USERS_INCR1 comment=API Version 2.0,MMS Version 10.3.0.2
  36. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:35
  37. Finished backup at 2018-07-05:21:17:03

  38. Starting Control File and SPFILE Autobackup at 2018-07-05:21:17:03
  39. piece handle=c-1359978017-20180705-05 comment=API Version 2.0,MMS Version 10.3.0.2
  40. Finished Control File and SPFILE Autobackup at 2018-07-05:21:17:48

  41. RMAN> report need backup  incremental  1;

  42. Report of files that need more than 1 incrementals during recovery
  43. File Incrementals Name
  44. ---- ------------ ----------------------------------------------

  45. RMAN> report need backup  incremental  0;

  46. Report of files that need more than 0 incrementals during recovery
  47. File Incrementals Name
  48. ---- ------------ ----------------------------------------------
  49. 4    1            +DATA/orcl/datafile/users.265.980714801

  50. RMAN> report need backup  incremental  1;

  51. Report of files that need more than 1 incrementals during recovery
  52. File Incrementals Name
  53. ---- ------------ ----------------------------------------------

  54. RMAN> backup tag '8TE_USERS_INCR1' incremental level 1 tablespace users;

  55. Starting backup at 2018-07-05:21:19:21
  56. using channel ORA_SBT_TAPE_1
  57. using channel ORA_SBT_TAPE_2
  58. channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set
  59. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  60. input datafile file number=00004 name=+DATA/orcl/datafile/users.265.980714801
  61. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-05:21:19:21
  62. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-07-05:21:19:56
  63. piece handle=4dt7936p_1_1 tag=8TE_USERS_INCR1 comment=API Version 2.0,MMS Version 10.3.0.2
  64. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:35
  65. Finished backup at 2018-07-05:21:19:56

  66. Starting Control File and SPFILE Autobackup at 2018-07-05:21:19:56
  67. piece handle=c-1359978017-20180705-06 comment=API Version 2.0,MMS Version 10.3.0.2
  68. Finished Control File and SPFILE Autobackup at 2018-07-05:21:20:31

  69. RMAN> report need backup  incremental  1;

  70. Report of files that need more than 1 incrementals during recovery
  71. File Incrementals Name
  72. ---- ------------ ----------------------------------------------
  73. 4    2            +DATA/orcl/datafile/users.265.980714801

  74. RMAN> backup tag '9TE_USERS_INCR1' incremental level 1 cumulative tablespace users;

  75. Starting backup at 2018-07-05:21:22:39
  76. using channel ORA_SBT_TAPE_1
  77. using channel ORA_SBT_TAPE_2
  78. channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set
  79. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  80. input datafile file number=00004 name=+DATA/orcl/datafile/users.265.980714801
  81. channel ORA_SBT_TAPE_1: starting piece 1 at 2018-07-05:21:22:39
  82. channel ORA_SBT_TAPE_1: finished piece 1 at 2018-07-05:21:23:24
  83. piece handle=4ft793cv_1_1 tag=9TE_USERS_INCR1 comment=API Version 2.0,MMS Version 10.3.0.2
  84. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:45
  85. Finished backup at 2018-07-05:21:23:24

  86. Starting Control File and SPFILE Autobackup at 2018-07-05:21:23:25
  87. piece handle=c-1359978017-20180705-07 comment=API Version 2.0,MMS Version 10.3.0.2
  88. Finished Control File and SPFILE Autobackup at 2018-07-05:21:24:00

  89. RMAN> report need backup  incremental  1;

  90. Report of files that need more than 1 incrementals during recovery
  91. File Incrementals Name
  92. ---- ------------ ----------------------------------------------

  93. RMAN> report need backup  incremental  0;

  94. Report of files that need more than 0 incrementals during recovery
  95. File Incrementals Name
  96. ---- ------------ ----------------------------------------------
  97. 4    1            +DATA/orcl/datafile/users.265.980714801

  98. RMAN>

复制代码

块跟踪:
  1. SQL> alter database enable block change tracking using file '+FRA';

  2. Database altered.

  3. SQL> select  * from v$block_change_tracking;

  4. STATUS           FILENAME                                                                                                                          BYTES
  5. ---------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------
  6. ENABLED    +FRA/orcl/changetracking/ctf.358.980717365                                                                                               11599872

  7. SQL>
  8. SQL>
复制代码








回复

使用道具 举报

2

主题

13

帖子

108

积分

注册会员

Rank: 2

积分
108
发表于 2018-7-7 08:58:38 | 显示全部楼层
老师实验0和实验1a的备份是全库备份吗?
回复 支持 反对

使用道具 举报

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
 楼主| 发表于 2018-7-7 16:39:15 | 显示全部楼层
chenmd 发表于 2018-7-7 08:58
老师实验0和实验1a的备份是全库备份吗?

实验0的是手工全库冷备份。
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-24 21:21 , Processed in 0.042000 second(s), 28 queries .

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