dtsrun utility

  • I am trying to run the dts package using dtsrun utility inside another applicaton.When executing the package in the Query analyser the last row value is showing as NULL due to which my application is crashing.Does anyone know why it is giving the NULL value for the last row,it is happening will all the DTS packages.

    Thanks,

    MKumari

  • I remember this from a prvious thread. The problem was the process outputing the file put a carriage return on the last row so DTS saw that as an extra row. When it hit that row blam like your issue. Open the file and see if there is an extra row. Sorry I cannot find the other thread but this I believe was the problem

    Q259304 - FIX: DTS Fails to Import Last Row If There is No Last Row Terminator

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q259304

  • Thankyou for your input.

    I am sorry for not puting my question clearly.I am not having the problem running from the DTS Design view or from the Query analyser but when I am trying to execute it from the application it is causing the problem.I am not exporting the data into a file,It is importing the data from excel file and updating couple of tables.I am pasting the output after executing the DTS Package from the Query Analyser.The last row is NULL,Not sure why it is doing that.

    DTSRun: Loading...

    DTSRun: Executing...

    DTSRun OnStart: DTSStep_DTSExecuteSQLTask_5

    DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_5

    DTSRun OnStart: DTSStep_DTSDataPumpTask_1

    DTSRun OnProgress: DTSStep_DTSDataPumpTask_1; 1000 Rows

    DTSRun OnFinish: DTSStep_DTSDataPumpTask_1

    DTSRun OnStart: DTSStep_DTSDataPumpTask_2

    DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1

    DTSRun OnProgress: DTSStep_DTSDataPumpTask_2; 1000 Rows

    DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1

    DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2

    DTSRun OnFinish: DTSStep_DTSDataPumpTask_2

    DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2

    DTSRun OnStart: DTSStep_DTSExecuteSQLTask_3

    DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_3

    DTSRun OnStart: DTSStep_DTSExecuteSQLTask_4

    DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_4

    DTSRun: Package execution complete.

    NULL

  • No idea yet, I have not tried this. Can you post an example of what the application code so I can see what you are doing. Or maybe some else has tried and gotten this.

  • We customise a CRM package for associations (iMIS) and the application gives the provision for executing the stored procedures. Some how it is unable to recognise that the execution of the Stored procedure is completed and crashing the application.

  • Ok, so let me make sure I understand. You app runs a stored procedure, this procedure in turn runs the package?

  • correct.

  • Ok, I cannot test tonight but will try to in the morning when at my COmputer at work.

  • Thankyou Antares686 for your help.

  • What is the stored procedure that is executing the DTS package?

    The NULL return is probably coming from it.

    Thanks

    Phill Carter

    --------------------
    Colt 45 - the original point and click interface

  • Ok did check out that a NULL was in the output. Not sure how you app works but if all you are concerned with is the final output then this is how I got around the problem and be rid of the NULL.

    CREATE PROC ip_TestProc

    AS

    SET NOCOUNT ON

    CREATE TABLE #tmpOut (

    [output] [varchar] (8000)

    )

    INSERT #tmpOut EXEC master..xp_cmdshell 'DTSRun /~Z0xABA31C25F76158DB7131C48A1B51A976150BDA176FB1A9EA6996E44C55B098ECC0C85DFD3B976729ADC5024CE24896373768A070D33953965FB108251E831E27E301F4326A047CDDFC8F6EEA36A5F4AC0AABE4 '

    SELECT * FROM #tmpOut WHERE output IS NOT NULL

    That is the best I was able to come up with.

  • Thankyou Antares it works.

Viewing 12 posts - 1 through 11 (of 11 total)

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