Home > Database > Mysql Tutorial > body text

误删存储过程

WBOY
Release: 2016-06-07 16:06:29
Original
1751 people have browsed it

当存储过程被误删后,使用下面语句找到被删除的存储过程并恢复。需要用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三个视图中都可以找出。

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!