Where to place Z/OS license file when push Cloud Foundry PHP app to Bluemix?

前端 未结 1 1750
臣服心动
臣服心动 2020-12-22 06:09

I would like to connect from Bluemix to Z/OS system, using SecureGatway, but I don\'t have a Z/OS license file (most probably: db2consv_zs.lic file). I receive SQLSTATE=4296

相关标签:
1条回答
  • 2020-12-22 06:44

    1, License DB2 driver on Bluemix for zOS

    The license file must be placed into a folder of the PHP instance on the server. The DB2 extension is installed during deployment of the Cloud Foundry app. I found no way to copy the license file during build or deployment. But I found a way to copy the lic file after deployment: I added the lic file to my project and then I copied it over with a php file that I run from browser. This is the line:

    $src = '/home/vcap/app/lib/db2consv_zs.lic';    
    $dst = '/home/vcap/app/ibmdb_clidriver/license/db2consv_zs.lic';
    if (!copy($src, $dst)) {
    echo "failed to copy $src...\n";
    

    Secure Gateway also must be set properly to connect from Bluemix to a blue zone zOS DB2. Instructions.

    2, License DB2 driver on Local machine in IBM blue zone for zOS

    The license problem disappeared when I installed license for DB2 Connect.

    "To connect to an IBM mainframe database server you require a licensed DB2 Connect product. You cannot connect directly to an IBM mainframe Data Server using a IBM data server client." link

    "You can add DB2 Connect™ capability to any client or driver."

    DB2 license files

    Use db2licm command to register the license.

    How to install DB2 Connect to Bluemix is still open, alternatively Secure Gateway might contain DB2 Connect.. but not sure .. and a connection server can be used also. Will add comments later.

    0 讨论(0)
提交回复
热议问题