Oracle数据库管理-冷备份迁移释放磁盘空空间

冷备份迁移释放磁盘空空间脚本代码如下:

sqlplus / as sysdba
set lines 200
set pagesize 1000
set long 1000
select file#,name,bytes/1024/1024/1024 from v$datafile where name like ‘%/data/%’;

shutdown immediate;
startup nomount;
rman target /

backup as copy datafile 20 format ‘/data3/orcl00a1.dbf’;
backup as copy datafile 21 format ‘/data3/orcl00a2.dbf’;

switch datafile 20 to copy;
switch datafile 21 to copy;

list copy;
delete copy;

猜你喜欢

转载自blog.csdn.net/oradbm/article/details/108843670