Posts

Showing posts from August, 2019

How to check the number of rows affected in DB2 INSERT / DELETE / UPDATE / MERGE commands

By default,Db2 doesn’t print the number of records affected when we run the DML commands like INSERT,UPDATE,DELETE & Merge in the command prompt.   For Displaying the count we have 2 methods   1.use -m   Eg: db2 -m “insert or update or delete statement   2. Add the following Profile Registry Command   Db2set db2options=-m   Restart the Instance   Db2stop   Db2start   Then try to insert or update the records in a table.you can find the counts after the statement executed successfully.    

How to Upgrade DB2 Version from 10.5 to 11.1 using Linux Server

Steps to follow for DB2 Upgrade   1.Backup up the databases. 2.Stop the existing instance 3.Download the Latest db2 version to upgrade 4.First,do the instance upgrade 5.After the instance upgrade completion,do the database upgrade using the upgrade command   -- Download the 11.1 version & install the db2.(Make sure that don't create any instances)   It will install db2 in this /opt/ibm/db2/11.1 path.This is the default path for db2.   Go to /opt/ibm/db2/11.1/instance path,here we have a command called db2iupgrade to upgrade the instances.   ./db2iupgrade -u <fenceuserid> <instanceuserid>   It will take some time to upgrade & will generate the log file.U check the complete details in the log file(regarding the status of upgradation)   Once the upgradation is success.U have to start the instance using  db2start  command.   You can check the db2 version,whether the instance is up...

DB2 Installation Steps in Linux Server

1:Download the Db2 software   Eg : db210.5_linux.tar.gz     2.Unzip the above product using the below command   gunzip -d db210.5_linux.tar.gz   3.Untar the product   db2 -xvf db210.5_linux.tar   It will extract the files & create the SETUP Directory .   4.In the setup directory,u have to run the following command   ./db2install   It will generate the log file,based on the log file u can verify whether it has executed successfully or not.