SP executed around 6 mins in Execute SQL Task but still executing from past 30 mins in SSMS.
I have huge SP which is executed around 6 mins in Execute SQL Task in my SSIS package. However, It's still executing from past 30 mins in SSMS query window. Any thoughts? Please
July 19th, 2012 5:17pm
Any thoughts please ?
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 6:07pm
Hi,
Is it the same environment SSMS is running on as the SSIS package? If so, please check if you have any open transactions or locks in the database table.
Use DBCC OPENTRAN to check for any open transactions
Use sp_lock for the lock details.
Let me if this does not work.
Regards,
Vinaya
July 19th, 2012 8:58pm
I have huge SP which is executed around 6 mins in Execute SQL Task in my SSIS package. However, It's still executing from past 30 mins in SSMS query window. Any thoughts? Please
The likely cause is different execution plans, perhaps due to different connection SET options. See
http://www.sommarskog.se/query-plan-mysteries.html. Erland's article is both long and thorough.
Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 11:27pm
I have huge SP which is executed around 6 mins in Execute SQL Task in my SSIS package. However, It's still executing from past 30 mins in SSMS query window. Any thoughts? Please
The likely cause is different execution plans, perhaps due to different connection SET options. See
http://www.sommarskog.se/query-plan-mysteries.html. Erland's article is both long and throrough.
Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/
July 19th, 2012 11:30pm
@Vinay...
Yes same environment. There are no open transactions and the database isolation level is read committed which means no query will lock any resources,Under this level, there will be no locks on the database, not even shared locks right ?
@Dan... That link is not working.
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2012 10:50am
@Vinay...
Yes same environment. There are no open transactions and the database isolation level is read committed which means no query will lock any resources,Under this level, there will be no locks on the database, not even shared locks right ?
@Dan... That link is not working.
It looks like the period at the end was included in the url. I corrected it so the link should work now.Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/
July 20th, 2012 6:28pm
Hi,
Finally how much time did it take? If there is no open transaction or locks, it could be the execution plan as Dan suggested.
Regards,
Vinaya
Free Windows Admin Tool Kit Click here and download it now
July 22nd, 2012 7:45pm
@Dan...The link is working now. Thanks
@Vinay... It's running forever.
July 23rd, 2012 5:11pm
Hi,
Did you ever try running it again using SSIS, let me know what result you get...
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2012 10:57pm
Yes, I did. That SP is executed around 7 mins in SSIS.
July 24th, 2012 10:43am
Did you check if the parameters in both the scenarios are the same?
Free Windows Admin Tool Kit Click here and download it now
July 25th, 2012 11:34pm