Results 1 to 7 of 7

Thread: SQL2000 to MySQL schedule!

  1. #1
    Squeeler Vini's Avatar
    Join Date
    Jul 2003
    Location
    Sheffield
    Posts
    1,769
    Thanks
    44
    Thanked
    8 times in 8 posts

    SQL2000 to MySQL schedule!

    Is it possible to setup a schedule to transfer certain data from certain tables from an internally based SQL2000 server to an externally hosted website?

    Obviously, for the data to be shown all neat and tidy on a PHP page.

    The idea is to have a page showing live stats from one of our systems.


  2. #2
    Senior Member Kezzer's Avatar
    Join Date
    Sep 2003
    Posts
    4,863
    Thanks
    12
    Thanked
    5 times in 5 posts
    Yes, as long as you have permissions to have a remote connection to the other DB. Just create a script to execute scheduled runs of the data you want to transfer. I do this kind of stuff at work usually using an SQL script which I can execute whenever I want (usually wrapped in a small C# application, then use a scheduler to execute the app)

  3. #3
    Administrator Moby-Dick's Avatar
    Join Date
    Jul 2003
    Location
    There's no place like ::1 (IPv6 version)
    Posts
    10,665
    Thanks
    53
    Thanked
    385 times in 314 posts
    If you don't have the remote connection positions , then you could run a job to export to a file that you could FTP to your remote site and parse back in with a little integration app.

    you may well be able to run the export side of things with DTS/SSIS , but not sure about the MySQL side.
    my Virtualisation Blog http://jfvi.co.uk Virtualisation Podcast http://vsoup.net

  4. #4
    TiG
    TiG is offline
    Walk a mile in other peoples shoes...
    Join Date
    Jul 2003
    Location
    Questioning it all
    Posts
    6,213
    Thanks
    45
    Thanked
    48 times in 43 posts
    Agree with moby on this, write yourself a DTS package, that exports the data into a csv file, create a FTP proceedure that transfers the date up to your web host automatically, then use the command proceedure in the DTS to load up IE and call a php page that executes and loads the CSV into the MYSQL database.

    Lock down the upload page to by IP locked to your IP for security purposes.

    TiG
    -- Hexus Meets Rock! --

  5. #5
    Squeeler Vini's Avatar
    Join Date
    Jul 2003
    Location
    Sheffield
    Posts
    1,769
    Thanks
    44
    Thanked
    8 times in 8 posts
    Quote Originally Posted by TiG View Post
    Agree with moby on this, write yourself a DTS package, that exports the data into a csv file, create a FTP proceedure that transfers the date up to your web host automatically, then use the command proceedure in the DTS to load up IE and call a php page that executes and loads the CSV into the MYSQL database.

    Lock down the upload page by IP, locked to your IP for security purposes.

    TiG

    This sounds spondooly. But...

    How?



    I'm sure I can get (read: someone to get) the data out to a .csv (would a raw .sql not be any use?) and I can setup a batch file to ftp it up...

    Would you lock the upload 'script' to IP via HTACCESS?

    Having the server import it would stump me. So would outputting the PHP, but thats something I could probably stumble through, from previous bodge jobs.

  6. #6
    TiG
    TiG is offline
    Walk a mile in other peoples shoes...
    Join Date
    Jul 2003
    Location
    Questioning it all
    Posts
    6,213
    Thanks
    45
    Thanked
    48 times in 43 posts
    Its just a programming task Vini, (DTS can do all these tasks one after each other in a controlled method, allowing you to know what has happened)

    You want the data out in a format that you can use from php, csv seems easier to me, then just do an open on the csv in the php and a do while loop till you've imported all the data.

    Its not the way i'd do it myself, but it would work. I'm not certain but don't think you could automate a HTACCESS command within DTS.

    TiG
    -- Hexus Meets Rock! --

  7. #7
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    There are, at a count, at least tens of ways of doing it.
    To err is human. To really foul things up ... you need a computer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Making PHP and MySQL Talk?
    By Dav0s in forum Software
    Replies: 4
    Last Post: 18-09-2005, 10:53 PM
  2. mySQL problems
    By Vini in forum Software
    Replies: 2
    Last Post: 22-08-2005, 01:01 PM
  3. MySQL password prob
    By PanzerKnight in forum Software
    Replies: 2
    Last Post: 18-08-2004, 07:53 PM
  4. Another MySQL Help Thread
    By r1zeek in forum Software
    Replies: 2
    Last Post: 11-07-2004, 07:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •