由于 SQL Server 没有包,程序员如何绕过它?

2022-01-13 00:00:00 packages oracle sql-server

我有一个 SQL Server 数据库,其中包含大量存储过程.由于 Oracle 的包"特性,大量存储过程在我的 Oracle 数据库中不是问题.

I have a SQL Server database that has a huge proliferation of stored procedures. Large numbers of stored procedures are not a problem in my Oracle databases because of the Oracle "package" feature.

程序员如何解决缺少像 Oracle 那样的包"功能?

What do programmers do to get around the lack of a "package" feature like that of Oracle?

推荐答案

虽然 SQL Server 没有像你习惯的那样通过封装和包状态的酷特性"提供任何东西,您可以将存储过程组织成模式.

While SQL Server has nothing to offer by way of the "cool features" of encapsulation and package state like you are used to, you can organize your stored procedures into schemas.

在企业管理器中,这些 proc 仍然全部列在一起,如果您有数百个 proc,这将构成一个巨大的树状列表.我也很怀念 Oracle 包的组织和很酷的特性.但是,所有平台都有自己的优势.

In enterprise manager, these procs are still all listed together which makes for a HUGE treelist if you have hundreds of procs. I too miss the organization and cool features of Oracle packages. However, all platforms have their strengths.

注意:用 .NET 语言编写存储过程确实可以提供封装和状态.然而,它仍然没有以任何特殊方式在 EM 树视图中将它们分开.

NOTE: Writing stored procedures in the .NET language DOES give you encapsulation and state. It still does not however separate them in the EM treeview in any special way.

相关文章