Home  >  Article  >  Database  >  误删存储过程

误删存储过程

WBOY
WBOYOriginal
2016-06-07 16:06:291742browse

当存储过程被误删后,使用下面语句找到被删除的存储过程并恢复。需要用sys用户登录。 TIMESTAMP是需要恢复到的时间戳。 SELECT * FROM DBA_SOURCE AS OF TIMESTAMP TO_TIMESTAMP ('2009-03-18 10:07:00', 'YYYY-MM-DD HH24: MI: SS’) WHERE OWNER = 'USER_N

当存储过程被误删后,使用下面语句找到被删除的存储过程并恢复。需要用sys用户登录。
TIMESTAMP是需要恢复到的时间戳。
SELECT *
FROM DBA_SOURCE AS OF TIMESTAMP TO_TIMESTAMP ('2009-03-18 10:07:00', 'YYYY-MM-DD HH24: MI: SS’)
WHERE OWNER = 'USER_NAME'
AND NAME = 'PROCEDURE_NAME'
ORDER BY LINE;

DBA_SOURCE、ALL_SOURCE、USER_SOURCE三个视图中都可以找出。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:表空间Next article:编写自己的JDBC框架