误删除数据库中的表、数据这个问题已是遇到了不少次了。
失误再说不免,因此才有了DBA存在的意义。最近也是接触了银行业的不少客户,关注了一下数据库权限,开发所拥有的权限真的很大,我想说你要难么大权限,就不怕担责么。对于一家软件公司,一家好的软件公司连本身须要的权限都不清楚真的很无语。可能这就是国内软件公司的现状吧,不吐槽了。数据库
若是遇到了drop table 须要恢复的小伙伴往下看吧。ide
--11g recyclebin参数默认已经打开。 RECYCLEBIN Property Description Parameter type String Syntax RECYCLEBIN = { on | off } Default value on Modifiable ALTER SESSION, ALTER SYSTEM ... DEFERRED Basic No RECYCLEBIN is used to control whether the Flashback Drop capability is turned on or off. If the parameter is set to off, then dropped tables do not go into the recycle bin. If this parameter is set to on, then dropped tables go into the recycle bin and can be recovered.
--小实验 SQL> conn roidba/roidba Connected. SQL> select * from tab; TNAME TABTYPE CLUSTERID ------------------------------ ------- ---------- A4L TABLE A8 TABLE SQL> select count(*) from A8; COUNT(*) ---------- 4233 SQL> drop table A8; Table dropped. SQL> show recyclebin ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROPTIME ---------------- ------------------------------ ------------ ------------------- A8 BIN$YYb+crYDEBbgU9MBqMBDhA==$0 TABLE 2017-1230:11:03:31 SQL> flashback table a8 to before drop; Flashback complete. SQL> select * from tab; TNAME TABTYPE CLUSTERID ------------------------------ ------- ---------- A4L TABLE A8 TABLE SQL> select count(*) from a8; COUNT(*) ---------- 4233 SQL>
小结
一、生产环境必定要打开回收站。
二、开发的权限要尽可能回收。
三、这样的操做让DBA来作,让专业的人作专业的事。
四、这样的问题其实从管理上能够解决的。this