可以传递给SQL * Plus的命令行参数的最大长度? [英] Maximum length of command line argument that can be passed to SQL*Plus?

查看:266
本文介绍了可以传递给SQL * Plus的命令行参数的最大长度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从Linux C Shell调用SQL * Plus:

I am calling SQL*Plus from Linux C Shell:

sqlplus username/password @file.sql var1 var2 var3

如果我将字符串作为var1传递,那么该字符串可以持续多长时间?

If I pass a string as var1, how long can this string be?

它受操作系统支配吗?在这种情况下:

Is it governed by the OS? In this case:

Linux version 2.6.9-100.ELsmp (mockbuild@x86-010.build.bos.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)) #1 SMP Tue Feb 1 12:17:32 EST 2011

更新:实证测试得出以下结果:

Update: Empirical testing yielded the following results:

  • 5200个字符的命令行参数给出了错误信息:"Word太长."
  • 然后有1300个字符产生了SQL * Plus错误,字符串开头(000796384 ...")太长.最大大小为239个字符."
  • 当我的239个字符以下时,一切都很好.

我想我会用sqlldr来克服这个问题.

I think I'll use sqlldr to overcome this.

推荐答案

尝试使用:xargs --show-limits

Your environment variables take up 2446 bytes
POSIX upper limit on argument length (this system): 2092658
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2090212
Size of command buffer we are actually using: 131072

每个参数没有限制,但整个命令行长度的总和没有限制.在我的系统(Fedora 15/zsh)中,它接近2Mb. (第4行).

There is no limit per argument, but a total for the whole command line length. In my system (Fedora 15/zsh) its closer to 2Mb. (line 4).

这篇关于可以传递给SQL * Plus的命令行参数的最大长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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