如何覆盖 Oracle DB 中的 >2499 字符错误? [英] How to override >2499 character error in Oracle DB?

查看:32
本文介绍了如何覆盖 Oracle DB 中的 >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:

  1. 升级到 12.2(?) 客户端. 在 12.2 上,客户端最多允许 4999 个字符.这在某种程度上令人气愤——如果甲骨文最终承认 2499 不够,他们为什么只将限制增加到 4999?
  2. 添加换行符. 将结果拆分为多行.如果使用 Windows,请确保同时使用回车和换行符 - chr(13)||chr(10).
  3. 使用其他程序.许多程序都有类似 SQL*Plus 的选项.一般来说,我建议不要使用 SQL*Plus 克隆.SQL*Plus 的主要优点是它是一个简单的工具,而且在任何地方的工作方式都差不多.没有一个 SQL*Plus 克隆是完全兼容的,如果您在克隆上运行 SQL*Plus 脚本,许多程序将会中断.
  1. 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?
  2. 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).
  3. 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 字符错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆