BCP without xp_cmdShell

  • Hi Friends,

    I am developing tool to automate the bcp process. I need to run the bcp query using T-sql, due to security reasons xp_cmdShell has been disabled.Is there any other way to execute bcp using t-sql without using xp_cmdshell

    Thanks,

  • BCP is an external command, xp_cmdshell is pretty much the only way to execute it. I am not sure if you could schedule a SQL job that will a CMD task (not sure if its linked to the disabled xp_cmdshell).

  • You could use CLR instead of xp_cmdshell. You could use a job that calls the command line. Either will work.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • You should also consider running it through an SSIS package.

  • if you are importing data, i think BULK INSERT can do anything that BCP was going to do;

    writing to a file is a different matter.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Pam Brisjar (12/3/2010)


    You should also consider running it through an SSIS package.

    +1

    --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)

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply