Oh, this is going back a few years, but it is exactly what I used to do.
You can't access the database directly from DOS, but the way it works is that the batch file calls the command line SQL programme and then tell it to take its input from a file rather then from the keyboard.
So first you need to record exactly the keystrokes that you use if you were to do it manually, including the logging in, and quiting, etc, etc. (remember that once running it will not take any keyboard input!!)
This you enter into a text file, save it as say backup.inp
if we assume that the SQL command-line programme is sqlbase.exe, then you write your batch file, which is pretty simple:
sqlbase.exe < backup.inp
That's it!
This calls sqlbase.exe and tells it to read input from backup.inp
I would suggest to start off with an easy input file, just logging in, and quitting. Then build it up.
|