Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shezad
Starting Member
32 Posts |
Posted - 2010-12-30 : 00:40:16
|
| Hi Guys.I am having some very weird problem, problem is that I m executing one stored procedure which contain one simple update statement whenever I block that statement procedure work successfully as well as application if I keep that statement then both hang.for example table name is abc some time I can't do simple update statement also on that table query analyzertime went to 1 hour and when I try to delete triggers on that table again enterprise manager also hangbut I can delete triggers on other table as well as update statement also work How to solve this problem any advice |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-30 : 01:10:46
|
| You probably have an open transaction.Maybe something is creating a new connection and that connection is trying to update the locked data.It sounds like it's something to do with the triggers that is causing the issue.It will need to lock the table to delete the trigger so if there's an open transaction locking it then it will hang.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
shezad
Starting Member
32 Posts |
Posted - 2010-12-30 : 01:11:58
|
| Hi can you please show me how to do this dropping the table and re-creating will help me |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-30 : 01:15:33
|
| You want to drop the table and lose the data in it?==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
shezad
Starting Member
32 Posts |
Posted - 2010-12-30 : 01:18:03
|
| I m trying to execute this on development server I took that copy of that table and trigger do u think it will help me if not not that how to lock the table for that update statmement |
 |
|
|
shezad
Starting Member
32 Posts |
Posted - 2010-12-30 : 01:25:47
|
| what i did copy that table to other database and run that update statement and it is working the new copied table does not have trigger so do u thinkit is something related to triggers |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-30 : 01:47:24
|
| You probably need to look at what the triggers are doing.Have you looked to check what is being blocked?==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|