iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
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

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-06-2004, 05:30 PM
WebProWorld New Member
 
Join Date: Mar 2004
Posts: 15
DavidatWork RepRank 0
Default .bat file to export sql 7.0 database

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
Reply With Quote
  #2 (permalink)  
Old 04-07-2004, 04:19 AM
sijpie's Avatar
WebProWorld Pro
 
Join Date: Sep 2003
Location: Scotland
Posts: 106
sijpie RepRank 0
Default

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)
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:01 AM.



Search Engine Optimization by vBSEO 3.3.0