<tfoot id='0Kb1E'></tfoot>

        <i id='0Kb1E'><tr id='0Kb1E'><dt id='0Kb1E'><q id='0Kb1E'><span id='0Kb1E'><b id='0Kb1E'><form id='0Kb1E'><ins id='0Kb1E'></ins><ul id='0Kb1E'></ul><sub id='0Kb1E'></sub></form><legend id='0Kb1E'></legend><bdo id='0Kb1E'><pre id='0Kb1E'><center id='0Kb1E'></center></pre></bdo></b><th id='0Kb1E'></th></span></q></dt></tr></i><div id='0Kb1E'><tfoot id='0Kb1E'></tfoot><dl id='0Kb1E'><fieldset id='0Kb1E'></fieldset></dl></div>
        <legend id='0Kb1E'><style id='0Kb1E'><dir id='0Kb1E'><q id='0Kb1E'></q></dir></style></legend>

        • <bdo id='0Kb1E'></bdo><ul id='0Kb1E'></ul>

        <small id='0Kb1E'></small><noframes id='0Kb1E'>

        命令行中的 sqlplus 语句

        时间:2023-09-18

        • <small id='74lIm'></small><noframes id='74lIm'>

            • <bdo id='74lIm'></bdo><ul id='74lIm'></ul>
                <tbody id='74lIm'></tbody>
            • <i id='74lIm'><tr id='74lIm'><dt id='74lIm'><q id='74lIm'><span id='74lIm'><b id='74lIm'><form id='74lIm'><ins id='74lIm'></ins><ul id='74lIm'></ul><sub id='74lIm'></sub></form><legend id='74lIm'></legend><bdo id='74lIm'><pre id='74lIm'><center id='74lIm'></center></pre></bdo></b><th id='74lIm'></th></span></q></dt></tr></i><div id='74lIm'><tfoot id='74lIm'></tfoot><dl id='74lIm'><fieldset id='74lIm'></fieldset></dl></div>
              <tfoot id='74lIm'></tfoot>

                <legend id='74lIm'><style id='74lIm'><dir id='74lIm'><q id='74lIm'></q></dir></style></legend>

                  本文介绍了命令行中的 sqlplus 语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  可以做这样的事情吗?

                  $ sqlplus -s user/pass "select 1 from dual"
                  $ echo "select 1 from dual" |sqlplus -s 用户/密码

                  我知道我可以将 select 1 from dual 放在一个文件中,然后执行以下操作:
                  $ sqlplus -s user/pass @myFile.sql

                  I know I can put select 1 from dual in a file and do this:
                  $ sqlplus -s user/pass @myFile.sql

                  但我想知道是否真的有必要创建一个文件来满足sqlplus

                  but I'm wondering if it's actually necessary to create a file just to satisfy sqlplus

                  推荐答案

                  请注意,在 Unix/Linux 上,如果您将用户名/密码直接放在命令行 .可能是一个很大的安全问题(或变成一个很大的安全问题).

                  Just be aware that on Unix/Linux your username/password can be seen by anyone that can run "ps -ef" command if you place it directly on the command line . Could be a big security issue (or turn into a big security issue).

                  我通常建议创建一个文件或使用此处的文档,以便在 Unix/Linux 中使用ps -ef"命令防止用户名/密码被查看.如果用户名/密码包含在脚本文件或 sql 文件中,您可以使用适当的用户/组读取权限进行保护.然后,您可以在 shell 脚本中将用户/密码保留在文件中,如下所示:

                  I usually recommend creating a file or using here document so you can protect the username/password from being viewed with "ps -ef" command in Unix/Linux. If the username/password is contained in a script file or sql file you can protect using appropriate user/group read permissions. Then you can keep the user/pass inside the file like this in a shell script:

                  sqlplus -s /nolog <<EOF
                  connect user/pass
                  select blah;
                  quit
                  EOF
                  

                  这篇关于命令行中的 sqlplus 语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Oracle SQL 中的自定义顺序 下一篇:Oracle 的默认日期格式是 YYYY-MM-DD,为什么?

                  相关文章

                      <small id='TA3JI'></small><noframes id='TA3JI'>

                    1. <legend id='TA3JI'><style id='TA3JI'><dir id='TA3JI'><q id='TA3JI'></q></dir></style></legend>
                      <i id='TA3JI'><tr id='TA3JI'><dt id='TA3JI'><q id='TA3JI'><span id='TA3JI'><b id='TA3JI'><form id='TA3JI'><ins id='TA3JI'></ins><ul id='TA3JI'></ul><sub id='TA3JI'></sub></form><legend id='TA3JI'></legend><bdo id='TA3JI'><pre id='TA3JI'><center id='TA3JI'></center></pre></bdo></b><th id='TA3JI'></th></span></q></dt></tr></i><div id='TA3JI'><tfoot id='TA3JI'></tfoot><dl id='TA3JI'><fieldset id='TA3JI'></fieldset></dl></div>
                      <tfoot id='TA3JI'></tfoot>
                      • <bdo id='TA3JI'></bdo><ul id='TA3JI'></ul>