Re: [Sqlrelay-discussion] Oracle error (ORA-01036)
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2007-07-10 21:23:38
|
On Tue, 2007-07-10 at 14:19 -0500, Jason McClellen wrote: > I figured this out. The prepared statement only works on the same > connection daemon that it was initially prepared on. > > That lead me to think that I could create a prepared statement per > connection cache and try to get the prepared statement from there if > it existed. In order to do that, I would need some way to uniquely > identify each connection. > > I looked at sqlrcon_getConnectionPort and sqlrcon_getConnectionSocket, > but the documentation suggests that they are only valid after a > sqlrcon_suspendSession. It would seem wasteful to suspend a connection > just to resume it again. The suspend/resume session is really only there so you can make a single transaction span multiple invocations of a program or get passed around between clients on multiple machines. It's mainly used to allow transactions to span more than one web-page. > > Has anyone else implemented a prepared statement cache, or does anyone > know how to uniquely identify a connection? Sorry, otehr than suspend/resume session, there's no way to guarantee which connection daemon a client will end up using. Many DBs have an implicit prepared statement cache though. If you prepare a statement, then prepare it again, as long as it's still in the cache, no work is done the second time (other than to look up and see if it's in the cache or not). I think with postgres, you can get a handle to a statement and explicitly reuse it across db connections, but SQL Relay doesn't currently offer that functionality. Dave dav...@fi... > > Thanks, > Jason > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |