Hi all,
Environment:
My PC: MS Windows 2000 pro, DB2 Connect Client 7.1
Gateway: MS Windows 2000 server. DB2 Connect EE.
DB2 z/OS V7.1 z/OS 1.6
php 5.1.2 is running on my PC.
the below php code was running with DB2 Connect EE V7.
after migrating to V8 it is not running now.
Here only the gateway machine DB2 connect EE version is changed.
Could somebody let me know how i could run this php code with DB2
Connect EE V8.
-----------------------------------------------------------------------------------------------------------------------------
The sql in the loop, I catch it from the performance monitor Omegamon
II for DB2 for z/OS :
"..SELECT * FROM SYSIBM.SYSTABAUTH WHERE GRANTEE='SDIZZZZ' ORDER BY
TCREATOR ASC FOR UPDATE ...........SCROLL SENSITIVE STA "
/* P H P C O D E */
$command = "SELECT * FROM SYSIBM.SYSTABAUTH WHERE
GRANTEE='$kullanici' ORDER BY TCREATOR ASC ";
$query = odbc_exec($baglan, $command);
$t=0;$i=0;
if(odbc_fetch_row($query))
{
$t=1;
$grantorilk="";
do
{
$sysibmorgrantor=0;
$grantor = odbc_result($query, "GRANTOR");
$tcreator = odbc_result($query, "TCREATOR");
if(!strncmp($tcreator, "SYSIBM",6))
{$grantor = "SDIDBA3";$sysibmorgrantor=1;}
if(strncmp($grantorilk,$grantor, 8))
{
$setsqlid = "SET CURRENT SQLID = '$grantor';";
if(!odbc_exec($baglan, $setsqlid))
echo "$setsqlid satırı yapılamadı<br>";
}
$tablo = odbc_result($query, "TTNAME");
$grantorilk = $grantor;
if($sysibmorgrantor == 1)
$sil = "REVOKE ALL ON TABLE SYSIBM.$tablo FROM $kullanici;";
else $sil = "REVOKE ALL ON TABLE $tcreator.$tablo FROM
$kullanici;";
if(!odbc_exec($baglan, $sil))
echo "$sil satırı yapılamadı<br>";
if($i==30)
{$i=0;odbc_commit($baglan);}
$i++;
}
while(odbc_fetch_row($query)) ;
odbc_commit($baglan);
}
/* P H P C O D E */