forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Data Sync Only Works When I Use The Wizard
- This topic is empty.
-
AuthorPosts
-
-
July 21, 2006 at 12:26 am #9763mattRobertsonMember
If I create a synch job with the wizard (or manually) and then try to schedule the job, I get the following in the log (see bottom) when run from the scheduler. Basically it reads the files and records in the source but does nothing (the target is an entirely blank database).
If I instead take that same manually created (or wizard-created) xml file and run it thru the wizard, and check 'run immediately' then it works fine.
Its as if it has no problem connecting to the target but can't get to the source. But the user account I am using is 'root' and the target is on localhost. Its a fresh mySQL server I created today just for this so its not cluttered up with funky changes to permissions or anything.
The scheduler (and Windows permissions) doesn't seem to be involved since the scheduler can run the xml file just fine.
What could this be?
`cm_arc_forms_items` 49 49 0 0 0
`cm_arc_forms_items_options` 9 9 0 0 0
`cm_arc_singlepage` 0 0 0 0 0
`cm_arc_topics` 52 52 0 0 0
`cm_arc_topics_groups` 52 52 0 0 0
`cm_arc_topics_links` 11 11 0 0 0
`cm_arc_ufiles` 0 0 0 0 0
`cm_dhtmlmenu` 0 0 0 0 0
`cm_email` 0 0 0 0 0
`cm_forbid` 0 0 0 0 0
`cm_forms_answers` 210 210 0 0 0
`cm_forms_items` 36 36 0 0 0
`cm_forms_items_options` 3 3 0 0 0
`cm_forms_log` 46 46 0 0 0
`cm_groups` 1 1 0 0 0
`cm_help` 0 0 0 0 0
`cm_settings` 4 4 0 0 0
`cm_singlepage` 3 3 0 0 0
`cm_subfilter` 4 4 0 0 0
`cm_topics` 17 17 0 0 0
`cm_topics_groups` 12 12 0 0 0
`cm_topics_links` 4 4 0 0 0
`cm_ufiles` 0 0 0 0 0
`cm_users` 1 1 0 0 0
`cm_users_courselist` 0 0 0 0 0
`cm_users_groups` 1 1 0 0 0
`cm_users_priv` 1 1 0 0 0
-
July 21, 2006 at 12:40 am #21974mattRobertsonMember
Never mind. I figured it out. If I might make a suggestion:
Have the user pick the 'name' at the beginning of the process. Then carry that name through and pre-populate the fields for session file, job file and schedule file with that name. What happened was all of my session files were named sjasession.xml within the wizard and I didn't realize that what looked like just a folder pane (the name scrolls off the screen) is really a file/folder name that must be renamed from the default manually.
-
July 21, 2006 at 12:52 am #21975peterlaursenParticipant
Suggestions are welcome .. but I am not sure I understand this one!
I DO understand that if more jobs running simutaneously are trying to use the same session file results are unpredictable.
We could build a checksum of some kind with the details of the job and use this checksum for naming the session file. Similar to what we do with the autocomplete TAG-files. Or use the current TIMESTAMP for naming the session file. Something like that?
-
July 21, 2006 at 1:20 am #21976mattRobertsonMemberpeterlaursen wrote on Jul 20 2006, 05:52 PM:Suggestions are welcome .. but I am not sure I understand this one!
You aren't alone. I thought I had figured out what I was doing wrong, but I haven't.
I'll go thru the steps I am taking, step by step. Tell me where the error is if you can please.
- click the synch icon, choose 'start a new session' and click 'Next'
- Pick a source host and db, then do the same for the target. Click 'Next'
- Choose advanced options and click 'Next' (in my case I am doing simple 1-way synch)
- Check 'ALL' and click 'Next'
- Check “Save & Schedule” and choose to schedule via Windows Scheduler. I am not telling it to run immediately (if I do it runs fine, and this is the only time I can get it to run). Set the session XML file to the name of the database for clarity, so if the db is 'abc' then the window reads “C:Program FilesSQLyog Enterprise Trialabc.xml”. Click 'Next'.
- Specify the job file AND the schedule name as 'abc'. Click 'Next'
- Now the scheduler window pops up. Program to run is “C:Program FilesSQLyog Enterprise Trialsja.exe” “abc” -l”C:Program FilesSQLyog Enterprise Trialsja.log” -s”C:Program FilesSQLyog Enterprise Trialabc.xml”
- I schedule it for a given time and permission it.
- When it runs, its just a dos-window blip onscreen. on and off in an instant. If I check the target db its still empty when it should have 50 tables and a few thousand records in it.
- If I examine the folder where the SQLYog files are located, the only file that has been created is called 'abc' (no extension) and it contains what you see below (sanitized of locations and passwords course).
What am I doing wrong?
moe.source.net ********** ********** 3306 [default] abc localhost ********** ********** 3306 [default] abc -
July 21, 2006 at 2:02 am #21977peterlaursenParticipant
This an issue with the Scheduler itself. It runs as 'execute now' and would probably/likely/certainly also do from commandline.
Does this FAQ help:
http://www.webyog.com/faq/27_34_en.html
Often this behaviour is explained if you run the job from a user account of a human user, that does not have a password.
Try go through the job details from the Scheduler (from Control Panel) interface itself.
The file “abc” is the job file – and it is OK (if not it would not 'execute now'). You did not specify an extension, so it has none. It does not need either. SJA does not use the extension for any purpose. You can use any extension as described here:
-
July 22, 2006 at 4:22 am #21978mattRobertsonMember
Unfortunately its not as simple as Windows permissions. If you note in my first post, the scheduled task is running. Its just not doing anything. In the example I gave, I have a live database filled with tables and data. I also have a backup database on a second server. SQLYog is running on this second server. If I do a 'run immediately' it runs as expected and copies what it should. If I let it run via the scheduler it runs… but as the log shows that I posted, it doesn't do anything.
Its also not mySQL permissions. The db only has one user: “root”, and as you can imagine it has full rights. And again, if I 'run immediately' it works great. If it were mySQL permissions then it wouldn't run on 'run immediately', or provide undesirable results.
As for the second link you provided, I used the second option and it seems to work fine. (naming job files with a .sjajob extension and scheduling them directly). Works perfectly.
FYI the o/s is win2k3 Standard.
No idea why the wizard doesn't work but doing it manually does. Don't much care as I'd rather write a quickee xml file than run a wizard anyway.
🙂
Getting the synch tool was the last obstacle to buying another copy of Enterprise. I've just ordered a copy so I don't create 40 scheduled items whose paths I have to change later on.
-
July 22, 2006 at 3:33 pm #21979peterlaursenParticipant
aha .. food for thought!
scheduling “sja myjob.sjajob” does not work. scheduling “myjob.sjajob” does once associations are set.
I'll add this to the FAQ after some research and experimenting myself!
However I still thnik is a issue with the scheduler.
-
July 22, 2006 at 7:36 pm #21980mattRobertsonMemberpeterlaursen wrote on Jul 22 2006, 08:33 AM:However I still thnik is a issue with the scheduler.
I think I know what you mean by scheduler issues. The Win Scheduler is famous for not running when you don't run it under the proper permissions. However, consider this:
1. When I create the job via the wizard the Scheduled Task runs, right down to leaving SQLYog log entries. The log entries just show the process read the source and read the target and did nothing.
2. When I create the job manually and schedule it as an “sjajob” file type it runs perfectly
3. I am using my logged-in username and password (and watched it run while I was logged in too) so Windows permissions are completely out of the picture.
Somewhere in that complete list of clicks and keypresses I gave you is a flaw. Either bad user behavior that should be FAQ'd as a warning to others or its the program. If you want screen shots of every step I can provide them. They would include the real db locations and such so its not something I would post on an open forum, so if you want to pursue this shoot me an email.
Lastly, I did indeed register the file types prior to scheduling so they are also clickable straight from the explorer. I didn't try the “exe + parameter” method.
-
July 22, 2006 at 8:21 pm #21981peterlaursenParticipant
“Somewhere in that complete list of clicks and keypresses I gave you is a flaw.”
I do not think so myself. Once the sceduled job is saved with the Scheduler the 'complete list of clicks and keypresses' are forgotten. The Scheduler only knows what has been saved and nothing else.
But any DEFINITIVE explanation would be welcome! I also noticed that there are similar issues with MySQL Administrator Scheduled Backup.
-
July 24, 2006 at 7:52 am #21982mattRobertsonMemberpeterlaursen wrote on Jul 22 2006, 01:21 PM:Once the job is saved with the Scheduler the 'complete list of clicks and keypresses' are forgotten.
Yes of course. But that presupposes the program that accepts the inputs properly does its job based on same. I do not think so myself. If you have a passing understanding of Windows permissions then if the job runs at all then it is permissioned properly and responsibility for job execution then belongs to the called application. SQLYog plants the scheduled task, and it runs that task. That task runs… which is alll that Windows can be tasked with … but fails to achieve desired results (at least so far as on win2k3 is concerned). So what is wrong? If Windows is running the thing its not a windows issue. Its an application issue.
As I said before I found my own workaround. But 'workaround' means something isnn't working right in the first place. If your implication is you have studied my inputs in detail and come to the conclusion that nothing is wrong with them, then something in the o/s — a bare win2k3 o/s — dsagrees with your program.
-
July 24, 2006 at 9:43 am #21983peterlaursenParticipant
<_< I absolutely do not find anything wrong in your details. I wish I did. I also do not think permission is the only issue with the scheduler. I think it could be a Registry corruption issue or something similar. Could I ask you to do one experiment? Create a new user with the same priv's as your current user and try creating the sja.exe
-job and run as this new user. Both when logged on as this user and as not logged on as him. I won't make much sense if I do the same, because I do not have this issue with SJA. I have had with other programs before …
-
July 31, 2006 at 10:52 pm #21984mattRobertsonMember
Sorry I have been away for a bit. I have already created the dummy user and the job via the wizard. I did not run it immediately. I did however decide to run it as-is… as the wizard created it by default.
The execution string in the Scheduler is
“C:Program FilesSQLyog Enterprise Trialsja.exe” “sqlYogTest” -l”C:Program FilesSQLyog Enterprise Trialsja.log” -s”C:Program FilesSQLyog Enterprise Trialsjasession.xml”
The task executes and returns a 0x0 code which means Success as far as Windows is concerned.
The contents of sjasession.xml read as follows (sjalog.txt is unaltered)
Definition mismatch for 'ID' column in '`cm_approvers`' table This error is bogus as this is a first-time, one-way replication to an *empty* target database. So a mismatch is impossible. No tables or data of any kind are copied.
Ignore the folder name. This is a registered version of Enterprise.
I'll try and run per your previous post as soon as time permits.
-
July 31, 2006 at 11:25 pm #21985peterlaursenParticipantQuote:Definition mismatch for 'ID' column in '`cm_approvers`' table … one-way replication to an *empty* target database.
What are the MySQL versions and what TYPE is column 'ID' ?
FULL definition for 'ID' please (NULL/NOT NULL … DEFAULT .. everything!! )
-
August 3, 2006 at 8:46 pm #21986mattRobertsonMemberpeterlaursen wrote on Jul 31 2006, 04:25 PM:What are the MySQL versions and what TYPE is column 'ID' ?
FULL definition for 'ID' please (NULL/NOT NULL … DEFAULT .. everything!! )
here's the table spec:
cm_approvers CREATE TABLE `cm_approvers` (
`ID` int(10) NOT NULL auto_increment,
`ParentID` int(10) default NULL,
`ApproverID` int(10) default NULL,
`ApproverType` char(1) default NULL,
`Reviewed` char(1) default NULL,
`ApproverEmail` varchar(255) default NULL,
`Comments` text,
`LastReview` varchar(50) default NULL,
PRIMARY KEY (`ID`),
KEY `ParentID` (`ParentID`),
KEY `ApproverID` (`ApproverID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Both servers are 5.0.22-community-nt
-
August 3, 2006 at 9:14 pm #21987peterlaursenParticipant
It syncs perfectly here with two 5.0.23 servers.
-
-
AuthorPosts
- You must be logged in to reply to this topic.