Till now I have automated db2 tasks using shell script, now I'm using python as automation tool.
To use db2 in python, we must install ibm_db2 plugin in python.
Then we need to import ibm_db function in our python script.
Now I'll show you a simple script to connect and fetch result using Python script.
To use db2 in python, we must install ibm_db2 plugin in python.
apt install python-pip
pip install ibm_db
Then we need to import ibm_db function in our python script.
Now I'll show you a simple script to connect and fetch result using Python script.