SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2009
    Location
    Oklahoma, USA
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MSSQL import - can this be automated?

    Hello everybody.

    Weekly - and I probably should do it daily - I import two files into an MSSQL database. It doesnt take long - 15 minutes via the import/export wizard - but I was wondering if there was a way to setup a script or something that would do the process in one click. The settings and file names are always the same.

    Thanks

  2. #2
    SitePoint Enthusiast Jessemn's Avatar
    Join Date
    Oct 2008
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could do this without any clicks at all - All it would take is a simple cron job. Just set it up to run a mysql import once a week.

    Maybe something along these lines:
    mysql -u username -pPassword -h localhost databaseName < data.sql
    soLinkable - Trying to put the social back into social news.

  3. #3
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,576
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    MySql != MSSQL

    Anyhow, pretty easy. The import wizard should give you the option to "save the package", which you should do. Then create a Sql Server job to execute the package at a given time.

  4. #4
    SitePoint Enthusiast Jessemn's Avatar
    Join Date
    Oct 2008
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    MySql != MSSQL
    Yikes! I read the question way to fast.
    soLinkable - Trying to put the social back into social news.


Bookmarks

Posting Permissions

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