刚接手一个库发现RMAN和EXP均无法正常备份,由于这个库没有任何容灾机制和备份策略,所致修复这个备份故障变得很重要,备份重于一切啊,最起码能在出现故障的时候
不至于心慌。
故障现象:
EXP
EXP-00056: ORACLE error 1116 encountered
ORA-01116: error in opening database file 4
ORA-01110: data file 4: '/u01/app/oracle/oradata/qm_erp/QMERPDATA01.dbf'
ORA-27092: size of file exceeds file size limit of the process
Additional information: 8191
Additional information: 665345
RMAN
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema
List of Permanent Datafiles
===========================
File Size(MB) TablespaceRB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 0SYSTEM ***/u01/app/oracle/oradata/qm_erp/system01.dbf
20UNDOTBS ***/u01/app/oracle/oradata/qm_erp/undotbs01.dbf
30SYSAUX***/u01/app/oracle/oradata/qm_erp/sysaux01.dbf
4 0QMERPDATA ***/u01/app/oracle/oradata/qm_erp/QMERPDATA01.dbf
数据文件状态:
SQL> l
1* select name,status from v$datafile
SQL> /
NAMESTATUS
-------------------------------------------------- -------
/u01/app/oracle/oradata/qm_erp/system01.dbfSYSTEM
/u01/app/oracle/oradata/qm_erp/undotbs01.dbfONLINE
/u01/app/oracle/oradata/qm_erp/sysaux01.dbfONLINE
/u01/app/oracle/oradata/qm_erp/QMERPDATA01.dbfONLINE
/u01/app/oracle/oradata/qm_erp/QMERPDATA02.dbfONLINE
/u01/app/oracle/oradata/qm_erp/USERS01.dbfONLINE.
表空间状态:
SQL> select status,tablespace_name from dba_tablespaces;
STATUSTABLESPACE_NAME
--------- ------------------------------
ONLINESYSTEM
ONLINEUNDOTBS
ONLINESYSAUX
ONLINETEMP
ONLINEQMERPDATA
ONLINEUSERS
ONLINETEMP1
数据文件SCN状态:
SQL> l
1select distinct b.TABLESPACE_NAME,
2 a.CHECKPOINT_CHANGE#,b.CHECKPOINT_CHANGE#
3from v$datafile a,v$datafile_header b
4* where a.TS#=b.TS#
SQL> /
TABLESPACE_NAME CHECKPOINT_CHANGE# CHECKPOINT_CHANGE#
--------------- ------------------ ------------------
QMERPDATA141129030141129030
SYSAUX141129030141129030
SYSTEM141129030141129030
UNDOTBS 141129030141129030
USERS141129030141129030
手工触发checkpoint SCN会向前推动,后台日志没有报错,所以判断DB的对外服务基本没问题,这就奇了个怪了!由于这台机器上有两个实例,另外一个是测试库,都有相同现象,所以先从测试库开刀,把实例关闭进行冷备,结果报:
[oracle@ERP-2 ~]$ cp ./expdat.dmp /tmp/
File size limit exceeded
重于发现一点线索了,有可能是因为操作系统做了用户权限的限制,导致无法操作超出限制尺寸的文件。
[oracle@ERP-2 tmp]$ ulimit -f
65535
[oracle@ERP-2 tmp]$ dd if=/dev/zero of=./a.dat bs=1M count=63
63+0 records in
63+0 records out
66060288 bytes (66 MB) copied, 0.173722 seconds, 380 MB/s
[oracle@ERP-2 tmp]$ dd if=/dev/zero of=./a.dat bs=1M count=64
File size limit exceeded
先把这个问题修复下。
[oracle@ERP-2 root]$ ulimit -f
99999999
再用RMAN和EXP,已经可以使用了,由于这台机器配置较高,所以有些参数的设置还是要计算下的。
[@more@]