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