SQL Server 2008 bcp export compatibility with SQL Server 2005

  • I have a process that runs stored proc that executes a bcp command to export the contents of a collection of tables in a database via a non-XML format as follows. The files are then transferred via FTP to another server and imported into another read-only copy of the data.

    master..xp_cmdshell 'bcp ExportTable format nul -f C:\Export\Accounts.fmt -S USSXP6720 -N -U sa -P ******** ','NO_OUTPUT'

    The machine exporting the data has recently been updated to SQL Server 2008. The machine needing to import the data is still on SQL Server 2005. The import process fails due to the difference in versions in the fmt file.

    I’ve tried setting the export to use the –V parameter to export it in an older file format without success. Am I doing something wrong? Suggestions? Upgrading the 2005 server is currently not an option.

    master..xp_cmdshell 'bcp ExportTable format nul -f C:\Export\Accounts.fmt -S USSXP6720 -N -U sa -P ******** -V 90','NO_OUTPUT'

  • The only difference is the version row.

    See http://msdn.microsoft.com/en-us/library/ms191479.aspx

    Change the version row to 9.0 and you can use if with both versions.


    N 56°04'39.16"
    E 12°55'05.25"

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

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