• diegoanckizes (10/9/2013)


    Hi.

    I'm trying to create a file from a query executing xp_cmdshell with BCP command, but it does not finish. No error messages are shown. It keeps executing query forever. I have to end the proccess by windows task manager.

    I did:

    check MSSQLSERVER permissions on folders -> It is ok;

    run the same BCP command on CMD -> worked well;

    run a mkdir on xp_cmdshell (no BCP commands) in SQL SERVER -> worked well.

    Any clue?

    Running on SQL SERVER 2012.

    TY.

    How long does the query take to run when you execute it in SSMS?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)