I am new to db2 for zos.
I have created a virtual instance in the IBM cloud with the image `ibm-zos-3-1-s390x-dev-test-wazi-2`. I made a floating IP to connect to the instance from outside and added ports to the inbound rule. I can connect to the `DB2D1LOC` database using user `IBMUSER.`
I am using a community license, which I got from the DB2 community edition tarball, and pasted it in the codriver/license folder-updated db2dsdriver.cfg.
Binded the package to 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 connecting to the ibm_db using the following conn_str
```
conn_str = ( "Driver={IBM DB2 ODBC DRIVER};" "DATABASE=DBD1LOC;" "HOSTNAME=<host>;" "PORT=8102;" "PROTOCOL=TCPIP;" "UID=IBMUSER;" "PWD=<password>;" "SECURITY=SSL;" "SSLServerCertificate=/workspace/common_cacert;" )
```
It can query the system tables. But when I tried to create a new database.
```
create database test;
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 the deadlock, timeout, or write conflict. Reason code "00C9008E". SQLSTATE=57033 SQLCODE=-913
```
I am not able to understand why there is a deadlock.
Also, is this a correct way to access db2 for zos?
------------------------------
Nihar Patil
------------------------------