Exception: Too many parameters were provided in this RPC request. The maximum

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Exception: Too many parameters were provided in this RPC request. The maximum相关的知识,希望对你有一定的参考价值。

Exception: Too many parameters were provided in this RPC request. The maximum is 2100.

 

[Microsoft][SQL Native Client][SQL Server]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.


SQL语句的报错

如果是SELECT查询OR条件语句形如:SELECT * FROM tablename WHERE x1 OR x2 OR x3 OR x4 OR ... OR x2101,OR条件个数超过2100就会报错,可以改为UNION ALL。

如果是SELECT查询IN条件语句形如: SELECT * FROM tablename WHERE columnname IN (1,2,3,4,5, ........ , 2101 ),IN参数个数超过2100,会报上面的错误。可以创建临时表,将这些数据写入临时表,再关联。

--Create new table
Create Table temp (myvalues uniqueidentifier)

-- Join new table with your table
SELECT t1.*
FROM tablename t1
JOIN temp t2 ON t1.myvalues = t2.myvalues

存储过程和函数的报错

对于存储过程和函数,参数最大个数为2100

https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server

以上是关于Exception: Too many parameters were provided in this RPC request. The maximum的主要内容,如果未能解决你的问题,请参考以下文章

nested exception is java.lang.IllegalStateException: Method has too many Body parameters问题解决

nested exception is java.lang.IllegalStateException: Method has too many Body parameters问题解决

java.io.IOException: Too many open files

SqlAlchemy “Too many connections”

如何利用线程池解决调用第三接口出现 429 too many requests问题?

如何处理 R0915: Too many statements (69/50) (too-many-statements) in pylint?