Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 SQL Server 2008 bcp export compatibility with 2005

Author  Topic 

jasonk
Starting Member

1 Post

Posted - 2009-07-17 : 16:22:01
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'

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-07-17 : 17:03:01
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.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -