BCP shell Command is not writing file in my server. and I have given all the rights to the folder path. But Same command is working fine in another server. is there any server or SQL Server permission required for this?? please suggest
select @cmd = ' bcp "select edi_text from scmdb..swo_edihold_file_data_tmp order by sequenceno" queryout ' + @filename + ' -c -r\n -t"|" -S' + @servername +' -Uusername -Ppassword'
exec master..xp_cmdshell @cmd,no_output