_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › Msg916WITHEXECUTEAS

Contents

1 覃讌
2 企 蟆曙?
3 願屋


1 覃讌 #

覃讌 916, 譴 14, 1, 襦 usp_LockTest, 譴 0
覲伎 貉ろ碁 覯 覲伎 譯殊牡 "dwa2007"(螳) 一危磯伎 "DM" ′語ろ 給.

2 企 蟆曙? #


--use TestDB
alter proc Test.usp_LockTest
	WITH EXECUTE AS '伎'

 select  convert (smallint, req_spid) As spid, loginame, 
  db_name(rsc_dbid) As db_name,  
  object_name(rsc_objid) As object_name,  
  rsc_indid As IndId,  
  substring (v.name, 1, 4) As Type,  
  substring (rsc_text, 1, 32) as Resource,  
  substring (u.name, 1, 8) As Mode,  
  substring (x.name, 1, 5) As Status  
 from  master.dbo.syslockinfo,  
  master.dbo.spt_values v,  
  master.dbo.spt_values x,  
  master.dbo.spt_values u,  
  master.sys.sysprocesses z
 where   master.dbo.syslockinfo.rsc_type = v.number  
   and v.type = 'LR' 
   and master.dbo.syslockinfo.req_status = x.number  
   and x.type = 'LS'  
   and master.dbo.syslockinfo.req_mode + 1 = u.number  
   and u.type = 'L' 
   and convert (smallint, req_spid) = z.spid
	and z.loginame = 'ろ'
 order by spid

企 蟆曙 譟磯 讌讀企.. '伎' 襷蟠碁磯 ..
TestDB master DB襯 蠏狩 螳ル 襦 伎 蠏碁郁碓..

3 願屋 #

ALTER DATABASE TestDB SET TRUSTWORTHY on;

伎朱 ..
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

"覩語" 手 襷 覦 覦朱慨覃伎 . (ろ 碁狩)