Oracle迁移数据文件从文件系统至裸设备
来源:互联网 发布:秋冬护肤推荐 知乎 编辑:程序博客网 时间:2024/06/06 02:03
实施将文件系统上的数据文件移至裸设备上:
进入sqlplus命令行:
$ sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.6.0 - Production on Thu Aug 19 19:52:32 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
offline该表空间:
SQL> alter tablespace BONC offline;
Tablespace altered.
迁移文件系统数据文件至裸设备:
$ rman target /
Recovery Manager: Release 9.2.0.6.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: HIUBI (DBID=2363790514)
RMAN> copy datafile 108 to '/dev/rv06_4_back007';
Starting copy at 19-AUG-10
using channel ORA_DISK_1
channel ORA_DISK_1: copied datafile 108
output filename=/dev/rv06_4_back007 recid=7 stamp=727473123
Finished copy at 19-AUG-10
重命名数据文件:
SQL> alter tablespace BONC
2 rename datafile '/arrayubi/oracle/product/9.2.0/dbs/D:ORACLEPRODUCT10.2.0ORADATAORCLbonc.dbf'
3 to '/dev/rv06_4_back007';
online该表空间并修改为read write:
SQL> alter tablespace BONC online;
Tablespace altered.
SQL> alter tablespace BONC read write;
Tablespace altered.
查验:
SQL> set linesize 120
SQL> col file_name for a30
SQL> select file_id,file_name,tablespace_name,bytes/1024/1024 M,status from dba_data_files where tablespace_name='BONC';
FILE_ID FILE_NAME TABLESPACE_NAME M STATUS
---------- ------------------------------ ------------------------------ ---------- ---------
108 /dev/rv06_4_back007 BONC 2460 AVAILABLE
最后将原文件系统上的数据文件rm掉即可。
其实在遇到此类问题时,解决问题的思路还是比较简单的,有如下4步:
1、 使表空间离线
2、 使用rman的copy命令进行操作
3、 退出rman进入sqlplus命令行,对表空间数据文件进行重命名
4、 在线表空间并置为可读可写状态
- Oracle迁移数据文件从文件系统至裸设备
- Oracle迁移数据文件从文件系统至裸…
- 将表空间、数据文件从文件系统迁移到ASM
- 将表空间、数据文件从ASM迁移到文件系统
- oracle迁移数据文件方法
- ORACLE 如何迁移数据文件
- Oracle数据文件迁移
- oracle-数据文件迁移
- oracle迁移数据文件位置
- [转载]oracle数据文件迁移
- oracle迁移数据文件
- ORACLE 数据文件迁移
- 迁移oracle数据文件
- 为ORACLE添加数据文件(裸设备)
- Oracle数据文件位置迁移笔记
- 如何迁移Oracle的数据文件
- Oracle数据文件迁移知多少?
- Oracle数据文件位置重建迁移
- "Dependencies conflict "
- Switching between Views with a UISegmentedControl 转
- Switching Views with a UISegmentedControl - Revisited 转
- 对于剪切板的一些操作
- GCC 命令行详解
- Oracle迁移数据文件从文件系统至裸设备
- lib和dll文件的区别和联系
- SELECT 语句中“加锁选项”的功能说明
- 菜鸟学Linux:Ubuntu删除多余启动项(2011.03.28)
- Apache错误:[error] (OS 10038)在一个非套接字上尝试了一个操作
- UNIX 网络编程 卷一:套接字联网API(第3版) 读书笔记(5) 第五章 TCP客户/服务器程序示例
- 数据库应用中并发控制若干实现途径
- MetaProgram(元编程)初探
- 离职