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

  • <legend id='thf5I'><style id='thf5I'><dir id='thf5I'><q id='thf5I'></q></dir></style></legend>
    1. <tfoot id='thf5I'></tfoot>

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

      1. 当我在 JDBC 应用程序中调用 PreparedStatement.cancel() 时,它是否真的在 Oracle

        时间:2023-09-17

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

                <legend id='OzQ8j'><style id='OzQ8j'><dir id='OzQ8j'><q id='OzQ8j'></q></dir></style></legend>
                  <tbody id='OzQ8j'></tbody>
              1. <small id='OzQ8j'></small><noframes id='OzQ8j'>

                  <bdo id='OzQ8j'></bdo><ul id='OzQ8j'></ul>
                  本文介绍了当我在 JDBC 应用程序中调用 PreparedStatement.cancel() 时,它是否真的在 Oracle 数据库中杀死了它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有针对 Oracle 10g 数据库运行的 Java JDBC 应用程序.我设置了一个 PreparedStatement 来执行查询,然后调用 ps.executeQuery() 来运行它.有时查询需要很长时间,我需要杀死它.我有另一个线程访问该 PreparedStatement 对象,并对其调用 cancel().

                  I have Java JDBC application running against an Oracle 10g Database. I set up a PreparedStatement to execute a query, and then call ps.executeQuery() to run it. Occasionally the query takes a long time, and I need to kill it. I have another thread access that PreparedStatement object, and call cancel() on it.

                  我的问题是,这真的会杀死数据库中的查询吗?或者它只是将它从客户端切断,而查询仍在 Oracle 内部的某个地方运行?

                  My question is, does this actually kill the query in the database? Or does it just sever it from the client, and the query is still running somewhere in the bowels of Oracle?

                  谢谢!

                  推荐答案

                  答案是这是一个实施质量问题.如果您查看 javadoc 对于 Statement.cancel(),它表示如果 DBMS 和驱动程序都支持中止 SQL 语句",就会发生这种情况.

                  The answer is that it's a quality-of-implementation issue. If you look at the javadoc for Statement.cancel(), it says it'll happen "if both the DBMS and driver support aborting an SQL statement".

                  根据我使用各种版本的 Oracle JDBC 驱动程序的经验,Statement.cancel() 似乎可以满足您的需求.查询在取消时似乎立即停止执行.

                  In my experience with various versions of Oracle JDBC drivers, Statement.cancel() seems to do what you'd want. The query seems to stop executing promptly when cancelled.

                  这篇关于当我在 JDBC 应用程序中调用 PreparedStatement.cancel() 时,它是否真的在 Oracle 数据库中杀死了它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:ORA-22905 - 使用 select 语句查询表类型时 下一篇:在 PLSQL 中转义单引号

                  相关文章

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

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

                  2. <legend id='zygRY'><style id='zygRY'><dir id='zygRY'><q id='zygRY'></q></dir></style></legend>

                    • <bdo id='zygRY'></bdo><ul id='zygRY'></ul>