Maximum length of command line argument that can be passed to SQL*Plus?

Asked
Active3 hr before
Viewed126 times

5 Answers

commandlength
90%

Podcast 392: Do polyglots have an edge when it comes to mastering programming... ,Connect and share knowledge within a single location that is structured and easy to search., Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers ,If I pass a string as var1, how long can this string be?

Try with: xargs --show-limits </dev/null

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
load more v
88%

If I pass a string as var1, how long can this string be? ,I am calling SQL*Plus from Linux C Shell:,sqlplus username/password @file.sql var1 var2 var3,Some thing along this line:

Try with: xargs --show-limits </dev/null

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
load more v
72%

If I pass a string as var1, how long can this string be? ,I am calling SQL*Plus from Linux C Shell:,sqlplus username/password @file.sql var1 var2 var3,I came across "How long an argument list your kernel can take on the command line before it chokes?":

Try with: xargs --show-limits </dev/null

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
load more v
65%

Within an argument, text that is enclosed in backquotes (`) is taken as a command line that is passed to the shell. The output of the command (with any trailing newline removed) replaces the backquoted text.,Editor used by the \e and \ef commands. The variables are examined in the order listed; the first that is set is used.,Specifies the name of the database to connect to. This is equivalent to specifying dbname as the first non-option argument on the command line.,\deu+ might also display the user name and password of the remote user, so care should be taken not to disclose them.

Because of these legacy behaviors, putting more than one command in the -c string often has unexpected results. It's better to feed multiple commands to psql's standard input, either using echo as illustrated above, or via a shell here-document, for example:

psql << EOF\ x
SELECT * FROM foo;
EOF
load more v
75%

To set this option when you start SnowSQL, specify the -o command-line flag:,To set this option when you start SnowSQL, specify the -o command-line flag: $ snowsql ... -o variable_substitution=true ,In a Snowflake session, you can issue commands to take specific actions. All commands in SnowSQL start with an exclamation point (!), followed by the command name.,You can change the default location by specifying the --config path command-line flag when starting SnowSQL.

load more v

Other "command-length" queries related to "Maximum length of command line argument that can be passed to SQL*Plus?"