Lollipop

Welcome to PcCare.com

Import/Export format file 

 

 How to create an import/Export format file.

  • Verify your mdf is accessible via Sql Server Manager  
  • Open a command prompt
    • bcp DatabaseName.dbo.TableName format nul -fc:\temp\FormatFIle.txt -n -S.\SQLEXPRESS -T
  • If the first line in FormatFile.txt contains a 9.0, your running the 2005 version of bcp, otherwise it should be 10.0. On systems installed with both 2005 and 2008, the path environmental variable might require modification. If you want to run the 2008 version of bcp, move "C:\Program Files\Microsoft SQL Server\90\Tools\binn\"  to the end of the path. Restart computer after path change.
  • Bcp format files can fix the following issues
    •  
      There are fewer fields in the data file than columns in the table.
    • There are more fields in the data file than columns in the table.

    • The fields in the data file are in a different order from the columns in the table.

 

 

 

 

DISCLAIMER: It is assumed that users are familiar with the operating system they are using and comfortable with making the suggested changes. PcCare.com will not be held responsible if changes you make cause a system failure.

Please review our Terms of Service and Privacy statement before initiating service or using this site. Microsoft® and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. PcCare Site Map. About Us