将表添加到实体框架模型会导致 RPC“参数过多”错误

发布于 2024-12-13 00:32:19 字数 475 浏览 2 评论 0原文

当从设计器更新 EDMX 模型以在大型数据库上添加表时,输出窗口中会返回错误:

由于以下异常而无法生成模型:“An 执行命令定义时发生错误。看内在 详细信息除外。

传入的表格数据流(TDS)远程过程调用(RPC) 协议流不正确。中提供了太多参数 这个 RPC 请求。最大值为 2100。'。从加载元数据 数据库时间为 00:00:04.5149496。生成模型需要 00:00:14.0108568。无法生成模型,因为 以下异常:'执行命令时发生错误 定义。有关详细信息,请参阅内部异常。

传入的表格数据流(TDS)远程过程调用(RPC) 协议流不正确。此处提供的参数太多 RPC 请求。最大值为 2100。'。从加载元数据 数据库时间为 00:00:04.2847682。生成模型需要 00:00:06.1297751。

如何解决/解决这个问题?

When updating an EDMX model from the designer to add tables on a large database, an error is returned in the output window:

Unable to generate the model because of the following exception: 'An
error occurred while executing the command definition. See the inner
exception for details.

The incoming tabular data stream (TDS) remote procedure call (RPC)
protocol stream is incorrect. Too many parameters were provided in
this RPC request. The maximum is 2100. '. Loading metadata from the
database took 00:00:04.5149496. Generating the model took
00:00:14.0108568. Unable to generate the model because of the
following exception: 'An error occurred while executing the command
definition. See the inner exception for details.

The incoming tabular data stream (TDS) remote procedure call (RPC)
protocol stream incorrect. Too many parameters were provided in this
RPC request. The maximum is 2100. '. Loading metadata from the
database took 00:00:04.2847682. Generating the model took
00:00:06.1297751.

How can this problem be worked around/resolved?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

染年凉城似染瑾 2024-12-20 00:32:19

根据 Microsoft 支持人员的说法,这是设计者区分模型中已有表列表和数据库中表列表的设计限制的结果。

有三个主要选项可以解决该问题:

  1. 创建一个数据库用户,该用户有权仅查看模型所需的表。

    此选项的缺点是维护模型时必须维护用户的权限(例如,对于添加到模型中的每个表,必须授予“模型维护用户”查看该表的权限)(注意,在更改连接配置中的用户,可能需要退出设计器和/或 VS 才能生效)

  2. 将 EDMX 拆分为多个较小的模型

    在某些情况下,这可以提高大型模型的性能,但必须仔细选择边界,以避免从跨模型的表中进行选择时出现问题。

  3. 从模型中删除表

    通常,这只是模型中已存在上下文不必要的表的一个选项。

According to Microsoft support, this is the result of a design limitation in how the designer differences the list of tables already in the model and the list of tables in the database.

There are three main options to work around the problem:

  1. Create a database user which has permission to see only the tables that are necessary for the model.

    The disadvantages of this option are that the user's rights must be maintained the model is maintained (e.g., for each table added to the model, the "model maintenance user" must be granted rights to see the table) (note, after changing user in connectionconfiguration, may be necessary to exit designer and/or VS for it to take effect)

  2. Split the EDMX into multiple, smaller models

    This can improve performance in some cases on large models, but the boundaries must be selected carefully to avoid problems with selecting from tables across models.

  3. Remove tables from the model

    Generally, this is only an option of there are contextually unnecessary tables already in the model.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文