April 6, 2006 at 9:06 pm
Dear all,
Yesterday one of my OLAP DBA executed a job which perform ETL processes from Production Server to OLAP Server.After a couple of mins the result was very depressing.
No user can connect to the Production server and those who are connected can do anything as the tables used in ETL processes are locked.
The result is as below (Each table locked is of approx 2 GB)
97 | 9 | 2139011247 | 2 | PAG | 1:3507826 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507825 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515962 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3532459 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515961 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3532456 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3511893 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515960 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3532457 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507824 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3511892 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515963 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3511894 | U | GRANT |
97 | 9 | 0 | 0 | DB | S | GRANT | |
97 | 9 | 2139011247 | 2 | PAG | 1:3511888 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515965 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3532460 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507829 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3511889 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515966 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3532463 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507830 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3532458 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507827 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3511895 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515964 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3532461 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507828 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515928 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3528421 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515929 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515943 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539328 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515941 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539330 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515942 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539329 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3547608 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515938 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539333 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515939 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539332 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515940 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539331 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3524339 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507810 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3524338 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507811 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3524341 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507812 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3524340 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507813 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3524343 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507814 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3524342 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3507815 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515936 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539335 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515937 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539334 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3511890 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515967 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3532462 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3511891 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515952 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539351 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3547615 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515953 | U | GRANT |
97 | 9 | 1076407104 | 1 | PAG | 1:755169 | IX | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539350 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3547614 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515954 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3539349 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3547613 | U | GRANT |
97 | 9 | 2139011247 | 2 | PAG | 1:3515955 | U | GRANT |
Can anyone tell me why it happend like this as sql server should release the lock from the row after update.
from
Killer
April 6, 2006 at 9:16 pm
It will release the lock when the transaction is committed. If you have an update that spans a large number of rows, the server maintains the locks on all of them until it knows it doesn't have to roll the whole update back. If this is all being done in one transaction (or one SQL statement), the locks stay put until you're committed or rolled back.
April 7, 2006 at 12:08 pm
Well, in cases where the 'update' has to span and table scan across huge amount of data its better to split into individual batches.
I believe your update runs through dozens of GB which obviously end up in lock..
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply