ORACLE 存储过程表数据被覆盖还原

旧的存储过程覆盖了新的存储过程,导致以前做的功能全部为零了,于是恢复一下存储过程,步骤:
用sys用户SYSDBA权限登陆PL/SQL,
忘记sys密码需要到修改


C:\Users\zhouxq>sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on 星期一 4月 15 11:47:59 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

SQL> connect /as sysdba
已连接。
SQL> alter user sys identified by upay1234;

用户已更改。



登陆过后


select * from dba_source
AS OF TIMESTAMP TO_TIMESTAMP('2013-4-15 09:10:00', 'YYYY-MM-DD HH24:MI:SS') where owner = 'UPAY' and line >1590


表数据恢复
首先要删掉表里面的数据,然后执行
insert into s_module (mod_id,mod_name,mod_parent_id,mod_addr,mod_icon,mod_max_auth,mod_level) 
select * from s_module  as of timestamp to_timestamp('2013-04-15 09:20:00', 'yyyy-mm-dd hh24:mi:ss');




猜你喜欢

转载自abcdedf.iteye.com/blog/1847492