学习oracle技术,每天学一点,每天进步一点

FROM ASM Migrating to FILE SYSTEM Using RMAN(三)

上一篇 / 下一篇  2008-07-07 16:29:00 / 个人分类:数据库高可用性

 有时候我们从文件系统迁移到了ASM存储后 因为某些原因,需要重新用回到文件系统

 以下步骤就是操作方法:

[oracle@localhost orcl]$sqlplus / as sysdba
4G:dng4Q2yO i0SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 7 12:45:36 2008

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

ITPUB个人空间 vJ%FN @ D(yt
Connected to:ITPUB个人空间&@#H1fpA
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
xb2|!Nz~!p0With the Partitioning, OLAP and Data Mining options

SQL> alter system set db_create_file_dest='' scope=spfile;

System altered.


3l^5S2~B0SQL> alter system set db_create_online_log_dest_1='' scope=spfile;

System altered.

SQL>  alter system set db_create_online_log_dest_2='' scope=spfile;

System altered.

 

SQL> alter system set control_files='/oracle/oradata/orcl/control01.ctl' scope=spfile;

System altered.

SQL> shutdown
I:m(lpOUH I}}0Database closed.ITPUB个人空间(GP,z-P/Wc8|d x#y(s
Database dismounted.

[oracle@localhost orcl]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jul 7 12:56:17 2008

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

connected to target database (not started)

RMAN> startup nomount;

Oracle instance started

Total System Global Area     167772160 bytes

Fixed Size                     1218316 bytes
?|Y'@ r u0Variable Size                 62916852 bytes
fS5V s+||8x9R0Database Buffers             100663296 bytesITPUB个人空间2dCzr_
Redo Buffers                   2973696 bytes

RMAN> restore controlfile from '+DISKGROUP/orcl/control01.ctl' ;

Starting restore at 07-JUL-08ITPUB个人空间T3OVnc_R
using target database control file instead of recovery catalog
0h(meC(g"D0allocated channel: ORA_DISK_1ITPUB个人空间S@})Q~?!hx
channel ORA_DISK_1: sid=156 devtype=DISK

channel ORA_DISK_1: copied control file copy
.g2t_(Z'O0output filename=/oracle/oradata/orcl/control01.ctlITPUB个人空间$v8CK0`8gq;C
Finished restore at 07-JUL-08

RMAN> alter database mount;

database mountedITPUB个人空间poc7Hi6q kn
released channel: ORA_DISK_1
nTW_J0RMAN> copy datafile '+DISKGROUP/orcl/datafile/system.256.659448231' to '/oracle/oradata/orcl/system01.dbf';

Starting backup at 07-JUL-08
e_N,F W+XqL0allocated channel: ORA_DISK_1
;\aaO?k;q {:y0channel ORA_DISK_1: sid=156 devtype=DISK
dG yrd p wQ[9]0channel ORA_DISK_1: starting datafile copy
-p*L)jtVAw0input datafile fno=00001 name=+DISKGROUP/orcl/datafile/system.256.659448231
csWx2ml\0output filename=/oracle/oradata/orcl/system01.dbf tag=TAG20080707T125746 recid=15 stamp=659451492
1y:L,v)zR4x9^#b$V0channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35ITPUB个人空间0a5e%W(nF b.I:C){&tn%d
Finished backup at 07-JUL-08

RMAN> copy datafile '+DISKGROUP/orcl/datafile/undotbs1.262.659448267' to '/oracle/oradata/orcl/undotbs1.dbf';

Starting backup at 07-JUL-08
On-k9Vh$XG;t}w0using channel ORA_DISK_1
7eV-jpk7o0channel ORA_DISK_1: starting datafile copyITPUB个人空间 [yysn7i9|/G
input datafile fno=00002 name=+DISKGROUP/orcl/datafile/undotbs1.262.659448267ITPUB个人空间)_,VZ8S7^+U
output filename=/oracle/oradata/orcl/undotbs1.dbf tag=TAG20080707T125852 recid=16 stamp=659451551
L Qm^3ih h0channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
8?i2|/ujx5R}4g0Finished backup at 07-JUL-08

RMAN> copy datafile '+DISKGROUP/orcl/datafile/sysaux.269.659448291' to '/oracle/oradata/orcl/sysaux01.dbf';

Starting backup at 07-JUL-08ITPUB个人空间#nlY/L!rl$p
using channel ORA_DISK_1ITPUB个人空间"|8a0aWIA5@3}+N
channel ORA_DISK_1: starting datafile copy
_*i1Ew1nd"YY0w#V0input datafile fno=00003 name=+DISKGROUP/orcl/datafile/sysaux.269.659448291ITPUB个人空间 R}K|w?X9Ky
output filename=/oracle/oradata/orcl/sysaux01.dbf tag=TAG20080707T125929 recid=17 stamp=659451577
XH3V C.CB o k#LRJ0channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15ITPUB个人空间;t#q1k`q$N AnD([]Rp
Finished backup at 07-JUL-08

RMAN> copy datafile '+DISKGROUP/orcl/datafile/users.268.659448307' to '/oracle/oradata/orcl/users01.dbf';

Starting backup at 07-JUL-08
gTg Dwmmc]0using channel ORA_DISK_1
S L\/mH{#W `0channel ORA_DISK_1: starting datafile copyITPUB个人空间vJ;n%@ y~q3s
input datafile fno=00004 name=+DISKGROUP/orcl/datafile/users.268.659448307
3cX/gR'j/H:`#[L y0output filename=/oracle/oradata/orcl/users01.dbf tag=TAG20080707T130002 recid=18 stamp=659451606
T'ECKT4Z-hEh3O0channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:05
P3X@&p/| q'KU8s-|0Finished backup at 07-JUL-08


J7wj#RO_ i0RMAN> switch datafile 1 to copy;

datafile 1 switched to datafile copy "/oracle/oradata/orcl/system01.dbf"

RMAN> switch datafile 2 to copy;

datafile 2 switched to datafile copy "/oracle/oradata/orcl/undotbs1.dbf"

RMAN> switch datafile 3 to copy;

datafile 3 switched to datafile copy "/oracle/oradata/orcl/sysaux01.dbf"

RMAN> switch datafile 4 to copy;

datafile 4 switched to datafile copy "/oracle/oradata/orcl/users01.dbf"

RMAN> alter database open;

database opened

SQL> alter tablespace temp add tempfile '/oracle/oradata/orcl/temp01.dbf' size 100M;

Tablespace altered.

SQL> alter tablespace temp drop tempfile '+DISKGROUP/orcl/tempfile/temp.260.659448493';

Tablespace altered.

SQL> alter database add logfile group 1 '/oracle/oradata/orcl/redo01.log' size 20M;

Database altered.

SQL>  alter database add logfile group 2 '/oracle/oradata/orcl/redo02.log' size 20M;

Database altered.

SQL>  alter database add logfile group 3 '/oracle/oradata/orcl/redo03.log' size 20M;

Database altered.ITPUB个人空间ES;[| {3| rk,Aj*\
SQL> alter system switch logfile;

System altered.ITPUB个人空间[yg_qw;c+AD_;l
sql>/

System altered.

SQL> alter system switch logfile;

System altered.

SQL>  alter database drop logfile group 4;

Database altered.

SQL>  alter database drop logfile group 5;

Database altered.ITPUB个人空间jOp{I5?
SQL>  alter database drop logfile group 6;

Database altered.

  SQL> select member from v$logfile;

MEMBERITPUB个人空间Z0CFYp.PZ9J
--------------------------------------------------------------------------------ITPUB个人空间 tOM(_KlR8^.tR
/oracle/oradata/orcl/redo01.logITPUB个人空间8xfV9| e7R:Jw2n
/oracle/oradata/orcl/redo02.log
3}Bjg'J@;rtA2T0/oracle/oradata/orcl/redo03.log

SQL> select name from v$datafile;

NAME
|r ZQ.P9k0--------------------------------------------------------------------------------
I;q:WZ Thu5R$`%S'b`L0/oracle/oradata/orcl/system01.dbf
0GIH `&y&ge:Bb0/oracle/oradata/orcl/undotbs1.dbf
tOXV&[-t2q `0/oracle/oradata/orcl/sysaux01.dbf
ay3[$j*D;cX0/oracle/oradata/orcl/users01.dbf

SQL> select name from v$tempfile;

NAMEITPUB个人空间R_7D9|.TN k:`7T$?V+nH
--------------------------------------------------------------------------------
FD&y/l.~J1b~r9E3_du0/oracle/oradata/orcl/temp01.dbf

SQL> select name from v$controlfile;

NAMEITPUB个人空间5fvC(za.u
--------------------------------------------------------------------------------
!`c gd6~0GT0/oracle/oradata/orcl/control01.ctl

ITPUB个人空间G5w^&R Y&U
 


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-08-30  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 15402
  • 日志数: 276
  • 图片数: 2
  • 建立时间: 2007-12-11
  • 更新时间: 2008-08-29

RSS订阅

Open Toolbar