Connect to a external DB2 with ZendServer










0















I have been fighting with Zend Server 2018 while trying to connect to a remote AS/400 DB2.



I am using the IBM_DB2 php functions to do the connection but every time I get



[IBM][CLI Driver] SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031 SQLCODE=-1031


Anyone else successful connecting the two?



What I've read online is that I need to catalog the servers.
So I have db2 running on an iseries at say 192.168.50.1 with a name of X232321 and a Windows 10 box running zend server 2018.
What commands would I need to catalog the two servers so I can use the db2 connector? And what does that actually do?



Thanks for the help










share|improve this question




























    0















    I have been fighting with Zend Server 2018 while trying to connect to a remote AS/400 DB2.



    I am using the IBM_DB2 php functions to do the connection but every time I get



    [IBM][CLI Driver] SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031 SQLCODE=-1031


    Anyone else successful connecting the two?



    What I've read online is that I need to catalog the servers.
    So I have db2 running on an iseries at say 192.168.50.1 with a name of X232321 and a Windows 10 box running zend server 2018.
    What commands would I need to catalog the two servers so I can use the db2 connector? And what does that actually do?



    Thanks for the help










    share|improve this question


























      0












      0








      0








      I have been fighting with Zend Server 2018 while trying to connect to a remote AS/400 DB2.



      I am using the IBM_DB2 php functions to do the connection but every time I get



      [IBM][CLI Driver] SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031 SQLCODE=-1031


      Anyone else successful connecting the two?



      What I've read online is that I need to catalog the servers.
      So I have db2 running on an iseries at say 192.168.50.1 with a name of X232321 and a Windows 10 box running zend server 2018.
      What commands would I need to catalog the two servers so I can use the db2 connector? And what does that actually do?



      Thanks for the help










      share|improve this question
















      I have been fighting with Zend Server 2018 while trying to connect to a remote AS/400 DB2.



      I am using the IBM_DB2 php functions to do the connection but every time I get



      [IBM][CLI Driver] SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031 SQLCODE=-1031


      Anyone else successful connecting the two?



      What I've read online is that I need to catalog the servers.
      So I have db2 running on an iseries at say 192.168.50.1 with a name of X232321 and a Windows 10 box running zend server 2018.
      What commands would I need to catalog the two servers so I can use the db2 connector? And what does that actually do?



      Thanks for the help







      php db2 zend-server






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 13 '18 at 4:03







      Kris.Mitchell

















      asked Nov 13 '18 at 2:40









      Kris.MitchellKris.Mitchell

      82621531




      82621531






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Try this on the windows db2 client:



          db2 "catalog tcpip node MY_IS remote 192.168.50.1 server 446"
          db2 "catalog db MY_ALIAS at node MY_IS"
          db2 "catalog dcs db MY_ALIAS as X232321"


          You can set MY_IS, MY_ALIAS as you want (no more than 8 letters).
          Port 446 may be different for your iSeries host.






          share|improve this answer























          • In my php code that was on the iSeries I connect to the database with X232321 for the database name and then call out the specific tablename.column in the queries. With your above example does any of that change?

            – Kris.Mitchell
            Nov 13 '18 at 11:53











          • I registered your iSeries database as MY_ALIAS. If you want to have this alias equal to your database name, then just amend MY_ALIAS to X232321 above in both commands.

            – Mark Barinstein
            Nov 13 '18 at 13:57










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272997%2fconnect-to-a-external-db2-with-zendserver%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Try this on the windows db2 client:



          db2 "catalog tcpip node MY_IS remote 192.168.50.1 server 446"
          db2 "catalog db MY_ALIAS at node MY_IS"
          db2 "catalog dcs db MY_ALIAS as X232321"


          You can set MY_IS, MY_ALIAS as you want (no more than 8 letters).
          Port 446 may be different for your iSeries host.






          share|improve this answer























          • In my php code that was on the iSeries I connect to the database with X232321 for the database name and then call out the specific tablename.column in the queries. With your above example does any of that change?

            – Kris.Mitchell
            Nov 13 '18 at 11:53











          • I registered your iSeries database as MY_ALIAS. If you want to have this alias equal to your database name, then just amend MY_ALIAS to X232321 above in both commands.

            – Mark Barinstein
            Nov 13 '18 at 13:57















          1














          Try this on the windows db2 client:



          db2 "catalog tcpip node MY_IS remote 192.168.50.1 server 446"
          db2 "catalog db MY_ALIAS at node MY_IS"
          db2 "catalog dcs db MY_ALIAS as X232321"


          You can set MY_IS, MY_ALIAS as you want (no more than 8 letters).
          Port 446 may be different for your iSeries host.






          share|improve this answer























          • In my php code that was on the iSeries I connect to the database with X232321 for the database name and then call out the specific tablename.column in the queries. With your above example does any of that change?

            – Kris.Mitchell
            Nov 13 '18 at 11:53











          • I registered your iSeries database as MY_ALIAS. If you want to have this alias equal to your database name, then just amend MY_ALIAS to X232321 above in both commands.

            – Mark Barinstein
            Nov 13 '18 at 13:57













          1












          1








          1







          Try this on the windows db2 client:



          db2 "catalog tcpip node MY_IS remote 192.168.50.1 server 446"
          db2 "catalog db MY_ALIAS at node MY_IS"
          db2 "catalog dcs db MY_ALIAS as X232321"


          You can set MY_IS, MY_ALIAS as you want (no more than 8 letters).
          Port 446 may be different for your iSeries host.






          share|improve this answer













          Try this on the windows db2 client:



          db2 "catalog tcpip node MY_IS remote 192.168.50.1 server 446"
          db2 "catalog db MY_ALIAS at node MY_IS"
          db2 "catalog dcs db MY_ALIAS as X232321"


          You can set MY_IS, MY_ALIAS as you want (no more than 8 letters).
          Port 446 may be different for your iSeries host.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 13 '18 at 7:58









          Mark BarinsteinMark Barinstein

          1,479114




          1,479114












          • In my php code that was on the iSeries I connect to the database with X232321 for the database name and then call out the specific tablename.column in the queries. With your above example does any of that change?

            – Kris.Mitchell
            Nov 13 '18 at 11:53











          • I registered your iSeries database as MY_ALIAS. If you want to have this alias equal to your database name, then just amend MY_ALIAS to X232321 above in both commands.

            – Mark Barinstein
            Nov 13 '18 at 13:57

















          • In my php code that was on the iSeries I connect to the database with X232321 for the database name and then call out the specific tablename.column in the queries. With your above example does any of that change?

            – Kris.Mitchell
            Nov 13 '18 at 11:53











          • I registered your iSeries database as MY_ALIAS. If you want to have this alias equal to your database name, then just amend MY_ALIAS to X232321 above in both commands.

            – Mark Barinstein
            Nov 13 '18 at 13:57
















          In my php code that was on the iSeries I connect to the database with X232321 for the database name and then call out the specific tablename.column in the queries. With your above example does any of that change?

          – Kris.Mitchell
          Nov 13 '18 at 11:53





          In my php code that was on the iSeries I connect to the database with X232321 for the database name and then call out the specific tablename.column in the queries. With your above example does any of that change?

          – Kris.Mitchell
          Nov 13 '18 at 11:53













          I registered your iSeries database as MY_ALIAS. If you want to have this alias equal to your database name, then just amend MY_ALIAS to X232321 above in both commands.

          – Mark Barinstein
          Nov 13 '18 at 13:57





          I registered your iSeries database as MY_ALIAS. If you want to have this alias equal to your database name, then just amend MY_ALIAS to X232321 above in both commands.

          – Mark Barinstein
          Nov 13 '18 at 13:57

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272997%2fconnect-to-a-external-db2-with-zendserver%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Use pre created SQLite database for Android project in kotlin

          Darth Vader #20

          Ondo