|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here! |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
Does anyone know where to get info on how to write a .bat file that will stop a sql 7.0 database / export the data to a file then restart the database? Im trying to do this so I can get a complete database file for our backup process. Thanks for any help you might have. regards, DavidatWork |
|
||||
|
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.
__________________
Jaap PalmVenue Broekhuizen Paintings MacSijp You've done it all You've broken every code (Steve Harley) |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |