Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Send Critical MySQL Data to Your Users Automatically : Page 5

With SQLyog Job Agent, a multithreaded application that enables you to develop MySQL notification applications, you can automate and schedule MySQL database jobs to provide data to users when they need it—regardless of their locations.


advertisement
Running SJA from the Command Prompt
You can also execute SJA as a command-line tool that takes an XML file containing the session detail. In Linux, the only way to use SJA is to run it from command prompt. The following is the syntax to execute SJA from command line with the XML file as a parameter:

sja <jobfile> [–l<logile>]

The sja supports the following options:

  • -l<filename> – File where sja will log all the errors it has encountered while syncing databases
  • If you do not specify a log file, sja creates a default log file (sja.log) in the current directory of the executable and logs all error messages in this file.



Scheduling Synchronization Process
In Windows, SQLyog uses the Windows Task Scheduler to schedule the sync process. If you want to schedule it, just click on the Back button and select the Save and Schedule It option.

Figure 10: Providing Job Name

You need to save the session details in an XML file before you can schedule it. Clicking the Finish button starts up the Windows Task Scheduler dialog.

Figure 11: Scheduling the Job Using Windows Task Manager

Sample SJA Job File
The following is a sample job file SJA used:

<?xml version="1.0" encoding="UTF-8"?> <job version="2.0"> <notifyjob> <abortonerror value="yes" /> <result value="yes" /> <includequery value="yes" /> <includemsg value="yes" /> <source> <host>localhost</host> <user>root</user> <pwd></pwd> <port>3306</port> <database>mysql</database> </source> <smtp> <displayname>Karam Chand</displayname> <toemail>karam_chand03@yahoo.com</toemail> <fromemail>karam_chand03@yahoo.com</fromemail> <host>samtp.yahoo.com</host> <port>25</port> <subject>MySQL Help</subject> </smtp> <query>select * from mysql.user;</query> </notifyjob> </job>

Provide Critical Data On Demand
Immediate access to information is critical in business today, and users can't sit in front of their terminals waiting for important data. They need information as and when they require it. SQLyog's Notification Services allows you to provide just that with a few clicks of the mouse.



Karam Chand is a freelance PHP/MySQL developer based in Bangalore, India.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap