CLONE - DB2 on i5 fails because of table and column names quoting #29

zfbot opened this Issue Apr 5, 2013 · 3 comments


None yet

1 participant


Jira Information

Original Issue: ZF-12458
Issue Type: Bug
Reporter: Stephen McMahon
Created: 10/30/12
Assignee: Ralph Schindler
Components: Zend_Db_Adapter_Db2


The following script was used:

echo 'Version:- '.Zend_Version::VERSION.'<br /><br />';

$stmt = $db->select()->from('psvf.STOCK')->where( 'VIN = ?' , 'ZZZ');


echo '<br />';

$test = $db->fetchAll($stmt,2);

It fails with the following result:

Version:- 1.11.10


Fatal error: Uncaught exception 'Zend_Db_Statement_Db2_Exception' with message 'HYOLABR in "psvf" type *FILE not found. SQLCODE=-204' in /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Statement/Db2.php:69 Stack trace: #0 /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Db2->_prepare('SELECT "HYOLABR...') #1 /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Adapter/Db2.php(238): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Db2), 'SELECT "HYOLABR...') #2 /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Db2->prepare('SELECT "HYOLABR...') #3 /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Adapter/Abstract.php(736): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), 2) #4 /www/zendsvr/htdocs/PSIwarranty/zendtest.php(24): Zend_Db_Adapter_Abstract->fetchAll(Object(Zend_Db_Select), 2) #5 {main} thrown in /usr/local/zendsvr/share/ZendFramework/library/Zend/Db/Statement/Db2.php on line 69

The following script works OK:

$stmt = "select * from psvf.STOCK where VIN = 'ZZZ'";

$prepare = $db->query($stmt);

$result = $db->fetchAll($stmt);

(Originally posted by: Stephen McMahon on 10/30/12)

This error appears to be related to ZF-3011 but not quite the same.
Happens with ZendServer CE running on iSeries


(Originally posted by: Stephen McMahon on 10/30/12)

Setting Zend_Db::AUTO_QUOTE_IDENTIFIERS => false fixes issue, seems likely that DB2 doesn't like aggressive quoting of tables. Maybe extend the DB2 class to overwrite to false.


This issue was ported from the ZF2 Jira Issue Tracker at

Known GitHub users mentioned in the original message or comment:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment