Running batches of SQL Script files.

[expired user #6588]'s profile image [expired user #6588] posted 12 years ago in General Permalink
Is there a way of running batches of multiple sql script files as a schedule process?

Jeremy
ansgar's profile image ansgar posted 12 years ago Permalink
Yes, MySQL 5.1+ has so called "scheduled events". If you can fire a "SHOW EVENTS" without getting an SQL error you can set up events using HeidiSQL, via right click "Create new" menu.
TTSneko's profile image TTSneko posted 12 years ago Permalink
Of course, but that has nothing to do with HeidiSQL.

Running MySQL in batch mode is explained here: http://dev.mysql.com/doc/refman/5.0/en/batch-mode.html

You create the required batches and then have them executed at set times - under Windows, set the timer via "Control Panel -> Scheduled tasks" ...
[expired user #6588]'s profile image [expired user #6588] posted 12 years ago Permalink
Thanks for your ideas, I will look into them to see if they meet my requirements. Ideally I would like to run a large number of scripts (20+) as an overnight process controlled from the client rather than the server. It is possible to run multiple SQL scripts using the Source command in the MYSQL command line client, but it provides no feed back of the progress of the script (as far as I can see).

I was hoping that there was a more elegant way of doing this using the HeidiSQl client.

Jeremy

Please login to leave a reply, or register at first.