Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 10th, 2006, 02:15 PM
murat-mur
Guest
 
Posts: n/a
Default php code is not running after migrating the DB2 Connect EE from V7 to V8

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 */

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles