BCP in

  • Nope... I mean you can if you want but BULK INSERT may be a better option. It's very similar to BCP except that it doesn't require the use of xp_CmdShell. You only need to have bulk admin privs.

    Its an option, how does this work?

  • jez.lisle (10/27/2010)


    Nope... I mean you can if you want but BULK INSERT may be a better option. It's very similar to BCP except that it doesn't require the use of xp_CmdShell. You only need to have bulk admin privs.

    Its an option, how does this work?

    Pretty much like Bulk Insert but without the trip through xp_CmdShell. Have a look at it in Books Online.

    --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)

  • The Meannig Of BCP is Bulk Copy Program ,Are u using SQlcmd or powershell for bulk insert ?

  • Soory To all For the format of writeing in the previous post.

  • Ivan Mohapatra (10/27/2010)


    Soory To all For the format of writeing in the previous post.

    Ivan, that's okay. Just please don't use text-speak like "u" and "r" in these forums. When the abbreviations compound, it makes it difficult to understand what you're saying. Could you repost or edit your original post so I can understand it?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Ivan Mohapatra (10/27/2010)


    The Meannig Of BCP is Bulk Copy Program ,Are u using SQlcmd or powershell for bulk insert ?

    I would be using SSMS to run this

  • Jez,

    So you'd be doing this manually instead of scheduled as an automatic job?

    Have you tried the Import / Export Wizard? It can import flat files.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Brandie Tarvin (10/28/2010)


    Jez,

    So you'd be doing this manually instead of scheduled as an automatic job?

    Have you tried the Import / Export Wizard? It can import flat files.

    Where I'm working I can only use SQL Server Express... This version I have doesnt have the Import/Export Wizard and we dont have Visual Studio to create any SSIS packages. So I'm stuck and this is why I have been looking at using BCP to get text files into SQL server

  • I have been googling Bulk Inserts and found this below... I have tried and it seems to work very well at the moment.

    http://www.sqlteam.com/article/using-bulk-insert-to-load-a-text-file

    Thanks for all the help getting me to this point.

  • jez.lisle (10/28/2010)


    I have been googling Bulk Inserts and found this below... I have tried and it seems to work very well at the moment.

    http://www.sqlteam.com/article/using-bulk-insert-to-load-a-text-file

    Thanks for all the help getting me to this point.

    That's fine but, as many articles are prone, it's missing a huge amount of information on other VERY useful options available in BULK INSERT. Trust me... look it up in Books Online (the free help system/documentation that comes with SQL Server). You won't regret it. 😉

    --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)

  • You are missing a space between the server name and -T

Viewing 11 posts - 16 through 25 (of 25 total)

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