Command is allowed only in interactive mode (Error 1297)

You are attempting to use VALIDATE DATABASE with the RECOVER option in a program. This command can be issued only through the Command window.