Databases Reference
In-Depth Information
8 250 PDB1:SYSTEM *** +DATA/cdb1/c4bd35d102b92f07e04380a8840a6a44/datafile/
system.274.788546943
9 530 PDB1:SYSAUX *** +DATA/cdb1/c4bd35d102b92f07e04380a8840a6a44/datafile/
sysaux.275.788546943
10 5 PDB1:USERS *** +DATA/cdb1/c4bd35d102b92f07e04380a8840a6a44/datafile/
users.277.788546967
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 532 TEMP 32767 +DATA/cdb1/tempfile/temp.269.788546767
2 20 PDB$SEED:TEMP 32767 +DATA/cdb1/c40f9b49fc9c19e0e0430baae80aff01/tempfile/
temp.272.788546809
3 20 PDB1:TEMP 32767 +DATA/cdb1/c4bd35d102b92f07e04380a8840a6a44/tempfile/
temp.276.788546957
Note how data file 6 is in the fast recovery area. You want to move it to its original location.
2.
Remove the file at the OS level from the original location, if present. The file is unused,
so it can be removed without any effect on the database. Since this is in ASM, we can use
the ASMCMD command:
ASMCMD> cd +DATA/cdb1/datafile
ASMCMD> rm USERS.259.788546719
3.
Connect to RMAN:
$ rman target=/
4.
Create an image copy of the file, in this case file 6. Place that image copy in the file's
original location:
RMAN> backup as copy datafile 6 format='+DATA';
Starting backup at 02-AUG-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=+FRA/cdb1/datafile/users.352.790293385
output file name=+DATA/cdb1/datafile/users.259.790295525 tag=TAG20120802T223203
RECID=12 STAMP=790295524
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 02-AUG-12
5.
Take the data file offline:
RMAN> sql 'alter database datafile 6 offline';
sql statement: alter database datafile 6 offline
In Oracle 12.1 and above you don't need to use the “sql” prefix. You can give the alter
database command directly from the RMAN prompt.
Search WWH ::




Custom Search