SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast lauriek's Avatar
    Join Date
    Dec 2002
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sql server 'cron' ?

    Hi,

    I'm using MS Sql server. I have no documentation

    I have a bulk insert command which works great but I need to clear out my tables every night and reload using the bulk insert command from tab delimitted files which I pick up every night. The files are dumped into a directory on my windows box.

    How do I schedule sql commands like this to run overnight, can I create a .sql command file and just bung it in Windows task scheduler? Does sql server have some sort of task scheduler built in for this kind of thing? Any pointers much appreciated!

    This is one of the commands I need to schedule:-

    bulk insert dbSTE..Instrument_Codes from 'C:\Stuff\qfile.tsv'
    with
    (
    BATCHSIZE = 1000
    ,CODEPAGE = 'ACP'
    ,DATAFILETYPE = 'char'
    ,FIRSTROW = 1
    ,TABLOCK
    )

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Look into creating DTS packages, which can be scheduled to run at a time of your choosing.


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
  •