db2 Terminate and db2 connect Reset both break the connection to a database.
 
             Connect Reset breaks a connection to a database, but does not terminate the back-end process. The Terminate command does both ie. break the connection to a database and terminate the back-end process.
 
Suppose an application is connected to a database, or a process may be in the middle of a of work. We can use TERMINATE to make the database connection to be lost. When Terminate is issued, an internal commit is also performed.
 
When issue the command db2stop, it may not stop the database manager, if an application is connected to a database. In this situation, you have to issue db2 Terminate command or db2 connect reset, then issue the command db2stop.
 
Db2 Disconnect is used to clear the database connection of a particular database or all
 
Syntax : db2 disconnect dbname
 
eg. db2 disconnect sample
 
db2 disconnect all
 
db2 release all
 
Note : Even after disconnecting database, some times you may get the error message "Database already in use "  when you execute the commands like   "db2 Restore db databasename , etc ..". 
 
That means current data base is connected by some other applications. Applications connected to the database can be listed out by the following command
 
db2 list applications
 
Auth Id Application Name Appl. Handle Application Id DB Name # of Agents
------- -------------- ---------- ------------------------------ -------- -----
 
TEST javaw.exe 78 *LOCAL.DB2.110722172106 EMPLOYEE 1
 
TEST javaw.exe 77 *LOCAL.DB2.110722172103 EMPLOYEE 1
 
 
Now you can use db2 "force applications all" This command is used to kill  all the applications forcefully at instance level .
 
To force a particular application with application handle 78
db2  "force application(78)"
 
 
=============================
如果是退出编辑器 quit ;如果是断开数据库连接释放资源 connect reset ;如果是修改了参数下次使用数据服务想要生效 terminate。

1:
connect reset 应该是终止数据库连接,包含一个commit的动作
terminate应该是能终止这个client发起的进程,释放资源
2:
terminate是命令,除了断开连接以外,它还终止clp(命令行处理器)的后台进程,也就是常见的db2bp:back-end process。   
connect   reset是sql语句。
3:
connect   reset只是断开连接,不终止clp后台,在duow(可以同时连接多个数据库的事务)中可以将数据库当前连接休眠。
4:
quit :退出clp,但数据库连接不断开
connect reset:断开数据库连接但不退出clp
terminate:断开数据库连接,同时退出clp
5:
CLP backend process会在从CLP提交命令和SQL语句时启动,其作用就是将Directory file的内容读到内存中,这样不用每次connect都去读一次I/O,以提高效率。
就如上面所说,区别就在于是否终止那个CLP backend process。所以,当你修改了一些参数以后,用terminate的话,下次的CLP命令(比如一个新的connect语句)此参数就会生效;而用connect reset则还不会生效。

Db2 Terminate Vs Connect Reset , Disconnect的更多相关文章

  1. [IBM DB2] db2 terminate 和 db2 connect reset 有什么区别?

    [IBM DB2] db2 terminate 和 db2 connect reset 有什么区别?  总结:如果是退出编辑器 quit :如果是断开数据库连接释放资源 connect reset : ...

  2. 很多人以为 connect 和 disconnect 应该像 new 和 delete 一样成对出现 这是错误的(只要 sender 或 receiver 其中之一不存在了,connect 会自动失效。QObject::connect 函数是线程安全的)

    其实我写文章也是边查资料边编辑的 有时候是怕自己的阐述不严谨,有时候是怕自己重复造轮子 就像有些人不停的教大家QLabel QDialog QWidget 个人是不屑的 命令模式 用 Qt's Und ...

  3. IO流 connect reset

    目录 出现场景 解决思路 出现场景 通过外部OBS下载10文件,然后通过工具将这10个文件打包成一个文件A.zip上传,最后将这个A.zip下载并解压,解压A.zip后发现文件数量不是10个. 解决思 ...

  4. 记客户端出现Connect reset问题排查。

    客户访问我们地址出现Connect reset. 网上查询说是服务端关闭,客户端还在读,就会出现Connect reset. 我们就排查为什么服务端会关闭. 网络的同事说收到了客户端的信息,但是被服务 ...

  5. db2 连接数据库与断开数据库

    连接数据库: connect to db_name user db_user using db_pass 断开连接: connect  resetdisconnect current quit是退出交 ...

  6. DB2常用命令

    DB2安装启动服务中启动不了,可用command启动并查看windows系统的日志.1.启动数据库  db2start2.停止数据库  db2stop3.连接数据库运行 db2命令之前要先运行db2c ...

  7. db2日常维护

    一. DB2日常维护操作 1.数据库的启动.停止.激活 db2 list active databases db2 active db 数据库名 db2start --启动 db2stop [forc ...

  8. <转载>DB2常用命令

    1.数据库的启动.停止    db2start --启动   db2stop [force] --停止 2.与数据库的连接.断开   db2 CONNECT TO DBName [user UserI ...

  9. DB2导入导出 学习笔记

    db2pd -osinfodb2mtrk -i -d (for aix)db2 get dbm cfg show detaildb2 get db cfg show detaildb2 get sna ...

随机推荐

  1. getsockopt套接口选项

    1. getsockopt int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen); i ...

  2. Android源码分析(四)-----Android源码编译及刷机步骤

    一 : 获取源码: 每个公司服务器地址不同,以如下源码地址为例: http://10.1.14.6/android/Qualcomm/msm89xx/branches/msm89xx svn环境执行: ...

  3. python之路第四天

    2018年7月17日 python开发IDE: pycharm.eclipse        # 专业版    # 不要汉化 安装:去官网下载pycharm 注册:https://blog.csdn. ...

  4. JavaScript数值和字符串、特殊字符

    一.JavaScript数值 1.整数和浮点数 根据国际标准 IEEE 754,64 位浮点数格式的 64 个二进制位中,第0 位到第 51 位储存有效数字部分,第 52 到第 62 位储存指数部分, ...

  5. Odoo搜素视图过滤器之筛选与分组

    转载请注明原文地址:https://www.cnblogs.com/ygj0930/p/10826168.html 一:过滤器 搜索视图还可以包含<filter>元素,定制过滤器. 过滤器 ...

  6. Buuctf-------WEB之easy_tornado

    1.给了三个提示 flag在/fllllllllllllag这里 Render+tornado这两个东西,显然是python web 根据提示flag所在文件夹,加上路径去访问,发现无法访问,被跳转到 ...

  7. jenkins部署java项目(五)

    一.web server安装jdk+tomcat其中jdk可以为openjdk,版本1.8 1.1 安装jdk环境 方式一:直接使用yum安装openjdk # * 方式二:本地安装在oracle官网 ...

  8. js-事件1

    本课我将讲述js中的事件及一些浏览器兼容问题 本章主要从以下几个方面讲起:1.事件流  2.事件的浏览器兼容   3.鼠标,键盘事件 1. 事件流 什么叫事件流? 描述的是事件接受的顺序.这句话听起来 ...

  9. 牛客NOIP暑期七天营-提高组6C:分班问题 (组合数)

    题意:A班有N个人,B班有M个人,现在要组成一个新的班级C班,为了公平,从AB班各抽相同人数的人. 现在求所有方案中,人数之和是多少. 思路:即求Σ k*C(N,k)*C(M,k);    先忽略这个 ...

  10. TCP滑动窗口(发送窗口和接受窗口)

    TCP窗口机制 TCP header中有一个Window Size字段,它其实是指接收端的窗口,即接收窗口.用来告知发送端自己所能接收的数据量,从而达到一部分流控的目的. 其实TCP在整个发送过程中, ...