我有使用 Oracle 数据库的 java web 应用程序。 Web 应用程序使用 hibernate 。 我有 2 个 oracle 实例 - 第一个在服务器中,第二个在本地虚拟 linux 机器中。
当我在某个时候连接到本地 oracle 实例时,我得到了
ORA-01792: maximum number of columns in a table or view is 1000
异常。但是当我连接到 oracle(在服务器中)时,不会出现该异常。我正在做完全相同的操作并且转储是相同的。所以我认为甲骨文的问题。 也许某些配置不同。
谁能告诉我导致这种情况的 oracle 服务器之间的差异是什么?
更新。来自堆栈跟踪的一些部分
Caused by: org.hibernate.exception.SQLGrammarException: could not initialize a collection:
Caused by: java.sql.SQLSyntaxErrorException: ORA-01792: maximum number of columns in a table or view is 1000
最佳答案
ORA-01792: maximum number of columns in a table or view is 1000
此限制不仅适用于表和 View ,还适用于临时内联 View 和临时内部内存Oracle 在执行子查询时创建的表。
例如,
Oracle 基于merge select 创建了一个临时内联 View ,因此对这个临时内联 View 实现了同样的限制。因此,您需要确保子选择 或子查询 中的列数也不超过1000 的限制。
Caused by: org.hibernate.exception.SQLGrammarException: could not initialize a collection:
上述错误表明您正在尝试创建一个集合,它超出了允许的列数限制,即总列数超过了1000 。
关于java - ORA-01792 : maximum number of columns in a table or view is 1000,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31557258/