Tiempo de espera del comando SQL

In my asp.net, I creaate a SqlConnection y SqlCommand ligado a esto SqlConnection. Entonces configuro el CommandTimeout propiedad de la SqlCommand to 1 hour. This SqlCommand will call a stored procedure in the database. Inside the stored procedure, I will run a SSIS using the following command.

master..xp_cmdshell 'dtexec /ISSERVER "' + @PackageName + '" /Par "$ServerOption::SYNCHRONIZED(Boolean)";True'

This SSIS can take quite a long time. If the SSIs takes more than 1 hour, then the SqlCommand will timeout. But then what happens to the SSIS? Will the package still run until finish or will it be stopped when it is timeout? And how about the result? Will it be rolled back like a transaction or how do I check the data integrity?

preguntado el 12 de junio de 14 a las 10:06

Have you tried setting a shorter timeout to see what happens? Would it be possible (assuming the SSIS package continues to run if the connection times out) to simply use the connection to start the package, and then check periodically to see if the package finished (maybe have the package write to a table the results of its run)? Just spitballing here as I haven't worked with SSIS. -

1 Respuestas

Ok, I've tried and it seems that the SSIS will continue, despite the web page saying it is timeout. Checking on the Integration Services Catalogs > "Package" > Reports > All Executions show its status as 'Running'. And I also see more data inserted to my database. Then after waiting for some time, the status becomes 'Succeeded'.

Respondido el 12 de junio de 14 a las 10:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.