sql - insert query now causing other queries to no longer work -


i ran query on sql server database:

begin transaction; insert [db].[a].[table1] ( [isdeleted], [itemid], [regionid], [deskid], [lastupdated], [lastupdatedby]) select  [isdeleted], [itemid], [regionid], 11, [lastupdated], [lastupdatedby] [db].[a].[table1] deskid = 12;  update [db].[a].[table1] set deskid = 3 deskid = 12; commit transaction; 

there records should have changed said (o rows affected).

i went a:

select * [db].[a].[table1] 

and spinning "executing query" minutes no end in site.

  1. does see wrong first query cause type of lock issue.
  2. also, in state, how out of it?

is first script still executing update statement? if expected selecting rows not yet committed.

if not , apparently idle don't think can have run whole of first script. @ rate seems transaction still open , needs rolled or committed.

you can confirm running select * sys.dm_os_waiting_tasks , looking @ blocking_session_id or if on sql2000 need use exec sp_who2

is in management studio? if go window insert statement , (in case update isn't still in progress) run either rollback or commit desired.

if select text in ssms , run execute selected text. might explain how part of script run.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -