简体   繁体   English

应用程序的Oracle多会话

[英]Oracle mutiple session for an application

I have a problem. 我有个问题。 Well, I have an VB6 app that connects to an oracle database. 好吧,我有一个连接到oracle数据库的VB6应用程序。 Normally it uses just one session to connect to the database, but after running an update query on a table, it opens another one, on wich it runs just one query : SELECT VALUE FROM SYS.NLS_DATABASE_PARAMETERS WHERE PARAMETER = 'NLS_NCHAR_CHARACTERSET' The update query is : 通常,它只使用一个会话连接到数据库,但是在表上运行更新查询后,它会打开另一个会话,直到它只运行一个查询: SELECT VALUE FROM SYS.NLS_DATABASE_PARAMETERS WHERE PARAMETER = 'NLS_NCHAR_CHARACTERSET'更新查询是:

UPDATE SYS_PASS set LAST_LOG = SYSDATE where ID = 'xxxx'

Any idee why this is happening, or how could i get rid of this extra session ? 任何想法为什么会这样,或者我如何摆脱这个额外的会议?

This extra SQL statement must be generated either by 此额外的SQL语句必须由

  • your own VB6 program, in which case you need to fix it yourself 您自己的VB6程序,在这种情况下,您需要自己修复
  • "something" in your technology stack (the ODBC driver?), in which case you need to look at replacing all or parts of that technology stack; 技术堆栈中的“某物”(ODBC驱动程序?),在这种情况下,您需要考虑替换该技术堆栈的全部或部分; which may or may not be feasible (but hey, if you really want to get rid of that extra statement...) 这可能是可行的,也可能是不可行的(但是,嘿,如果您真的想摆脱多余的声明...)

If you want know what for your database do select then ask about select (describe how you detected extra select etc), not about app, while people will not understand what problem do you have. 如果您想知道数据库的内容,请进行选择,然后询问选择(描​​述您如何检测到额外的选择等),而不是关于应用程序,尽管人们不会理解您遇到什么问题。

Your second query executes on the opened connection itself and not on any other connection. 您的第二个查询在打开的连接本身上执行,而不在任何其他连接上执行。

You might be seeing other connection because of connection pooling. 由于连接池,您可能会看到其他连接。 You can verify that by setting Pooling = false in the connection string. 您可以通过在连接字符串中设置Pooling = false来验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM