guys,
has anyone come across the following error.. I am using a User defined query in my DB2 API to pull data and throw it to a Dataset..
Fatal: SQLAllocHandle: Failed to allocate environment handle 'ENV'.
all inputs are welcome..
thanks
DB2 API
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
SQLAllocHandle is a call to a function in the ODBC API, one of SQLAllocEnv, SQLAllocConnect or SQLAllocStmt. The DB2 API largely follows the conventions and protocols of the ODBC API.
Without any other information it's really difficult to diagnose further. However, you may find the following information useful.
SQLAllocEnv simply grabs some memory in which to manage the connection environment(s), primarily error handling. It should only ever fail if the system can not deliver any virtual memory, which ought to be fairly rare.
SQLAllocConnect grabs some more memory, in which to manage an individual connection environment, including structures for interaction with the database and discovery of information about the driver and the database.
SQLAllocStmt requests memory in which the preparation and execution of SQL statements and retrieval of result sets is managed, including binding of variables to query parameters and result set columns.
If you have any DB2 trace tools, use them to try to figure out at which point the process is failing.
You might also like to contact your DB2 support provider; they may have some extra diagnostic tools available.
Without any other information it's really difficult to diagnose further. However, you may find the following information useful.
SQLAllocEnv simply grabs some memory in which to manage the connection environment(s), primarily error handling. It should only ever fail if the system can not deliver any virtual memory, which ought to be fairly rare.
SQLAllocConnect grabs some more memory, in which to manage an individual connection environment, including structures for interaction with the database and discovery of information about the driver and the database.
SQLAllocStmt requests memory in which the preparation and execution of SQL statements and retrieval of result sets is managed, including binding of variables to query parameters and result set columns.
If you have any DB2 trace tools, use them to try to figure out at which point the process is failing.
You might also like to contact your DB2 support provider; they may have some extra diagnostic tools available.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Charter Member
- Posts: 38
- Joined: Wed Mar 17, 2004 1:16 am
- Location: USA
Within the context of ODBC connections the SQLAllocHandle is used to allocate handles for environments, connections, statements, and descriptors. Giving that this did work previously then the most likely culprit would be the inability to allocate a handle for a specific environment because some sort of limit has been reached.
I found the following on a DB2 information tech site -
It might be worth checking to see if you are running up against some sort of limit, otherwise I'm not sure why this would happen.In ODBC, no limit is defined on the number of environment, connection, statement, or descriptor handles that can be allocated at any one time. Drivers may impose a limit on the number of a certain type of handle that can be allocated at a time
I found the following on a DB2 information tech site -
This is likely what is happening.The limit for the number of handles that can be allocated for the type of handle indicated by the HandleType argument has been reached, or in some cases, insufficient system resources exist to properly initialize the new handle
Mike Hester
mhester@petra-ps.com
mhester@petra-ps.com
SQLAllocHandle: Failed to allocate environment handle 'ENV'
Hi
I am running the PX jobs . I am currently using DB2 API.
Here is the error which i am getting.
FIRST ERROR :" stgDB2ReadScotiaGlobe,0: Failure during execution of operator logic."
SUBSEQUENT ERROR : "stgDB2ReadScotiaGlobe,0: Fatal Error: Fatal: SQLAllocHandle: Failed to allocate environment handle 'ENV'. "
Please let me know what all parameters in the environment are required to over come this.
Please suggest in this regards.
Thanks
Manish
I am running the PX jobs . I am currently using DB2 API.
Here is the error which i am getting.
FIRST ERROR :" stgDB2ReadScotiaGlobe,0: Failure during execution of operator logic."
SUBSEQUENT ERROR : "stgDB2ReadScotiaGlobe,0: Fatal Error: Fatal: SQLAllocHandle: Failed to allocate environment handle 'ENV'. "
Please let me know what all parameters in the environment are required to over come this.
Please suggest in this regards.
Thanks
Manish
Thanks
Manish
Manish
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: