Running Disconnected Stored procedures

  • Is there a way to run a disconnected stored proc using ADO?  I load data using a scripting language that calls a stored proc with global variables to assign the database and text files to load.  Some of these files are quite large and could take up to half an hour to load.  What I want to do is connect, send the command and then disconnect without the stored proc stopping or rolling back because I disconnected.    I can then come back later and check the exception files to ensure the data loaded properly.  I'm open to any ideas out there.

    Thanks

     

    Marvin

    Marvin Dillard
    Senior Consultant
    Claraview Inc

  • maybe you'd be better off using DTS bulk insert task, and just start that instead. You wouldn't hog your application for hours that way...

  • put the sp call logic in a JOB

    use sp_start_job (which run asynchronuously)

    check stuff when job is finished

    hth


    * Noel

  • Noel

    Never heard of sp_start_job. But I will give that a try.  Thanks

     

    Marvin

    Marvin Dillard
    Senior Consultant
    Claraview Inc

  • Noel

    I found sp_start_job, however, it didn't mention how to pass global variables into the procedure within the job.  Do you have any ideas on that?

    Thanks

    Marvin

    Marvin Dillard
    Senior Consultant
    Claraview Inc

  • Or, run the proc from a thread (in whatever program it is being called from).

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

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