on 2010 Jul 15 8:17 AM
When using an external procedure that uses one of the external environments that have an one-per-connection scope (i.e. C, Perl, PHP), is there a connection_property or option to get the process ID of the external process?
When running several of those connections simultaneously, that would make it easier to identify which connection uses which process (and to find out how quick an external environment is closed and the like).
If there's no such property, I would suggest to add one.
I'm using SA 12.0.0.2483 (GA).
Request clarification before answering.
There is currently no connection property that will give you the process ID of the external environment.
Note that a single database connection could be associated with multiple external environments. For example, if the a connection was using a combination of C and PHP or PHP and PERL or C and PERL or ... (you get the idea). If this were the case then there could be multiple external process IDs. This complicates the issue - If we were to create a property then we would need to be able to list multiple PIDs.
If you wanted to know the pid of the external process, you could determine this yourself by implementing a external procedure which used getpid() and include this in your external library. If you included such a routine in each external library that you used and uniquely named the routines - e.g. getpid_c(), getpid_php(), getpid_perl(), etc - then you could determine the pid of each external process that the connection was associated with. Perhaps this would be a good example to include in the packaged samples?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would suggest a connection_extended_property('ExternEnvPID', <externenvname>), so I could specify which external environment I'm interested in (as long as I can only get one of a kind per connection, which is a correct assumption AFAIK). So I might call connection_extended_property('ExternEnvPID', 'C_ESQL32');. But your suggestion to implement that by an external function will suffice for my needs and is really simple to implement. Thanks!
User | Count |
---|---|
52 | |
8 | |
5 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.