SQL Server Performance

BCP

Discussion in 'General DBA Questions' started by avmreddy17, Dec 6, 2002.

  1. avmreddy17 New Member

    Hi
    BCP runs Faster when I try to run it from the Command Prompt...But If I try to run it from the Query Analyser using xp_cmdshell...it slow..

    Why is that??

    Thanks,
    Venu
  2. bradmcgehee New Member

    This is because when BCP is run through xp_cmdshell, it has additional overhead of the xp_cmdshell code, and when it runs from the command prompt, that overhead is eliminated. Always, for best performance, run BCP through the command prompt.


    ------------------
    Brad M. McGehee
    Webmaster
    SQL-Server-Performance.Com

Share This Page