How to override gt;2499 character error in Oracle DB?(如何覆盖 Oracle DB 中的 gt;2499 字符错误?)
问题描述
我有一个通过 shell 脚本执行的 Oracle 查询,因为我的查询超出了 2499 的最大长度.
I have a Oracle query which I'm executing through shell script and in that my query is getting exceeded the maximum length of 2499.
我收到错误
SP2-0027:输入太长(> 2499 个字符)- 行被忽略
SP2-0027: INPUT IS TOO LONG(> 2499 CHARACTERS) - LINE IGNORED
推荐答案
以下是解决 SQL*Plus 行长度限制的一些选项:
Here are some options for working around SQL*Plus line length limitations:
- 升级到 12.2(?) 客户端. 在 12.2 上,客户端最多允许 4999 个字符.这在某种程度上令人气愤——如果甲骨文最终承认 2499 不够,他们为什么只将限制增加到 4999?
- 添加换行符. 将结果拆分为多行.如果使用 Windows,请确保同时使用回车和换行符 -
chr(13)||chr(10). - 使用其他程序.许多程序都有类似 SQL*Plus 的选项.一般来说,我建议不要使用 SQL*Plus 克隆.SQL*Plus 的主要优点是它是一个简单的工具,而且在任何地方的工作方式都差不多.没有一个 SQL*Plus 克隆是完全兼容的,如果您在克隆上运行 SQL*Plus 脚本,许多程序将会中断.
- Upgrade to 12.2(?) client. On 12.2 the client allows up to 4999 characters. Which is infuriating in a way - if Oracle finally admits that 2499 is not enough, why did they only increase the limit to 4999?
- Add line breaks. Split the results into multiple lines. If using Windows make sure to use both carriage return and newline -
chr(13)||chr(10). - Use another program. Many programs have a SQL*Plus-like option. In general I recommend not using a SQL*Plus clone. The main advantage of SQL*Plus is that it's a simple tool and works just about the same everywhere. None of the SQL*Plus clones are fully compatible and many programs will break if you run SQL*Plus scripts on a clone.
这篇关于如何覆盖 Oracle DB 中的 >2499 字符错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何覆盖 Oracle DB 中的 >2499 字符错误?
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- SQL 临时表问题 2022-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 更改自动增量起始编号? 2021-01-01
