WINDOWS下的程序员出身,偶尔也写一些linux平台下小程序, 后转行数据库行业,专注于ORACLE和DB2的运维和优化。 同时也是ios移动开发者。欢迎志同道合的朋友一起研究技术。 数据库技术交流群:58308065,23618606
全部博文(599)
分类: Oracle
2009-11-30 21:06:09
[oracle@ASM ~]$ rman target /
Recovery Manager: Release
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: TOASM (DBID=1511021326)
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 480 SYSTEM *** +DGROUP1/toasm/datafile/system.258.683428337
2 25 UNDOTBS1 *** +DGROUP1/toasm/datafile/undotbs1.260.683428483
3 230 SYSAUX *** +DGROUP1/toasm/datafile/sysaux.259.683428421
4 5 USERS *** +DGROUP1/toasm/datafile/users.262.683428489
5 100 EXAMPLE *** +DGROUP1/toasm/datafile/example.261.683428467
6 10 USERS *** /u01/oradata/TOASM/users02.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
2 100 TEMP 32767 +DGROUP1/toasm/tempfile/temp.263.683428909
RMAN> SQL 'ALTER DATABASE DATAFILE 6 OFFLINE';
sql statement: ALTER DATABASE DATAFILE 6 OFFLINE
RMAN> BACKUP AS COPY DATAFILE 6 FORMAT '+DGROUP1';
Starting backup at 06-APR-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=138 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00006 name=/u01/oradata/TOASM/users02.dbf
output filename=+DGROUP1/toasm/datafile/users.265.683431079 tag=TAG20090406T015757 recid=13 stamp=683431080
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 06-APR-09
RMAN> SWITCH DATAFILE 6 TO COPY;
datafile 6 switched to datafile copy "+DGROUP1/toasm/datafile/users.265.683431079"
RMAN> SQL 'ALTER DATABASE DATAFILE 6 ONLINE';
RMAN> RECOVER DATAFILE 6;
Starting recover at 06-APR-09
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 06-APR-09
RMAN> SQL 'ALTER DATABASE DATAFILE 6 ONLINE';
sql statement: ALTER DATABASE DATAFILE 6 ONLINE
RMAN> REPORT SCHEMA;
Report of database schema
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 480 SYSTEM *** +DGROUP1/toasm/datafile/system.258.683428337
2 25 UNDOTBS1 *** +DGROUP1/toasm/datafile/undotbs1.260.683428483
3 230 SYSAUX *** +DGROUP1/toasm/datafile/sysaux.259.683428421
4 5 USERS *** +DGROUP1/toasm/datafile/users.262.683428489
5 100 EXAMPLE *** +DGROUP1/toasm/datafile/example.261.683428467
6 10 USERS *** +DGROUP1/toasm/datafile/users.265.683431079
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
2 100 TEMP 32767 +DGROUP1/toasm/tempfile/temp.263.683428909
RMAN>