Db2 for z/OS & Db2ZAI

 View Only
  • 1.  Unable to create database

    Posted Mon August 26, 2024 12:29 PM

    Hi, 

    I am new to the DB2 for ZOS. I am a LUW guy. I am trying to connect to db2 for zos using a Python client. 

    To use Db2 for zos. I am using a virtual instance in an IBM cloud deployed with the image ibm-zos-3-1-s390x-dev-test-wazi-2 I updated the password.  Associated a "floating IP" to access from the outside. Updated the access group to allow ingress to the correct port(s)

    I obtained a community license from the db2 community tarball. I copied and pasted the licenses into clidriver/license the folder.  I got the certificate from the server and pasted it into my local directory. 

    Bound package to the database.

    ./db2cli bind $IBM_DB_HOME/bnd/@db2cli.lst -database DBD1LOC:<float_ip>:<port> -user ibmuser -passwd <password> -options "grant public action replace blocking no"

    I am using the connection string to connect to the DB.

    connstr = conn_str = (
        "Driver={IBM DB2 ODBC DRIVER};"
        "DATABASE=DBD1LOC;"
        "HOSTNAME=*******;"
        "PORT=8102;"
        "PROTOCOL=TCPIP;"
        "UID=IBMUSER;"
        "PWD=******;"
        "SECURITY=SSL;"
        "SSLServerCertificate=/workspace/common_cacert;"
    )

    I am able to query all the system tables. But I am not able to create a new database. It fails with the following error

     create database test;
    2024-08-23 13:17:55.585  ERROR  >        Failed to execute query: ibm_db_dbi::InternalError: Statement Execute Failed: [IBM][CLI Driver][DB2] SQL0913N  Unsuccessful execution of a transaction caused by deadlock, timeout or write conflict.  Reason code "00C9008E".  SQLSTATE=57033 SQLCODE=-913 (InternalError: ibm_db_dbi::InternalError: Statement Execute Failed: [IBM][CLI Driver][DB2] SQL0913N  Unsuccessful execution of a transaction caused by deadlock, timeout or write conflict.  Reason code "00C9008E".  SQLSTATE=57033 SQLCODE=-913)
    SQL ERROR: ibm_db_dbi::InternalError: Statement Execute Failed: [IBM][CLI Driver][DB2] SQL0913N  Unsuccessful execution of a transaction caused by deadlock, timeout or write conflict.  Reason code "00C9008E".  SQLSTATE=57033 SQLCODE=-913

     Why would creating a database cause a deadlock? Also, is there an easy alternative to install db2 for Zos?



    ------------------------------
    Nihar Patil
    ------------------------------


  • 2.  RE: Unable to create database

    Posted Tue August 27, 2024 10:27 AM
    Sign on to the Zos and check the Db2 master, and distserv logs. They will show what you contended with for the timeout.
    Sent from my iPhone




  • 3.  RE: Unable to create database

    Posted Tue September 10, 2024 06:27 PM
    I finally found the issue. There is no more memory in the boot storage of virtual instances. I can create a database after cleaning up a few spaces. I have attached the storage block, but I am unsure how to configure db2 to use the storage block instead of the boot volume. 

    I didn't find any instructions for z/os; documentation was only for Linux and windows.
    Can you help me with this?






  • 4.  RE: Unable to create database

    Posted Wed September 11, 2024 11:00 AM

    I would recommend opening a Sev 3 case with IBM Db2 for z/OS Worldwide Support.  They should be able to assist you in getting this resolved or get you in contact with an IBM resource that can answer your questions.



    ------------------------------
    Bob Tilkes
    ------------------------------