设为首页 加入收藏

TOP

Oracle修改数据文件名以及移动数据文件(二)
2017-02-15 08:15:16 】 浏览:802
Tags:Oracle 修改 数据 文件 以及 移动
acle/oradata/orcl/DEV3_svctbl.dbf
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf
/home/oracle/tt_mv.dbf
/home/oracle/undo02.dbf
19 rows selected.
sys@ORCL>alter database open;
alter database open;
Database altered.


2、RMAN备份方式(适用于文件系统、祼设备、ASM)


sys@ORCL>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ORCL>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rhel6 ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Sat Oct 29 21:13:36 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates.? All rights reserved.
connected to target database (not started)
RMAN> startup mount;
Oracle instance started
database mounted
Total System Global Area? ? 784998400 bytes
Fixed Size? ? ? ? ? ? ? ? ? ? 2257352 bytes
Variable Size? ? ? ? ? ? ? ? 478154296 bytes
Database Buffers? ? ? ? ? ? 297795584 bytes
Redo Buffers? ? ? ? ? ? ? ? ? 6791168 bytes
RMAN> backup as copy datafile '/u02/app/oracle/oradata/orcl/users01.dbf' format '/dev/raw/raw1';
Starting backup at 29-OCT-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=133 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u02/app/oracle/oradata/orcl/users01.dbf
output file name=/dev/raw/raw1 tag=TAG20161029T211402 RECID=2 STAMP=926543658
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 29-OCT-16
RMAN> switch datafile '/u02/app/oracle/oradata/orcl/users01.dbf' to copy;
datafile 4 switched to datafile copy "/dev/raw/raw1"
RMAN> alter database open;
database opened
RMAN> exit
Recovery Manager complete.
[oracle@rhel6 ~]$ ss
SQL*Plus: Release 11.2.0.4.0 Production on Sat Oct 29 21:15:03 2016
Copyright (c) 1982, 2013, Oracle.? All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
sys@ORCL>select name from v$datafile;
NAME
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/u02/app/oracle/oradata/orcl/system01.dbf
/u02/app/oracle/oradata/orcl/sysaux01.dbf
/u02/app/oracle/oradata/orcl/undotbs01.dbf
/dev/raw/raw1
/u02/app/oracle/oradata/orcl/DEV_svctbl.dbf
/u02/app/oracle/oradata/orcl/DEV_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV_iau.dbf
/u02/app/oracle/oradata/orcl/DEV_veridata_user.dbf
/u02/app/oracle/oradata/orcl/DEV3_mds.dbf
/u02/app/oracle/oradata/orcl/DEV3_wlsservices.dbf
/u02/app/oracle/oradata/orcl/DEV3_iau.dbf
/u02/app/oracle/oradata/orcl/DEV3_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV3_oggmon.dbf
/u02/app/oracle/oradata/orcl/DEV2_ias_opss.dbf
/u02/app/oracle/oradata/orcl/DEV3_UMS.dbf
/u02/app/oracle/oradata/orcl/DEV3_svctbl.dbf
/u02/app/oracle/oradata/orcl/DEV2_oggmon.dbf
/home/oracle/tt_mv3.dbf
/home/oracle/undo02.dbf
19 rows selected.


二、在线修改


1、表空间OFFLINE方式


sys@ORCL>col file_name for a70
sys@ORCL>select file_name,tablespace_name,status,online_status from dba_data_files;
select file_name,tablespace_name,sta

首页 上一页 1 2 3 4 5 6 下一页 尾页 2/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇MySQL5.6.18解压包版在RHEL6.7上.. 下一篇使用LogMiner分析Oracle的redo日..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目