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

查看:180
本文介绍了如何在Oracle DB中覆盖> 2499字符错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Oracle查询,该查询正在通过Shell脚本执行,并且查询超出了最大长度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个字符.这真是令人发指-如果Oracle最终承认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天全站免登陆