获取 Oracle 数据库中所有函数和过程的列表
我正在比较三种 Oracle 模式。
我想获取每个数据库中使用的所有函数和过程的列表。这可以通过查询实现吗? (最好包括一个关于它们是否编译的标志)
理想情况下,最好有一个带有标志的查询,该标志表明函数/过程是否在每个模式中。但即使只是第一步也会比手动检查每个模式更好。
I'm comparing three Oracle schemas.
I want to get a list of all the functions and procedures used in each database. Is this possible via a query? (preferably including a flag as to whether they compile or not)
Ideally it would be great to have a single query with a flag that states whether the function/procedure is in each schema. But even just the first bit would be better than manually inspecting each schema.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
状态列告诉您该对象是有效还是无效。如果无效,则必须尝试重新编译,ORACLE 无法告诉您之前是否有效。
The column STATUS tells you whether the object is VALID or INVALID. If it is invalid, you have to try a recompile, ORACLE can't tell you if it will work before.
对 dba_arguments、dba_errors、dba_procedures、dba_objects、dba_source、dba_object_size 进行描述。
每个都有部分图片,用于查看程序和功能。
此外,包的 dba_objects 中的 object_type 是定义的“PACKAGE”和“PACKAGE BODY”的
身体。
如果您要比较同一数据库上的模式,请尝试:
并切换 ASCHEMA 和 BSCHEMA 的顺序。
如果您还需要查看触发器并比较模式之间的其他内容,您应该查看 关于向 Tom 询问比较架构的文章
Do a describe on dba_arguments, dba_errors, dba_procedures, dba_objects, dba_source, dba_object_size.
Each of these has part of the pictures for looking at the procedures and functions.
Also the object_type in dba_objects for packages is 'PACKAGE' for the definition and 'PACKAGE BODY" for
the body.
If you are comparing schemas on the same database then try:
and switch around the orders of ASCHEMA and BSCHEMA.
If you also need to look at triggers and comparing other stuff between the schemas you should take a look at the Article on Ask Tom about comparing schemas
这里'Schema_name'是模式的名称,例如我有一个名为PMIS的模式,所以示例将是
< img src="https://i.sstatic.net/IXLHE.png" alt="在此处输入图像描述">
参考:https://www.plsql.co/list-all-procedures-from-a-schema-of-oracle -database.html
here 'Schema_name' is a name of schema, example i have a schema named PMIS, so the example will be
Ref: https://www.plsql.co/list-all-procedures-from-a-schema-of-oracle-database.html