我在sql 2005中执行 update voyageno set v_code=isnull(v_code,'') 时发生错误,系统提示:
“The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users. Ask the database administrator to check the lock and memory configuration for this instance, or to check for long-running transactions.”
这是为什么啊,请高手指导赐教啊!!!!

解决方案 »

  1.   

    update voyageno set v_code='' where v_code is null
      

  2.   

    SET LOCK_TIMEOUT -1--无限制锁定
      

  3.   


    效果是一样的,实际不一样,前面的更新所有的记录,老乌龟的是只更新为NULL的记录
      

  4.   

    Update voyageno Set v_code='' where v_code is null
      

  5.   

    with (nolock)
      

  6.   

    1.首先运行那条更新语句
    2.查看锁信息           select * from sys.sysprocesses with (nolock)
               where blocked>0
    3.将被查询的数据的列blocked就是被阻塞的进程
    4.查看进程在做什么: dbcc inputbuffer (spid)
    5.根据锁的情况,决定是否杀掉进程 kill  spid
      

  7.   

    select @@LOCK_TIMEOUT--查看锁的设置