Sample Header Ad - 728x90

How to run db2pd -hadr in batch mode

1 vote
2 answers
677 views
I am trying to automate some things on DB2 and would like to use a batch file to do this. I create the following batch file test.bat: db2cmd - -w "db2 -tvf test.db2" I then try to do two commands in the test.db2 script, which work together in the CLP interactive mode: !set db2instance=INST1; !db2pd -db MYDB -hadr; I then get the following output: >Database MYDB not activated on database partition 0. Option -hadr requires -db or -alldbs option and active database. I'm using DB2 9.7 LUW on Windows 2008 R2.
Asked by ESP (121 rep)
Aug 19, 2015, 06:42 PM
Last activity: Mar 4, 2020, 08:24 AM