asm数据文件迁移(os–>asm)
--添加测试表空间SQL> create tablespace xff datafile '/u01/oradata/xifenfei.dbf' size 10m autoextend on maxsize 100m;Tablespace created.--查看数据文件位置SQL> select name from v$datafile;NAME--------------------------------------------------------------------------------+DATA/tasm/system01.dbf+DATA/tasm/undotbs01.dbf+DATA/tasm/sysaux01.dbf+DATA/tasm/users01.dbf+DATA/tasm/example01.dbf/u01/oradata/xifenfei.dbf6 rows selected.--创建测试表SQL> create table hr.a tablespace xff 2 as 3 select * from dba_tables;Table created.SQL> select count(*) from hr.a; COUNT(*)---------- 1580--转移数据文件位置[oracle@localhost oradata]$ rman target /Recovery Manager: Release 10.2.0.3.0 - Production on Mon Jun 27 04:30:22 2011Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: TASM (DBID=3032096031)RMAN> sql 'alter tablespace xff offline';using target database control file instead of recovery catalogsql statement: alter tablespace xff offlineRMAN> backup as copy tablespace xff format '+DATA';Starting backup at 27-JUN-11allocated channel: ORA_DISK_1channel ORA_DISK_1: sid=132 devtype=DISKchannel ORA_DISK_1: starting datafile copyinput datafile fno=00006 name=/u01/oradata/xifenfei.dbfoutput filename=+DATA/tasm/datafile/xff.269.754893121 tag=TAG20110627T043200 recid=2 stamp=754893123channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03Finished backup at 27-JUN-11RMAN> switch tablespace xff to copy;datafile 6 switched to datafile copy "+DATA/tasm/datafile/xff.269.754893121"RMAN> sql 'alter tablespace xff online';sql statement: alter tablespace xff online--查看转移后的数据文件位置SQL> select name from v$datafile;NAME--------------------------------------------------------------------------------+DATA/tasm/system01.dbf+DATA/tasm/undotbs01.dbf+DATA/tasm/sysaux01.dbf+DATA/tasm/users01.dbf+DATA/tasm/example01.dbf+DATA/tasm/datafile/xff.269.7548931216 rows selected.--测试其中数据是否存在SQL> select count(*) from hr.a; COUNT(*)---------- 1580--创建asm中文件别名ASMCMD> mkalias +DATA/tasm/datafile/xff.269.754893121 +DATA/tasm/xff01.dbf--文件重命名SQL> alter tablespace xff offline;Tablespace altered.SQL> alter database rename file '+DATA/tasm/datafile/xff.269.754893121' to '+DATA/tasm/xff01.dbf';Database altered.SQL> alter tablespace xff online;Tablespace altered.SQL> select name from v$datafile;NAME--------------------------------------------------------------------------------+DATA/tasm/system01.dbf+DATA/tasm/undotbs01.dbf+DATA/tasm/sysaux01.dbf+DATA/tasm/users01.dbf+DATA/tasm/example01.dbf+DATA/tasm/xff01.dbf6 rows selected.--手工删除原来数据[oracle@localhost oradata]$ rm xifenfei.dbf |
说明:可以在rman移植数据文件位置的时候,同时处理好别名,然后对表空间重命名,实现只需要表空间离线一次
转:http://www.xifenfei.com/2011/08/%e9%9d%9easm%e6%95%b0%e6%8d%ae%e6%96%87%e4%bb%b6%e7%a7%bb%e6%a4%8d%e5%88%b0asm.html
asm数据文件迁移(os–>asm)的更多相关文章
- Oracle 11g Rac 用rman实现把本地数据文件迁移到ASM共享存储中
在Oracle Rac环境中,数据文件都是要存放在ASM共享存储上的,这样两个节点才能同时访问.而当你在某一节点下把数据文件创建在本地磁盘的时候,那么在另一节点上要访问该数据文件的时候就会报错,因为找 ...
- oracle之 RAC本地数据文件迁移至ASM
系统环境:CentOS release 6.7 (Final)Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit 操作过 ...
- RAC本地数据文件迁移至ASM的方法--非归档模式
系统环境:rhel6.2_x64+Oracle RAC11g 操作过程: 1.非归档模式 SQL> archive log list; Database log mode No Archive ...
- asm数据文件迁移(asm–>asm)
rman迁移操作 [oracle@localhost oradata]$ rman target / Recovery Manager: Release 10.2.0.3.0 - Producti ...
- Oracle 10g DG 数据文件迁移
背景:某客户Oracle 10g 的DG由于空间不足,之前将部分数据文件迁移到其他目录,如今原目录扩容成功,要将之前迁移的数据文件再次迁移回来. 环境:Oracle 10.2.0.5 DG 单机 首先 ...
- Oracle 数据文件迁移
背景 这两天做一个oracle数据库迁移,以前都是用exp.imp来走,这次用到了expdp.impdp,的确有些优势,但同时又想起了只是拷贝数据文件迁移的方式,其实这个方式不常用做迁移,更多用在磁盘 ...
- oracle数据文件迁移
这篇文章是从网络上获取的,然后根据内容一步步操作, 1.目前的疑问:移动日志文件的时候,为何要先进行切换? 2.move操作后,再进行rename操作的原理 --------------------- ...
- Oracle数据文件迁移到裸设备
本文主要描述如何将Oracle表空间的文件系统形式的数据文件迁移到LV裸设备上. 前提条件 1.oracle运行正常. 2.已使用LVM命令规划好LV文件.如/dev/vgoracle/lvdatat ...
- SqlServer:SqlServer(数据库备份,数据文件迁移,增加数据库文件组,递归查询一周报送情况,查询近X天未报送单位,截断数据库日志,复制单个或多个数据库表到另一个数据库 )
1.数据备份 ) ) ) )),'-','') ) SET @savePath = 'f:/DatabaseBackup/' DECLARE My_Cursor CURSOR FOR ( select ...
随机推荐
- ubuntu修改root密码
1.我们在安装系统的时候我们会把系统的密码设置的比较简单,所以导致后面我们别人很容易操作我们的电脑.所以,我们就可以修改密码,你只要在系统上输入: sudo passwd root
- XML文档的创建
右键项目,添加,新建项,XML文件 XML文件的第一行有一个标题,标题描述了这个XML文件的版本和编码 XML文件必须有根节点且只能有一个根节点,如<Books></Books> ...
- Erlang:Error in process ... with exit value
=ERROR REPORT==== 10-Apr-2015::16:30:04 ===Error in process <0.218.0> with exit value: {badarg ...
- $digest already in progress 解决办法——续
什么时候手动调用$apply()方法? 如果AngularJS总是将我们的代码wrap到一个function中并传入$apply(),以此来开始一轮$digest循环,那么什么时候才需要我们手动地调用 ...
- 小程序公用js提取到app.js中调用的实例
index.wxml: <view "> <text>{{page}}</text> </view> <view "> ...
- linux physical and virtual addressing modes
example 1: 特理地址和虚拟地址一致 Physical addressing mode requires no page tables and the CPU does not attempt ...
- jquery组件和插件写法
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name ...
- 浅谈:当程序员的N多好处,逆袭高富师
选择一份职业,除了要要分析有没有钱途外(为什么要选择 IT 行业,IT 业有多火爆你造吗?),还要平衡其他方面的利弊.有很多想进入这个行业的小伙伴问我,程序员到底有什么好处.看样子这是很多小伙伴关心的 ...
- 配置ssh互信的一个小问题记录
在我们安装集群软件时,经常需要配置机器之间的互信,每个人也有一套自己熟悉的方法. 但是在今天配置互信过程中,发现操作过程还是一样,但是就是不能互信,通过查找资料解决了,做一下记录. 我经常使用的方式: ...
- echarts折线图个性化填充、线条、拐点样式
由于每组数据的拐点样式.线条颜色都不一样,所以series里的每组数据都需要单独设置样式. 首先先来看一下完成后的效果吧 具体设置如下 series: [ { name:systemName[0], ...