CONNECT The CONNECT statement connects an application process to the identified application server according to the rules for remote unit of work. An application process can only be connected to one application server at a time. This is called the current server. A default application server may be established when the application requester is initialized. If implicit connect is available and an application process is started, it is implicitly connected to the default application server. The application process can explicitly connect to a different application server by issuing a CONNECT TO statement. A connection lasts until a CONNECT RESET statement or a DISCONNECT statement is issued or until another CONNECT TO statement changes the application server. RESET Disconnects the application process from the current server. A commit operation is performed. If implicit connect is available, the application process remains unconnected until an SQL statement is issued.
TERMINATE also stops the command line processor, but removes the associated back-end process and frees any memory that is being used. 建议在db2stop前先terminate.在更改了数据库配置参数后有必要运行terminate以使得更改生效 Note:Existing connections should be reset before terminating the CLP.
The DISCONNECT statement destroys one or more connections when there is no active unit of work (that is, after a commit or rollback operation). If a single connection is the target of the DISCONNECT statement, the connection is destroyed only if the database has participated in an existing unit of work, regardless of whether there is an active unit of work. For example, if several other databases have done work, but the target in question has not, it can still be disconnected without destroying the connection.
添加新评论0 条评论