| Author | 
		  Message
		 | 
		
		  | andrewfemin | 
		  
		    
			  
				 Posted: Tue May 08, 2018 2:04 am    Post subject: ODBC connection issue in IIBv10 | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 26 Aug 2017 Posts: 54
  
  | 
		  
		    
			  
				Hi,
 
 
I have IIBv10 running on Linux server. DB2 client is also installed on the same server and catalog entries have been made for two databases. I have run the mqsisetdbparms command for the DBs as well. The below command is running successfully:
 
   
	| Code: | 
   
  
	| mqsicvp TESTNODE -n TESTDB | 
   
 
 
However, when I connect to the same DB via a esql node in a message flow, I'm getting the below error in the syslog:
 
   
	| Code: | 
   
  
	BIP2230E: Error detected whilst processing a message in node 'TestFlow.RetrieveFromDB'.
 
BIP2348E: Error detected while attempting to obtain a connection to data source 'TESTDB' of type 'ODBC' using userid 'wbiadm'.
 
BIP2393E: Database error: ODBC return code '-1' from data source 'TESTDB' using ODBC driver manager ''.
 
BIP2347E: Database error: SQL State 'IM002'; Native Error Code '0'; Error Text 'System information file not found. Please check the ODBCINI and the ODBCSYSINI environment variables are correctly set.' | 
   
 
 
I checked ODBCINI and ODBCSYSINI and they have the correct values. ODBCINI is pointing to the odbc.ini file and ODBCSYSINI is pointing to the directory of odbcinst.ini file.
 
 
But in the third line of the error, there is no ODBC driver manager. I'm guessing this could be the reason for this error. I've checked the drivers given in odbc.ini file and the broker user 'wbiadm' has access to those files. In any case, mqsicvp command is connecting fine. What could be the issue here? Please help. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue May 08, 2018 6:13 am    Post subject: Re: ODBC connection issue in IIBv10 | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| andrewfemin wrote: | 
   
  
	|  What could be the issue here?  | 
   
 
 
 
Your ODBC ini is not correctly referencing the DB2 client driver files?
 
 
What exactly is that mqsicvp returning? _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | andrewfemin | 
		  
		    
			  
				 Posted: Tue May 08, 2018 9:18 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 26 Aug 2017 Posts: 54
  
  | 
		  
		    
			  
				mqsicvp returns this:
 
   
	| Code: | 
   
  
	mqsicvp TESTNODE -n TESTDB
 
BIP8299I: User 'wbiadm' from security resource name 'TESTDB' will be used for the connection to datasource 'TESTDB'.
 
BIP8290I: Verification passed for the ODBC environment.
 
 
BIP8270I: Connected to Datasource 'TESTDB' as user 'wbiadm'. The datasource platform is 'DB2/LINUXX8664', version '10.05.0008'.
 
===========================
 
databaseProviderVersion      = 10.05.0008
 
driverVersion                = 10.05.0008
 
driverOdbcVersion            = 03.51
 
driverManagerVersion         = 03.52.0002.0002
 
driverManagerOdbcVersion     = 03.52
 
databaseProviderName         = DB2/LINUXX8664
 
datasourceServerName         = wbiadm
 
databaseName                 = SIL
 
odbcDatasourceName           = TESTDB
 
driverName                   = libdb2.a
 
supportsStoredProcedures     = Yes
 
procedureTerm                = stored procedure
 
accessibleTables             = No
 
accessibleProcedures         = No
 
identifierQuote              = "
 
specialCharacters            = None
 
describeParameter            = Yes
 
schemaTerm                   = schema
 
tableTerm                    = table
 
sqlSubqueries                = 31
 
activeEnvironments           = 1
 
maxDriverConnections         = 0
 
maxCatalogNameLength         = 0
 
maxColumnNameLength          = 128
 
maxSchemaNameLength          = 128
 
maxStatementLength           = 2097152
 
maxTableNameLength           = 128
 
supportsDecimalType          = Yes
 
supportsDateType             = Yes
 
supportsTimeType             = Yes
 
supportsTimeStampType        = Yes
 
supportsIntervalType         = No
 
supportsAbsFunction          = Yes
 
supportsAcosFunction         = Yes
 
supportsAsinFunction         = Yes
 
supportsAtanFunction         = Yes
 
supportsAtan2Function        = Yes
 
supportsCeilingFunction      = Yes
 
supportsCosFunction          = Yes
 
supportsCotFunction          = Yes
 
supportsDegreesFunction      = Yes
 
supportsExpFunction          = Yes
 
supportsFloorFunction        = Yes
 
supportsLogFunction          = Yes
 
supportsLog10Function        = Yes
 
supportsModFunction          = Yes
 
supportsPiFunction           = Yes
 
supportsPowerFunction        = Yes
 
supportsRadiansFunction      = Yes
 
supportsRandFunction         = Yes
 
supportsRoundFunction        = Yes
 
supportsSignFunction         = Yes
 
supportsSinFunction          = Yes
 
supportsSqrtFunction         = Yes
 
supportsTanFunction          = Yes
 
supportsTruncateFunction     = Yes
 
supportsConcatFunction       = Yes
 
supportsInsertFunction       = Yes
 
supportsLcaseFunction        = Yes
 
supportsLeftFunction         = Yes
 
supportsLengthFunction       = Yes
 
supportsLTrimFunction        = Yes
 
supportsPositionFunction     = No
 
supportsRepeatFunction       = Yes
 
supportsReplaceFunction      = Yes
 
supportsRightFunction        = Yes
 
supportsRTrimFunction        = Yes
 
supportsSpaceFunction        = Yes
 
supportsSubstringFunction    = Yes
 
supportsUcaseFunction        = Yes
 
supportsExtractFunction      = No
 
supportsCaseExpression       = Yes
 
supportsCastFunction         = Yes
 
supportsCoalesceFunction     = Yes
 
supportsNullIfFunction       = Yes
 
supportsConvertFunction      = Yes
 
supportsSumFunction          = Yes
 
supportsMaxFunction          = Yes
 
supportsMinFunction          = Yes
 
supportsCountFunction        = Yes
 
supportsBetweenPredicate     = Yes
 
supportsExistsPredicate      = Yes
 
supportsInPredicate          = Yes
 
supportsLikePredicate        = Yes
 
supportsNullPredicate        = Yes
 
supportsNotNullPredicate     = Yes
 
supportsLikeEscapeClause     = Yes
 
supportsClobType             = Yes
 
supportsBlobType             = Yes
 
charDatatypeName             = CHAR
 
varCharDatatypeName          = VARCHAR
 
longVarCharDatatypeName      = LONG VARCHAR
 
clobDatatypeName             = CLOB
 
timeStampDatatypeName        = TIMESTAMP
 
binaryDatatypeName           = CHAR (1) FOR BIT DATA
 
varBinaryDatatypeName        = VARCHAR (1) FOR BIT DATA
 
longVarBinaryDatatypeName    = LONG VARCHAR FOR BIT DATA
 
blobDatatypeName             = BLOB
 
intDatatypeName              = INTEGER
 
doubleDatatypeName           = DOUBLE
 
varCharMaxLength             = 0
 
longVarCharMaxLength         = 0
 
clobMaxLength                = 0
 
varBinaryMaxLength           = 0
 
longVarBinaryMaxLength       = 0
 
blobMaxLength                = 0
 
timeStampMaxLength           = 0
 
identifierCase               = Upper
 
escapeCharacter              = \
 
longVarCharDatatype          = -1
 
clobDatatype                 = -99
 
longVarBinaryDatatype        = -4
 
blobDatatype                 = -98
 
 
BIP8273I: The following datatypes and functions are not natively supported by datasource 'TESTDB' using this ODBC driver: Unsupported datatypes: 'INTERVAL' Unsupported functions: 'POSITION, EXTRACT'
 
Examine the specific datatypes and functions not supported natively by this datasource using this ODBC driver.
 
When using these datatypes and functions within ESQL, the associated data processing is done within IBM Integration Bus rather than being processed by the database provider.
 
 
Note that "functions" within this message can refer to functions or predicates.
 
 
 
BIP8071I: Successful command completion. | 
   
 
 
 
One thing I just noticed is this line:
 
   
	| Code: | 
   
  
	| driverName                   = libdb2.a | 
   
 
 
The server does not have any libdb2.a file. Where did this value come from? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue May 08, 2018 9:24 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| andrewfemin wrote: | 
   
  
	One thing I just noticed is this line:
 
   
	| Code: | 
   
  
	| driverName                   = libdb2.a | 
   
 
 
The server does not have any libdb2.a file. Where did this value come from? | 
   
 
 
 
It's part of the DB2 client if memory serves. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | andrewfemin | 
		  
		    
			  
				 Posted: Tue May 08, 2018 9:56 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 26 Aug 2017 Posts: 54
  
  | 
		  
		    
			  
				Could that be an issue? Because the odbc.ini file is pointing to the correct drivers and I couldn't find anything wrong with the file permissions as well.
 
 
If that is an issue, any pointers on how to change it? Thanks in advance. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue May 08, 2018 10:08 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				Here's a question I probably should have asked first:
 
 
- where's the DB2 that you're trying to connect to (distributed or z/OS)?
 
 
On the back of that question:
 
 
- are you sure you've performed all the steps necessary to catalog that database with the DB2 client you're using? _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | abhi_thri | 
		  
		    
			  
				 Posted: Wed May 09, 2018 12:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 17 Jul 2017 Posts: 516 Location: UK 
  | 
		  
		    
			  
				hi...along with verifying the DB2 client installation as suggested by Vitor can you try crosschecking the below,
 
 
- Even though you've mentioned that ODBCINI and ODBCSYSINI are set correctly, are those set for the broker user profile? If so I suppose you did try restarting the node?
 
 
- Is the 'InstallDir' set correctly for the default [ODBC] stanza at odbc.ini file
 
 
- If the problem persists perhaps you could try collecting odbc trace to see whether it show more details
 
 
http://www-01.ibm.com/support/docview.wss?uid=swg21177048 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | andrewfemin | 
		  
		    
			  
				 Posted: Fri May 18, 2018 1:05 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Acolyte
 
 Joined: 26 Aug 2017 Posts: 54
  
  | 
		  
		    
			  
				| Thanks for all the help. The issue is resolved now. I had initialized the variable ODBCINI in .profile file of the broker user. It appears, for the broker to reload the .profile file, a server restart is required. After a server reboot, the connection is working fine now. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |