Checktable

Database
Not applicable

Checktable

Hi,

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;

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 ...

/Harald

5 REPLIES 5
Enthusiast

Re: Checktable

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

Regards...

Enthusiast

Re: Checktable

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

-Sankar

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)
Fan

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)
Highlighted
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.