Loading CSV files into SQL Server Database tables

  • Does any one know of an open source tool that I can use to load data from csv files into sql server database tables? I am trying to load database into SQL Server 2012 Database tables. I do not have licence to SSIS. Any help will be appreciated.

    I also want to automate the process....

  • What version/edition of SQL Server are you running?

    You could use PowerShell...

    Tim Smith

    Automating Flat File Imports Using Powershell[/url]

  • The bulk insert statement can be used within regular t-sql

    https://msdn.microsoft.com/en-us/library/ms188365.aspx

    And the import \ export wizard can be used without a licensed install of SSIS, at least I am pretty sure it can be.

    MCITP SQL 2005, MCSA SQL 2012

  • Also I forgot BCP:

    https://msdn.microsoft.com/en-us/library/ms162802.aspx

    MCITP SQL 2005, MCSA SQL 2012

  • RTaylor2208 (12/12/2016)


    And the import \ export wizard can be used without a licensed install of SSIS, at least I am pretty sure it can be.

    Yes, but you may not be able to save the package file - I'm not sure. If you can't, you'd need to go through the wizard every time you wanted to load the data.

    My question is this: why not run SSIS on the already licensed SQL Server 2012 server? Unless you're moving huge amounts of data or processing very complex transformations, you shouldn't notice any difference in performance.

    John

  • SQL Server Data Tools is a freely available download for SQL Server - you don't need Integration Services to create and execute packages within the development tool.

    You do need Integration Services installed on a server somewhere if you want to deploy those packages and automate the execution of those packages.

    Note: if you have SQL Server installed you can add Integration Services on that server and it is covered under the same license. I would not do that on an OLTP production system but if you have a data warehouse system that is a very good place to install the service.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • As RTaylor2208 suggested and unless they're poorly formed, just use BULK INSERT to import CSV files. It's one of the fastest loaders there is for SQL Server. With just a little ingenuity, you can even load poorly formed files.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thank you all for your replies; definitely Bulk Insert.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply