[toc]

tde rman 测试

ORACLE 12.1.0.2 TDE rman 功能测试

rman 不压缩备份测试

rman 不压缩备份测试

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
RMAN> BACKUP DATABASE FORMAT '/oradata/tdecdb/backup/0318/bak_%U';

Starting backup at 2022-03-18 09:03:38
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=206 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/oradata/tdecdb/sys/sysaux01.dbf
input datafile file number=00001 name=/oradata/tdecdb/sys/system01.dbf
input datafile file number=00004 name=/oradata/tdecdb/undo/undotbs01.dbf
input datafile file number=00006 name=/oradata/tdecdb/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:03:39
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:04:04
piece handle=/oradata/tdecdb/backup/0318/bak_1c0omgfb_1_1 tag=TAG20220318T090339 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00060 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_sysaux_k15x87vb_.dbf
input datafile file number=00059 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_system_k15x87v3_.dbf
input datafile file number=00063 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_tdetbs_k34t95d6_.dbf
input datafile file number=00062 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_pttbs_k34t7zm1_.dbf
input datafile file number=00061 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_test_tde_k18b3y43_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:04:04
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:04:11
piece handle=/oradata/tdecdb/backup/0318/bak_1d0omgg4_1_1 tag=TAG20220318T090339 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00011 name=/oradata/tdecdb/data/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_sysaux_k15zvlmn_.dbf
input datafile file number=00010 name=/oradata/tdecdb/data/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_system_k15zvlmh_.dbf
input datafile file number=00015 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpvbp5_.dbf
input datafile file number=00016 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpxvfo_.dbf
input datafile file number=00017 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpyohb_.dbf
input datafile file number=00014 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigfie_t_k1vpcznp_.dbf
input datafile file number=00013 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_put_tbs_k1vp39l0_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:04:11
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:04:18
piece handle=/oradata/tdecdb/backup/0318/bak_1e0omggb_1_1 tag=TAG20220318T090339 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00055 name=/oradata/tdecdb/data/TDECDB/DA4CB73192371EFAE0530418000AE013/datafile/o1_mf_sysaux_k32gtl45_.dbf
input datafile file number=00054 name=/oradata/tdecdb/data/TDECDB/DA4CB73192371EFAE0530418000AE013/datafile/o1_mf_system_k32gtl3p_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:04:18
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:04:25
piece handle=/oradata/tdecdb/backup/0318/bak_1f0omggi_1_1 tag=TAG20220318T090339 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/oradata/tdecdb/sys/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/oradata/tdecdb/sys/pdbseed/system01.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:04:25
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:04:32
piece handle=/oradata/tdecdb/backup/0318/bak_1g0omggp_1_1 tag=TAG20220318T090339 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 2022-03-18 09:04:32

Starting Control File and SPFILE Autobackup at 2022-03-18 09:04:32
piece handle=/u01/app/oracle/fast_recovery_area/TDECDB/autobackup/2022_03_18/o1_mf_s_1099645472_k37po13v_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2022-03-18 09:04:33

RMAN> exit


Recovery Manager complete.
[oracle@tcloud_for_12c_tdecdb:/oradata/tdecdb/backup/0318]$ ll

rman 不压缩恢复测试

总结

不压缩备份的时候,钱包关闭打开的情况都可以备份。

rman 压缩备份测试

钱包关闭 rman 压缩测试

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
RMAN>  backup as compressed backupset full database format '/oradata/tdecdb/backup/0318/full_bk1_%u%p%s.rmn';

Starting backup at 2022-03-18 09:06:06
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=12 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/oradata/tdecdb/sys/sysaux01.dbf
input datafile file number=00001 name=/oradata/tdecdb/sys/system01.dbf
input datafile file number=00004 name=/oradata/tdecdb/undo/undotbs01.dbf
input datafile file number=00006 name=/oradata/tdecdb/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:06:06
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:07:01
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1i0omgju150.rmn tag=TAG20220318T090606 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00060 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_sysaux_k15x87vb_.dbf
input datafile file number=00059 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_system_k15x87v3_.dbf
input datafile file number=00063 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_tdetbs_k34t95d6_.dbf
input datafile file number=00062 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_pttbs_k34t7zm1_.dbf
input datafile file number=00061 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_test_tde_k18b3y43_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:07:01
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/18/2022 09:07:02
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00011 name=/oradata/tdecdb/data/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_sysaux_k15zvlmn_.dbf
input datafile file number=00010 name=/oradata/tdecdb/data/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_system_k15zvlmh_.dbf
input datafile file number=00015 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpvbp5_.dbf
input datafile file number=00016 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpxvfo_.dbf
input datafile file number=00017 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpyohb_.dbf
input datafile file number=00014 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigfie_t_k1vpcznp_.dbf
input datafile file number=00013 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_put_tbs_k1vp39l0_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:07:03
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/18/2022 09:07:04
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00055 name=/oradata/tdecdb/data/TDECDB/DA4CB73192371EFAE0530418000AE013/datafile/o1_mf_sysaux_k32gtl45_.dbf
input datafile file number=00054 name=/oradata/tdecdb/data/TDECDB/DA4CB73192371EFAE0530418000AE013/datafile/o1_mf_system_k32gtl3p_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:07:04
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:07:29
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1l0omglo153.rmn tag=TAG20220318T090606 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/oradata/tdecdb/sys/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/oradata/tdecdb/sys/pdbseed/system01.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:07:29
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:07:54
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1m0omgmh154.rmn tag=TAG20220318T090606 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/18/2022 09:07:02
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/18/2022 09:07:04
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open

RMAN> exit


Recovery Manager complete.
[oracle@tcloud_for_12c_tdecdb:/oradata/tdecdb/backup/0318]$ s

SQL*Plus: Release 12.1.0.2.0 Production on Fri Mar 18 09:08:43 2022

Copyright (c) 1982, 2014, Oracle. All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


Session altered.

sys@(594_CDB$ROOT)> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY Password23;

keystore altered.

sys@(594_CDB$ROOT)>
sys@(594_CDB$ROOT)>
sys@(594_CDB$ROOT)>
sys@(594_CDB$ROOT)> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@tcloud_for_12c_tdecdb:/oradata/tdecdb/backup/0318]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Fri Mar 18 09:09:32 2022

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

connected to target database: TDECDB (DBID=1299067025)

RMAN> backup as compressed backupset full database format '/oradata/tdecdb/backup/0318/full_bk1_%u%p%s.rmn2b';

Starting backup at 2022-03-18 09:09:47
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=405 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/oradata/tdecdb/sys/sysaux01.dbf
input datafile file number=00001 name=/oradata/tdecdb/sys/system01.dbf
input datafile file number=00004 name=/oradata/tdecdb/undo/undotbs01.dbf
input datafile file number=00006 name=/oradata/tdecdb/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:09:47
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:10:42
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1n0omgqr155.rmn2b tag=TAG20220318T090947 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00060 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_sysaux_k15x87vb_.dbf
input datafile file number=00059 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_system_k15x87v3_.dbf
input datafile file number=00063 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_tdetbs_k34t95d6_.dbf
input datafile file number=00062 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_pttbs_k34t7zm1_.dbf
input datafile file number=00061 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_test_tde_k18b3y43_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:10:43
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:11:08
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1o0omgsi156.rmn2b tag=TAG20220318T090947 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00011 name=/oradata/tdecdb/data/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_sysaux_k15zvlmn_.dbf
input datafile file number=00010 name=/oradata/tdecdb/data/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_system_k15zvlmh_.dbf
input datafile file number=00015 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpvbp5_.dbf
input datafile file number=00016 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpxvfo_.dbf
input datafile file number=00017 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpyohb_.dbf
input datafile file number=00014 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigfie_t_k1vpcznp_.dbf
input datafile file number=00013 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_put_tbs_k1vp39l0_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:11:08
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/18/2022 09:11:09
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00055 name=/oradata/tdecdb/data/TDECDB/DA4CB73192371EFAE0530418000AE013/datafile/o1_mf_sysaux_k32gtl45_.dbf
input datafile file number=00054 name=/oradata/tdecdb/data/TDECDB/DA4CB73192371EFAE0530418000AE013/datafile/o1_mf_system_k32gtl3p_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:11:09
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:11:34
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1q0omgtd158.rmn2b tag=TAG20220318T090947 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/oradata/tdecdb/sys/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/oradata/tdecdb/sys/pdbseed/system01.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:11:34
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:11:59
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1r0omgu6159.rmn2b tag=TAG20220318T090947 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/18/2022 09:11:09
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open

钱包打开 rman 压缩测试

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
RMAN> backup as compressed backupset full database format '/oradata/tdecdb/backup/0318/full_bk1_%u%p%s.open';

Starting backup at 2022-03-18 09:26:55
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=11 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=/oradata/tdecdb/sys/sysaux01.dbf
input datafile file number=00001 name=/oradata/tdecdb/sys/system01.dbf
input datafile file number=00004 name=/oradata/tdecdb/undo/undotbs01.dbf
input datafile file number=00006 name=/oradata/tdecdb/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:26:56
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:27:51
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1s0omhr0160.open tag=TAG20220318T092656 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00060 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_sysaux_k15x87vb_.dbf
input datafile file number=00059 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_system_k15x87v3_.dbf
input datafile file number=00063 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_tdetbs_k34t95d6_.dbf
input datafile file number=00062 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_pttbs_k34t7zm1_.dbf
input datafile file number=00061 name=/oradata/tdecdb/data/TDECDB/D87EC3294E251264E0530418000A849E/datafile/o1_mf_test_tde_k18b3y43_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:27:51
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:28:16
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1t0omhsn161.open tag=TAG20220318T092656 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00011 name=/oradata/tdecdb/data/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_sysaux_k15zvlmn_.dbf
input datafile file number=00010 name=/oradata/tdecdb/data/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_system_k15zvlmh_.dbf
input datafile file number=00015 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpvbp5_.dbf
input datafile file number=00016 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpxvfo_.dbf
input datafile file number=00017 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigf_tbs_k1vpyohb_.dbf
input datafile file number=00014 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_bigfie_t_k1vpcznp_.dbf
input datafile file number=00013 name=/tmp/TDECDB/D87F6220B46B36BCE0530418000A94A3/datafile/o1_mf_put_tbs_k1vp39l0_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:28:16
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:28:41
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1u0omhtg162.open tag=TAG20220318T092656 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00055 name=/oradata/tdecdb/data/TDECDB/DA4CB73192371EFAE0530418000AE013/datafile/o1_mf_sysaux_k32gtl45_.dbf
input datafile file number=00054 name=/oradata/tdecdb/data/TDECDB/DA4CB73192371EFAE0530418000AE013/datafile/o1_mf_system_k32gtl3p_.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:28:41
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:29:06
piece handle=/oradata/tdecdb/backup/0318/full_bk1_1v0omhu9163.open tag=TAG20220318T092656 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/oradata/tdecdb/sys/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/oradata/tdecdb/sys/pdbseed/system01.dbf
channel ORA_DISK_1: starting piece 1 at 2022-03-18 09:29:06
channel ORA_DISK_1: finished piece 1 at 2022-03-18 09:29:31
piece handle=/oradata/tdecdb/backup/0318/full_bk1_200omhv2164.open tag=TAG20220318T092656 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 2022-03-18 09:29:31

Starting Control File and SPFILE Autobackup at 2022-03-18 09:29:31
piece handle=/u01/app/oracle/fast_recovery_area/TDECDB/autobackup/2022_03_18/o1_mf_s_1099646971_k37r3vtd_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2022-03-18 09:29:32

总结

压缩备份的时候,需要钱包都打开,cdb和pdb都需要打开,否则为打开钱包的db无法进行备份。也就是压缩备份的时候,rman 会对tde加密数据进行解密,然后再进行压缩。

rman 恢复

1、目标库启用 tde

使用root 创建单独的目录,权限授予给 oracle 用户。

1
2
mkdir -p /etc/ORACLE/WALLETS/tdecdb
chown -R oracle:oinstall /etc/ORACLE/WALLETS/tdecdb
1.1、编辑 sqlnet.ora

编辑 $ORACLE_HOME/network/admin/sqlnet.ora 新增 ENCRYPTION_WALLET_LOCATION 配置

1
2
3
4
5
6
7
vi /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/sqlnet.ora

ENCRYPTION_WALLET_LOCATION=
(SOURCE=
(METHOD=FILE)
(METHOD_DATA=
(DIRECTORY=/etc/ORACLE/WALLETS/tdecdb)))
1.2、将源库的key 复制到目标库
1
2
cd /etc/ORACLE/WALLETS/tdecdb/
scp ewallet.p12 oracle@目标ip:/etc/ORACLE/WALLETS/tdecdb
1.3、启用 Software Keystore

启动数据库到nomount状态,然后启用 Software Keystore

1
2
SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY Password23;
keystore altered.

2、复制备份文件到目标环境

1
2
scp *.open  oracle@101.33.229.100:/oradata/tdecdb/backup/0318/
scp /u01/app/oracle/fast_recovery_area/TDECDB/autobackup/2022_03_18/o1_mf_s_1099646971_k37r3vtd_.bkp oracle@101.33.229.100:/oradata/tdecdb/backup/0318/

3、恢复参数文件

1
2
3
4
5
6
7
8
9
10
RMAN>  restore spfile from '/u01/app/oracle/fast_recovery_area/TDECDB/autobackup/2022_03_18/o1_mf_s_1099646971_k37r3vtd_.bkp';

Starting restore at 2022-03-19 22:01:08
using channel ORA_DISK_1

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/app/oracle/fast_recovery_area/TDECDB/autobackup/2022_03_18/o1_mf_s_1099646971_k37r3vtd_.bkp
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 2022-03-19 22:01:10

RMAN> exit

4、恢复控制文件

1
2
3
4
5
6
7
8
9
10
11
12
RMAN> RESTORE CONTROLFILE FROM '/u01/app/oracle/fast_recovery_area/TDECDB/autobackup/2022_03_18/o1_mf_s_1099646971_k37r3vtd_.bkp';

Starting restore at 2022-03-19 22:04:49
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=398 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/oradata/tdecdb/sys/control01.ctl
output file name=/oradata/tdecdb/redo/control02.ctl
Finished restore at 2022-03-19 22:04:51

5、启动数据库到mount 状态

1
alter database mout

6、restore database;

1
RMAN> restore database;

7、recover database

1
RMAN> recover database

tde rman 恢复总结

rman 恢复的时候,需要将源库的密钥复制奥目标库,配置 sqlnet.ora ,然后启用Software Keystore,即可。

0、复制源库的密钥到目标库的tde 钱包路径

1
2
cd /etc/ORACLE/WALLETS/tdecdb/
scp ewallet.p12 oracle@目标ip:/etc/ORACLE/WALLETS/tdecdb

1、配置 sqlnet.ora

编辑 $ORACLE_HOME/network/admin/sqlnet.ora 新增 ENCRYPTION_WALLET_LOCATION 配置

1
2
3
4
5
6
7
vi /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/sqlnet.ora

ENCRYPTION_WALLET_LOCATION=
(SOURCE=
(METHOD=FILE)
(METHOD_DATA=
(DIRECTORY=/etc/ORACLE/WALLETS/tdecdb)))

2、启用 Software Keystore

1
ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY Password23;

剩下的操作跟常规rman 恢复相同。

原文作者: liups.com

原文链接: http://liups.cn/posts/b5442567/

许可协议: 知识共享署名-非商业性使用 4.0 国际许可协议