简体   繁体   English

在Oracle中部署plsql软件包

[英]Deployment of plsql packages in oracle

I'm looking to learn about possible ways of deploying large number of plsql packages as dependencies seem to be quite a problem. 我正在寻找有关部署大量plsql软件包的可能方法,因为依赖关系似乎是一个问题。 As it works now, packages are being deployed in several iterations redeploying em again if they couldn't be deployed in previous pass due to missing dependency. 现在可以正常工作,如果由于缺少依赖关系而无法在以前的过程中部署软件包,则将在多个迭代中再次部署em。 I hope to hear about different approaches to the problem and will update my question if u happend to havequestions for me to make it more clear. 我希望听到有关解决该问题的不同方法的信息,如果您碰巧对我有疑问,将使我的问题更加清楚。

Would it even be ok to search guidance this way on SO? 这样在SO上搜索指导是否还可以?

I would recommend to install all specs first in proper order. 我建议先按正确的顺序安装所有规格。 Then install all bodies. 然后安装所有主体。 All dependencies need to be predefined once in master install script. 在主安装脚本中,所有依赖项都需要预先定义一次。

Update: What else you can do is: 更新:您还可以做的是:

1) load all package specs into main list (I assume all specs and bodies are stored separately. if not then it need to be done) 1)将所有包装规格加载到主列表中(我假设所有规格和主体都单独存储。如果没有,则需要完成)

2) loop all specs from the main list. 2)从主列表循环所有规格。

3) try to compile it. 3)尝试编译它。 Add to failed list if it fails. 如果失败,则添加到失败列表。

4) When reach to the end of main list replace all items from it with items from failed list. 4)到达主列表的末尾时,将其中的所有项目替换为失败列表中的项目。

5) Go to step 2. 5)转到步骤2。

At the same time you can save results of the first run and second run could order items according to results of previous call. 同时,您可以保存第一次运行的结果,第二次运行可以根据上次调用的结果订购物料。 This will minimize number of iterations. 这将最大程度地减少迭代次数。

Bodies could be installed in any order... 机构可以以任何顺序安装...

However you need to keep in mind dependencies on the views and from the views - specs could depend on views (view_name%TYPE, cursors and etc) and views depends on package specs (could call package functions). 但是,您需要牢记对视图的依赖以及对视图的依赖-规范可能取决于视图(view_name%TYPE,游标等),而视图取决于程序包规范(可以调用程序包函数)。 This is not trivial problem... Can you explain how it is solved currently please? 这不是小问题...请您能解释一下目前的解决方法吗?

I myself just install all the procedural code (in any order) and later (re)compile all invalid objects. 我本人只是安装所有过程代码(以任何顺序),然​​后再(重新)编译所有无效对象。

There are several way to recompile all invalid objects: 有几种方法可以重新编译所有无效的对象:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM