Summary:
In this case, the code does not report an error (no sqlException and other exception), the breakpoint is executed to ps.executeQuery() and it ends, and the front desk does not respond in circles
I searched around and found a few sql sentences. First, I checked the current session record in the v$session table, and saw that there was a table in operation in the record. Then I killed the corresponding session. After that, the operation solved the problem. problems
So, here's a quick note:
(1) I thought of some problems. Of course, jdbc does not directly operate the database, so what protocol is followed to dynamically maintain its own state consistent with the closed and open state of the cursor of the "oracle result set" (is this expression correct), and what protocol is used
Transport Layer: Establishes reliable data transmission. TCP protocol
session layer: establishing an end-to-end connection
JDBC connection to a remote computer is based on sockets, that is, establishing a TCP/IP reliable data connection.
Personally think: belong to the transport layer
Since v$session and session are mentioned first, let's start with "session": The object described by v$session is a currently existing session (this session does not include the session currently connected to the database, this is just the session of the database foreground server process , and the session of the database daemon, which is not connected).
According to the session id, you can view the transaction information being executed by the current session:
select * from v$transaction where addr in (select taddr from v$session where sid = &sid )
Repeatedly query USED_UBLK and USED_UREC to see changes and estimate the progress of the transaction, especially for long-term rollback operations. When these two values are 0, the rollback is completed.
select a.sid, a.serial#, a.user#, a.username, b.addr,
b.USED_UBLK, b.USED_UREC
from v$transaction b, v$session a
where b.addr in (select a.taddr from v$session a where a.sid = &sid)
sid : session id saddr : seesion address
serial# : sid will be reused, when sid is reused, serial# will increase and will not be repeated
taddr : the current transaction address, which can be used to associate v$transaction
status : Used to judge the status of the session.
(1) active, executing the sql statement (2) inactive, waiting for the operation (3) killed is marked as deleted
server : server type (dedicated or shared)
USER#: session's user id. Equal to user_id in dba_users. The user# of the Oracle internal process (that is, the background process) is 0.
USERNAME: session's username, which indicates which database user (in the server database) (not the user of the server's operating system) is using the session. Equal to username in dba_users. The username of the Oracle internal process (that is, the background process) is empty.
*“会话”所在的进程信息: paddr : process address ,关联v$process可以查到当前session所在的进 program : 产生这个进程的应用程序? terminal : 一般是客户端所在主机的主机名 ?附加:
当MACHINE=计算机名时,TERMINAL=unkown;当MACHINE=工作组/计算机名时,TERMINAL=计算机名。
*“会话”中执行sql语句的相关信息 command : session 正在执行的sql id ,1代表create table 3代表select sql_address,sql_id,sql_hash_value,sql_child_number:sql正在执行的sql statement , 与v$sql中的address,sql_id,hash_value,child_number对应(可以查看sql语句) *“会话”属性 (2) v$session中的process字段值为 xx:xx的解释: “内容蛮多,再接再励”
http://www.zhihu.com/question/21142020
http://blog.csdn.net/haiross/article/details/17718383 (v$session && v$process)