I created DTS package how to call that package from SP

  • HI..

    Please can u help me how to call the DTS package from a stored procedure.

    Please help me in this regard.is there any online material .

  • Two ways I can think of.

    1)  Create a SQL job that executes your DTS package and start the job by executing the sp_start_job stored procedure:

    EXEC msdb.dbo.sp_start_job @job_name = 'your job name'

     

    2) Execute the xp_cmdshell stored procedure and have it launch the DTSRUN utility:

    xp_CmdShell 'DTSRUN /S Your_Server_Name /N Your_DTS_Package_Name /E'

     

  • hi

    Erik Kutzler

    i tryed in  both the ways

    i)EXEC msdb.dbo.sp_start_job @job_name = 'your job name'

    i think i cont use this becouse every month my Execl sheet will be updated with new data this will make every time i should create DTs package.

    ii)in secound case i am getting an error message In output

    DTSRun:  Loading...

     

    Error:  -2147467259 (80004005); Provider Error:  17 (11)

       Error string:  [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

       Error source:  Microsoft OLE DB Provider for SQL Server

       Help file:  

       Help context:  0

     

    NULL

     

    plz help me...here scenario is every month i get new excel sheet that data i should updated into the data base table. Give me any suggestion

     

     

  • You say in your scenario  you get new data each month, do you get a new file or you get new data added into a file, base your update on dates, you could write a SQL script to look for data that is new, best thing to do is transfer all the data into a table sort by date and then check for data thats new based on a date..

Viewing 4 posts - 1 through 3 (of 3 total)

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