首先要开归档,因为是热备份
设置表空间为只读
SQL> alter tablespace exec read only;
SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
SYSAUX ONLINE
TEMPTS ONLINE
TOOLS ONLINE
EXEC READ ONLY
QIANYI ONLINE
UNDO_SMALL2 ONLINE
TEMPTS2 ONLINE
GOLDENGATE ONLINE
TBS_GGUSER ONLINE
只读状态下备份报错,因为它对数据文件加不上锁
SQL> alter tablespace exec begin backup;
alter tablespace exec begin backup
*
ERROR at line 1:
ORA-01642: begin backup not needed for read only tablespace ‘EXEC‘
数据文件的scn号不一致了:
SQL> select file#,checkpoint_change# from v$datafile;
FILE# CHECKPOINT_CHANGE#
---------- ------------------
1 2831387
2 2831387
3 2831387
4 2831387
5 2834548
6 2831387
7 2831387
8 2831387
将表空间设置生读写模式:
SQL> alter tablespace EXEC read write;
原文地址:http://6205351.blog.51cto.com/6195351/1530607