How to Create Format File w/ BCP

  • Hi,

    According to this web site SQL Server 2005 Integration Services - Part 45 - Bulk Insert Task and Format Files

    You can create format file with bcp like this:

    bcp AdventureWorks.HumanResources.myTeam format nul -c -t , -f myTeam.Fmt -T

    or like this:

    bcp AdventureWorks.HumanResources.myTeam format nul -c -t , -f myTeam.XML -x -T

    Still unable to create format file with bcp cmd; tried the following:

    bcp [MyWorkstation\MyLocalDB].AdventureWorks.HumanResources.myTeam format nul -c -t , -f \\MyWorkstation\c$\data\myTeam.Fmt -T

    bcp AdventureWorks.HumanResources.myTeam format nul -c -t , -f \\MyWorkstation\c$\data\myTeam.Fmt -T

    bcp

    [MyWorkstation\MyLocalDB].AdventureWorks.HumanResources.myTeam format nul -c -t , -f \\SomeServer\SomeFolder\myTeam.Fmt -T

    And get this err:

    SQLState = 08001, NativeError = 17

    Error = [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not ex

    ist or access denied.

    SQLState = 01000, NativeError = 2

    Warning = [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Conn

    ect()).

    I"ve local admin acces on my workstation and db.

    Any ideas?

    TIA!

  • nvm ... I found some good example on this site...

Viewing 2 posts - 1 through 1 (of 1 total)

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