dtexec delay validation true

  • I have a SSIS package that loads a flat file.  It runs fine on my laptop but on my virtual machine I have to set DelayValidation to true otherwise it looks like it loads the data then removes it from the final table.  On the virtual machine if I run the package from the Visual Studio screen (with DelayValidation  true) everything processes correctly.  If I try to execute it from a procedure it validates at the end and seems to remove the data from the final table.

    Question.  How would I add DelayValidation  = true to this scropt?  Thanks.

    DECLARE @cmd varchar(1000), @PathSSIS varchar(1000)

    SET @PathSSIS = 'c:\test\ImportOnly\ImportOnly\package.dtsx'
    DECLARE @FileNamed varchar(1000)
    SET @FileNamed = 'c:\test\MyFile_20190101'

    SELECT @cmd = 'dtexec /FILE "' + @PathSSIS + '"'
    SELECT @cmd = @cmd + ' /SET \Package.Variables[User::FileNamed].Properties[Value];"' + @FileNamed + '"'

    EXEC master..xp_cmdshell @cmd

     

     

  • Yikes, disregard the question; made a simple mistake.

Viewing 2 posts - 1 through 1 (of 1 total)

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