Not applicable



I have created at script to automate packdisk, scandisk, checktable etc.

But I can't get Checktable to run OK. I allways have to login, run "cnsterm 1" and write "quit;"

Like this :

Check completed at 20:38:47 12/03/31.

   On non-quiescent systems, use CONCURRENT MODE.

Enter a command, "QUIT;", "HELP;" or F7 for interactive help:

> quit;


CheckTable terminated.

Are any of you able to run checktable by script ?

My command looks like this :

/usr/pde/bin/cnsrun  -utility checktable -machine $(/usr/pde/bin/cnscim -hostname) -log "${NewLogFile}" -commands "{check all tables at level two in parallel;} {quit;}" 2>${NewLogFile}

I've tryed with {enable scriptmode} - but that did not help either.

And there is newer any output in my logfile ...



Re: Checktable

No solution to your problem but just adding that we have seen the same issue with packdisk as well.



Re: Checktable

Try "cnsremote"  -- tool intended just for automating these tasks


Not applicable

Re: Checktable

I know this is 3 years old, but I found the solution to this problem. To exit checktable from a script, add the following argument to cnsrun:

-prompt "Enter a command.*"

That will only send the check tables command first, then send the quit command when the prompt returns after the first command executes.

Even if the topic poster doesn't see this, I hope it helps someone desperately searching for a solution like I was!

Tags (2)

Re: Checktable

@Johnshaw511 Thanks! that fixed the issue I was having and saved a lot of time. I was recieving the following errors:


fatal error Utility 'checktable' read 1 with no input remaining



Tags (2)
Teradata Employee

Re: Checktable

Or simply use the batch version of the command (checktableb) in the cnsrun instead of the normal interactive command, as documented in the manual.

But then you won't have the option of entering a status or abort request via DBW while the Check Table is running.