oracle - 如何在oracle中恢复丢失的包
问题描述
我已经放弃了我项目的一个重要包(不由自主地)我现在想恢复它。请问你能帮我吗?
这是我试图做的:
RESTAURE PACKAGE package_name;
我与 oracle sql 开发人员一起工作
解决方案
没有restore package
命令。如果您丢弃了软件包,您可能需要从源代码控制系统中取回它。
如果你足够幸运,你可以运行闪回查询来查看源代码。假设你在不到 20 分钟前放弃了它(否则调整你闪回的时间戳)
select type, line, text
from all_source as of timestamp systimestamp - interval '20' minute
where owner = <<schema owner>>
and name = <<name of package>>
and type in ('PACKAGE', 'PACKAGE BODY')
order by type, line;
Oracleundo
会在有限的时间段内保留执行闪回查询所需的数据。如果您放弃软件包的时间太长,Oracle 可能无法向您展示代码的样子。
推荐阅读
- c# - 如何在 xamarin.ios 本机应用程序中的前台应用程序时获得推送/远程通知?
- teamcity - 删除 TeamCity 构建日志
- hibernate - 在哪里可以找到 Hibernate 的终止支持 - 支持生命周期 - 更新
- powershell - Powershell - 鼠标左键单击而不移动鼠标
- javascript - 使用 async/await 组合并发和顺序请求
- java - RxAndroid:如何从电话簿中提取所有联系人?
- maven - 如何在 Maven 中仅运行选择性测试用例
- javascript - 算术运算的右侧必须是“any”、“number”或枚举类型
- oracle - 如何使用间隔 1 分钟在两个日期之间将时间序列数据生成到 Oracle PL/SQL 中的表中?
- json - 尝试解析 Teradata 中的 JSON 键,但查询失败