How to stop a background task that is waiting for user input?

Hi, I scheduled a task that runs a script, and when I imported the script I forgot to remove the "pause" command.  How do I stop the task?  I've tried db2stop, as well as force applications all, but it's still running...  Help!  Thanks.
pw05Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ghp7000Commented:
try db2_kill, this will kill the instance, then you can do db2start
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pw05Author Commented:
db2_kill:
Abruptly stops all processes being run on multiple database partition servers and cleans up all resources on all database partition servers. This command renders your databases inconsistent. Do not issue this command except under direction from IBM service.

How would I make the databases consistent again after running db2_kill?
0
ghp7000Commented:
run db2start
0
ghp7000Commented:
For your future reference:
Checking and working with return code on DB2 Wshell scripts

One way to do return code checking on shell scripts is saving a checkpoint on each step done. You can also stop script execution when and error happens by including the option -s on db2 command call. Here is an example of creating and dropping a db2 table:

Example 9-1 Forwarding return code from sample.db2 script to runtask.bat

-- script SAMPLE.DB2 --

!ECHO 'CONNECTING' > SAMPLE.FLG@

CONNECT TO SAMPLE_B@

!ECHO 'CREATING' > SAMPLE.FLG@

CREATE TABLE SAMPLE (COL_1 VARCHAR(20))@

!ECHO 'DROPPING' > SAMPLE.FLG@

DROP TABLE SAMPLE@

!ECHO 'DISCONNECTING' > SAMPLE.FLG@

DISCONNECT SAMPLE_B@

!ECHO 'OK' > SAMPLE.FLG@

-- end script SAMPLE.DB2 --

-- script RUNTASK.BAT --

db2 -td@ -s -f SAMPLE.DB2 -z SAMPLE.LOG

FIND "OK" SAMPLE.FLG2 > NIL

IF %ERRORLEVEL% != 0 GOTO ERRHAND

ECHO SCRIPT OK

GOTO END

:ERRHAND

ECHO SCRIPT FAIL

:END

-- script RUNTASK.BAT --

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.