python监控db2数据库需要关闭吗

利用ibm_db这个python类库去监控db2数据库,需要关闭db2连接吗?有例子吗?

参与3

1同行回答

新数科技新数科技IT顾问北京新数科技有限公司
没太写过phthon访问DB2的程序。不过从API文档上看,是提供了close方法的。https://github.com/ibmdb/python-ibmdb/wiki/APIs#ibm_dbcloseibm_db.closebool ibm_db.close ( IBM_DBConnection connection )DescriptionCloses a DB2 client connection and returns the corre...显示全部

没太写过phthon访问DB2的程序。不过从API文档上看,是提供了close方法的。

https://github.com/ibmdb/python-ibmdb/wiki/APIs#ibm_dbclose

ibm_db.close

bool ibm_db.close ( IBM_DBConnection connection )

Description

Closes a DB2 client connection and returns the corresponding resources to the database server.

If you attempt to close a persistent DB2 client connection created with ibm_db.pconnect(), the connection is returned to the pool for the next caller of ibm_db.pconnect() to use.

Parameters

connection - A valid IBM_DBConnection

Return Values

Returns True on success or False on failure.

收起
IT咨询服务 · 2017-05-10
浏览1149

提问者

wangzk0206
数据库管理员scrcu

问题来自

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2017-05-04
  • 关注会员:2 人
  • 问题浏览:3591
  • 最近回答:2017-05-10
  • X社区推广