Having problem using BCP via xp_cmdshell.
I exported the table data to a file as .dat but when I try to import the file to a new table, I am getting the below error. The SQL Server service and the account that I am using has full access on that drive. I am not sure why I am still having issues.
Error = [Microsoft][SQL Server Native Client 10.0] Unable to open BCP host data-file.
Here are the scripts that I am running.
exec master..xp_cmdshell 'BCP database.dbo.tabel OUT d:\tabledata.dat -T -c' exec master..xp_cmdshell 'BCP database.dbo.tabelnew IN d:\tabledata.dat -T -c'