forums › forums › SQLyog › Using SQLyog › Import As Job
- This topic is empty.
-
AuthorPosts
-
-
April 22, 2006 at 9:51 am #9630bvdvMember
i have a program that generates a batch script with sql statements
is it possible to execute this script as job
when i run it as import and than you select the text file it works great but how to to dis as job
greetings Bert
-
April 22, 2006 at 6:48 pm #21314peterlaursenParticipant
I am afraid I don't understand what you mean with 'run as a job'?
Could you explain?
-
April 26, 2006 at 6:38 pm #21315bvdvMemberpeterlaursen wrote on Apr 22 2006, 08:48 PM:I am afraid I don't understand what you mean with 'run as a job'?
Could you explain?
you can import from sql statements. but i want this to do on a regular base(every evening)
its only way because i dont have a odbc driver
the script runs great but i dont want to do manualy
so is this possible and if yes how
thx
-
April 26, 2006 at 7:03 pm #21316peterlaursenParticipant
Sure …
You should have a look a 'Notifications Services'. With it you can schedule execution of an SQL-script. But the script must be (as of now) be hardcoded into the XML jobfile. It will take a litte programming to dynamically generate XML-jobfile – simply replace what is between the
and >/SQL> tags. If you can generate a CSV file you can import using the LOAD DATA INFILE statement and it can be an external file.
I cannot guarantee when but some day in the future (it is not highest priority) we will also support import of XML-data. Also implementation of a SOURCE statement like that of the Windows 'mysql' client has been proposed. A godd idea but again: no guarantee when.
You will need the Enterprise version to test the possibilities. The TRIAL is fully functional for this.
You may even be able to set up a batch file or a simply script/application that first calls a the source somehow, generates the SQL, inserts it dynamically in the XML and next calls a SJA Notifications Job that does the import. It is not very complicated, but you will need to code something yourself (using any scripting or programming language that can execute a external binary program file and has simple string-handling routines).
The CSV option and using a LOAD DATA INFILE with 'Notifications Services' is the most straightforward option right now.
-
April 26, 2006 at 9:31 pm #21317bvdvMember
i have the Enterprise version so the only thing i have to do is to replace every night the xml file
i think i can do this also with a dos batchfile and then schedule it with task manager
thx for the quick reply peterlaursen
bert
-
-
AuthorPosts
- You must be logged in to reply to this topic.