forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Server Sync
- This topic is empty.
-
AuthorPosts
-
-
March 24, 2006 at 12:11 pm #9561p7h3pMember
Is is possible to schedule entire server syncs rather than just a particular db?
I don't have too many, but it would be nice to save time. Also, we wouldn't have to schedule anything when we create new db's on either machine.
Also, there appears to be a bug in the sync wizard. I set everything, it pops me to win scheduler, schedule it, click ok, and whatever the next thing I try to do in SQLyog, it crashes. I can go back to the sync wizard, crash, run a quick query, crash. Couple more steps, to the already long process of scheduling 30+ databases.
-
March 24, 2006 at 2:22 pm #20982peterlaursenParticipant
1) The DATA sync tool can be run from a batch file like
sja syncjob1.xml
sja syncjob2.xml
…
sja syncjob40.xml
You will need 40 different job(XML-files) then, but if it is only the name of the database that changes that can quickly be done from an editor. You may also write a simple application with a loop ( for job = 1 to 40 …) calling the SJA and replacing inside the jobfile.
2)
Regarding the crash. We had a similar reports a few days ago. Looks like it happens at the very moment when SQLyogEnt.exe handles control over to SJA.exe. Working on it.
-
March 26, 2006 at 9:57 pm #20983p7h3pMember
Thanks for the batch file tip, I've tried it a few times, and I also searched, and viewed the FAQ before posting again, but I can't get it to work.
All I get is “SJA is not a recognized command” or something like that.
Do I have to give the full path to SJA?
Thanks
-
March 26, 2006 at 10:01 pm #20984peterlaursenParticipantQuote:Do I have to give the full path to SJA?
Yes, if the bat file and the sja.exe is not in the same folder.
-
March 26, 2006 at 10:06 pm #20985p7h3pMember
Ok, sorry
I sort of answered my own question, this is my 1st time working with batch files, but I do know a bit of cmd line. a very little bit.
here's my current batch file, but I'm still having trouble
SQLyog is installed to it's default dir so my batch looks like:
cd C:Program FilesSQLyog Enterprise
sja.exe job_1.xml
sja.exe job_2.xml
…
That works for a second, opens SJA, and then gives me “Error opening session Job file”
What should I do from here, Should everything be in the same dir (SJA, batch file, and xml job files?). Can I just arbitrarily move SJA? or Copy?
-
March 26, 2006 at 10:17 pm #20986peterlaursenParticipantQuote:What should I do from here, Should everything be in the same dir (SJA, batch file, and xml job files?
that would be the easiest! but also
pathsja.exe pathjobfile.xml should work no matter where all the three files are. What is happening to you now is that ift does not find the jobfile in the folder that you specified with “CD …”
You can also use the s and l parameters to specify paths to the session file and the log file, like.
sja jobfile.xml ssessionfile.xml llogfile.text
It also always is a good idea to quote folder or file names with a space like cd C:Program Files”SQLyog Enterprise”
-
March 26, 2006 at 10:25 pm #20987p7h3pMember
Thanks Peter,
You not only helped me out with my SQLyog troubles, but taught me a useful windows tool at the same time.
Thanks for the quotes tip too, I'll do that, but my only question is, why did you not quote Program Files, but did quote “SQLyog Enterprise”. Just an example that they both work?
-
March 26, 2006 at 10:31 pm #20988peterlaursenParticipant
I simply overlooked the space in 'Program files'
Maybe it works without quotes in a .bat file – I am not sure.
-
March 26, 2006 at 10:34 pm #20989p7h3pMember
working great,
Thanks very much again
-
March 27, 2006 at 5:29 am #20990p7h3pMember
Sorry, last question
This obviously runs slower than my previous method.
I'm considering breaking down the batch into 3-4 smaller files. Would you recommend this, or?
Any Pros & Cons?
-
March 27, 2006 at 5:48 am #20991peterlaursenParticipantQuote:This obviously runs slower than my previous method.
It is not clear to me what was the previous method! Syncing 40 tables takes the time it takes
1)
You can try instead of
sja job1.xml
sja job2.xml
etc
to use
call sja job1.xml
call sja job2.xml
etc
(with path's as before of course)
.. then all jobs will run simutaneously. (And you will have 40 command-boxes displayed on the screen while it runs – a 'Virtual Desktop Manager' is preferable here ….. 🙂 ) If bandwidth is sufficient that may speed up things considerably. (Actually I have bandwidth corresponding to about ten times the speed of my ISP-MySQL server in outgoing direction from my local and much more the other way)
Of course you can combine things like having a my.bat calling for instance
5 bat files like my1.bat, my2.bat .. my5.bat. Each of those would then have 8 successive sja statements …
2)
But first of all read
http://www.webyog.com/articles/Using_SQLyo…L_Databases.pdf and understand how to use the
and options effectively -
March 27, 2006 at 9:15 pm #20992p7h3pMember
Thanks again,
Very good document. You wrote it? Peter's Music library
Everything's working great and I learned a lot.
-
March 27, 2006 at 9:19 pm #20993peterlaursenParticipant
I wrote the draft for it and the two of us finished it.
The SJA is a much more powerful tool as you would expect at first sight!
-
-
AuthorPosts
- You must be logged in to reply to this topic.