I have one question pls help out in this.
I am exporting file from table using BCP ,it will work properly if run through query or procedure and if i schedule job for this it will not work properly and if path does not exists it will not show any error in sql server agent error log due to this i am not able to identify the error and assume that it run successfully.
i am using given query for this.
DECLARE @cmdline VARCHAR(4000)
SELECT @cmdline = '"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\bcp.exe" kenya_airtel.dbo.tblalbum out F:\DBbackup1\aks1.txt -c -T'
EXEC master..xp_cmdshell @cmdline