Bonjour,
Comment comprenez-vous le passage suivant :
Si on fait des image copy, on n'a pas besoin de restore, le recover suffirait ??The RESTORE command is required with all backups made from the BACKUP command to create backups. [...] If using the BACKUP AS COPY command, the RESTORE command is not required.![]()
et le fichier, il arrive comment sur disque ????
Et les tests me confirment qu'il faut bien faire un restore puis un recover...
Alors, j'ai compris de travers ? ou c'est une coquille dans le bouqin ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 RMAN> list backup of tablespace toto; RMAN> list copy of tablespace toto; List of Datafile Copies Key File S Completion Time Ckp SCN Ckp Time Name ------- ---- - --------------- ---------- --------------- ---- 5 6 A 06-DEC-07 3680092666 06-DEC-07 /flash/TEST10G/data_D-/TEST10G_I-858532074_TS-TOTO_FNO-6_08j2tf0d SYS@TEST10g > create table scott.test_rman tablespace toto as select * from dba_objects where RowNum < 100; Table created. SYS@TEST10g > commit; Commit complete. SYS@TEST10g > select file_name from dba_data_files where Tablespace_name = 'TOTO'; FILE_NAME -------------------------------------------------------------------------------- /db/TEST10g/toto.dbf SYS@TEST10g > !rm /db/TEST10g/toto.dbf SYS@TEST10g > alter system checkpoint; System altered. SYS@TEST10g > alter system switch logfile; System altered. SYS@TEST10g > delete from scott.test_rman; delete from scott.test_rman * ERROR at line 1: ORA-00376: file 6 cannot be read at this time ORA-01110: data file 6: '/db/TEST10g/toto.dbf' RMAN> restore tablespace toto; Starting restore at 06-DEC-07 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=140 devtype=DISK channel ORA_DISK_1: restoring datafile 00006 input datafile copy recid=5 stamp=640597005 filename=/flash/TEST10g/data_D-TEST10G_I-858532074_TS-TOTO_FNO-6_08j2tf0d destination for restore of datafile 00006: /db/TEST10g/toto.dbf channel ORA_DISK_1: copied datafile copy of datafile 00006 output filename=/db/TEST10g/toto.dbf recid=6 stamp=640597406 Finished restore at 06-DEC-07 RMAN> recover tablespace toto; Starting recover at 06-DEC-07 using channel ORA_DISK_1 starting media recovery media recovery complete, elapsed time: 00:00:02 Finished recover at 06-DEC-07 RMAN> exit Recovery Manager complete. SYS@TEST10g > alter tablespace toto online; Tablespace altered. SYS@TEST10g > select count(*) from scott.test_rman; COUNT(*) ---------- 99 SYS@TEST10g > update scott.test_rman set object_name = lower(object_name); 99 rows updated. SYS@TEST10g > commit; Commit complete. SYS@TEST10g > alter tablespace toto begin backup; Tablespace altered. SYS@TEST10g > select file_name, status from dba_data_files where Tablespace_name ='TOTO'; FILE_NAME -------------------------------------------------------------------------------- STATUS --------- /db/TEST10g/toto.dbf AVAILABLE SYS@TEST10g > !ls -l /db/TEST10g/toto.dbf /db/TEST10g/toto.dbf: No such file or directory SYS@TEST10g > alter tablespace toto end backup; Tablespace altered. SYS@TEST10g > alter system checkpoint; System altered. SYS@TEST10g > truncate table scott.test_rman; truncate table scott.test_rman * ERROR at line 1: ORA-00376: file 6 cannot be read at this time ORA-01110: data file 6: '/db/TEST10g/toto.dbf' RMAN> list copy of tablespace toto; using target database control file instead of recovery catalog List of Datafile Copies Key File S Completion Time Ckp SCN Ckp Time Name ------- ---- - --------------- ---------- --------------- ---- 5 6 A 06-DEC-07 3680092666 06-DEC-07 /flash/TEST10g/data_D-TEST10G_I-858532074_TS-TOTO_FNO-6_08j2tf0d RMAN> list backup of tablespace toto; RMAN> recover tablespace toto; Starting recover at 06-DEC-07 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=142 devtype=DISK RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 12/06/2007 07:55:06 RMAN-06094: datafile 6 must be restored
Leo.
Partager