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

      1. <legend id='IzteM'><style id='IzteM'><dir id='IzteM'><q id='IzteM'></q></dir></style></legend>

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

        <tfoot id='IzteM'></tfoot>
      2. Oracle PL/SQL - 即时输出/控制台打印提示

        Oracle PL/SQL - tips for immediate output / console printing(Oracle PL/SQL - 即时输出/控制台打印提示)

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

            1. <small id='HwYIr'></small><noframes id='HwYIr'>

                  <bdo id='HwYIr'></bdo><ul id='HwYIr'></ul>
                • <tfoot id='HwYIr'></tfoot>

                  <legend id='HwYIr'><style id='HwYIr'><dir id='HwYIr'><q id='HwYIr'></q></dir></style></legend>
                  本文介绍了Oracle PL/SQL - 即时输出/控制台打印提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有许多可能需要几分钟才能运行的 pl/sql 过程.在开发它们时,我添加了一些打印语句来帮助调试并提供一些反馈和进度指示器.最初,我在小型测试集上运行这些,输出几乎是即时的.现在我正在测试需要几分钟才能运行的更大的测试集,我发现打印到控制台不再合适,因为在过程结束之前不会打印任何内容.我习惯于在不缓冲输出并立即打印的环境中工作,并且为简单的调试和诊断添加简单的打印语句是很常见的.

                  I have a number of pl/sql procedures that can take several minutes to run. While developing them, I've added a few print statements to help debug and also provide some feedback and progress indicators. Initially, I ran these on small test sets and output was almost instantaneous. Now that I'm testing with larger test sets that take several minutes to run, I find that printing to the console is no longer suitable, because nothing gets printed until the procedure ends. I'm used to working in environments that do not buffer their output and print it immediately and adding simple print-statements for simple debugging and diagnostic is common.

                  在 pl/sql 中是否可以立即打印输出(不缓冲)?如果不是,人们推荐哪些替代方案来获得类似的结果?

                  Is it possible in pl/sql to print output immediately (not buffered)? If not, what alternatives do people recommend to get a similar result?

                  推荐答案

                  您可以拥有一个使用自治事务将消息写入表的过程,例如:

                  You can have a procedure that writes messages to a table using an autonomous transaction something like:

                  procedure log (p_message)
                  is
                      pragma autonomous_transaction;
                  begin
                      insert into message_log (user, datetime, message)
                      values (user, sysdate, p_message);
                      commit;
                  end;
                  

                  然后从另一个 Oracle 会话监视该表.

                  Then monitor the table from another Oracle session.

                  这篇关于Oracle PL/SQL - 即时输出/控制台打印提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to redirect the output of DBMS_OUTPUT.PUT_LINE to a file?(如何将 DBMS_OUTPUT.PUT_LINE 的输出重定向到文件?)
                  How do I get column datatype in Oracle with PL-SQL with low privileges?(如何使用低权限的 PL-SQL 在 Oracle 中获取列数据类型?)
                  Get a list of all functions and procedures in an Oracle database(获取 Oracle 数据库中所有函数和过程的列表)
                  Why cannot I create triggers on objects owned by SYS?(为什么我不能在 SYS 拥有的对象上创建触发器?)
                  Returning result even for elements in IN list that don#39;t exist in table(即使对于表中不存在的 IN 列表中的元素也返回结果)
                  Reset Sequence in oracle 11g(oracle 11g 中的重置序列)
                    <legend id='gy654'><style id='gy654'><dir id='gy654'><q id='gy654'></q></dir></style></legend>
                    <tfoot id='gy654'></tfoot>
                        <tbody id='gy654'></tbody>

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

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