Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

½â¾öSQL ËÀËøµÄÓï¾ä

ALTER     procedure [dbo].[sp_lock_check]
@spid1 int = NULL,               
@spid2 int = NULL               
as
set nocount on
if @spid1 is not NULL
begin
        select         convert (smallint, req_spid) As spid,
                loginame=rtrim(loginame),hostname ,t2.name,
                rsc_dbid As dbid,
                rsc_objid As ObjId,
                rsc_indid As IndId,
                substring (v.name, 1, 4) As Type,
                substring (rsc_text, 1, 16) as Resource,
                substring (u.name, 1, 8) As Mode,
                substring (x.name, 1, 5) As Status
        from         master.dbo.syslockinfo(nolock),
                master.dbo.spt_values v(nolock),
                master.dbo.spt_values x(nolock),
                master.dbo.spt_values u(nolock),
                master.dbo.sysprocesses t1(nolock),
                sysobjects t2(nolock)
        where   master.dbo.syslockinfo.rsc_type = v.number
                        and v.type = 'LR'
                        and master.dbo.syslockinfo.req_status = x.number
                   


Ïà¹ØÎĵµ£º

±ê×¼µÄ SQL µÄ½âÎö˳Ðò

±ê×¼µÄ SQL µÄ½âÎö˳ÐòΪ:
(
1
).
from
×Ó¾ä, ×é×°À´×Ô²»Í¬Êý¾ÝÔ´µÄÊý¾Ý
(
2
).
WHERE
×Ó¾ä, »ùÓÚÖ¸¶¨µÄÌõ¼þ¶Ô¼Ç¼½øÐÐɸѡ
(
3
).
GROUP

BY
×Ó¾ä, ½«Êý¾Ý»®·ÖΪ¶à¸ö·Ö×é
(
4
).ʹÓþۺϺ¯Êý½øÐмÆËã
(
5
).ʹÓÃ
HAVING
×Ó¾äɸѡ·Ö×é
(
6
).¼ÆËãËùÓеıí´ïʽ
......

SQL SERVER 2005¿ªÆôxp_cmdshellµÄ·½·¨


SQL Server ÒÑ·â鎖Ôª¼þ 'xp_cmdshell' µÄ ³ÌÐò 'sys.xp_cmdshell'
Ö®´æÈ¡£¬Òò為´ËÔª¼þÒÑ經ÓÉ´ËËÅ·þÆ÷µÄ°²È«ÐÔ組態關閉¡£Ïµ統¹ÜÀí員¿ÉÒÔʹÓà sp_configure 來啟Óà 'xp_cmdshell'
µÄʹÓá£ÈçÐèÓÐ關啟Óà 'xp_cmdshell' µÄ詳಄ ......

v$sql,v$sqlarea,v$sqltextÓÐʲôÇø±ð

http://inthirties.com:90/thread-1202-1-1.html
v$sqltext
´æ´¢µÄÊÇÍêÕûµÄSQL,SQL±»·Ö¸î
SQL> desc v$sqltext
Name Null? Type
----------------------------------------- -------- ----------------------------
ADDRESS ......

linq to sql ÖдÓdbmlÎļþÖд´½¨Êý¾Ý¿â

        ½ñÌìºÜÓôÃÆ,ʵÑéÊҵķþÎñÆ÷¶«Î÷¶¼Ã»ÓÐÁË,¶øÎÒµÄÊý¾Ý¿âÓÖÔÚÄÄÀï,ÎÒÓÖûÓб¸·Ý,°ÑÎÒÒÖÓôµÄÒªÃü,ÐÒ¿÷ÎÒÓõÄlinq to sql.×ÐϸÏëÏë,ËûµÄdbmlÎļþ»ù±¾°üº¬ÁËÊý¾Ý¿âµÄËùÓÐÄÚÈÝ,ËùÒÔ,Ò»¶¨Óа취´ÓdbmlÎļþÖд´½¨Êý¾Ý¿â!
        Ñо¿ÁËÒ»¶ÎÊ ......

SQL ServerÊý¾Ý¿âά»¤¼Æ»®µÄʵʩ²½Ö裨תÌû£©

¡¡ÎÒ¹«Ë¾ÔÚ×齨¾ÖÓòÍøʱ£¬¿¼Âǵ½ÉÌÒµÆóÒµµÄÌص㣬×Ðϸ¿¼Á¿Á˹º¡¢Ïú¡¢´æÈý´ó»·½ÚÖз¢ÉúµÄ¸÷ÖÖÊý¾Ý¼°Æä´æ´¢ÎÊÌâºó£¬Ñ¡¶¨ÁËÒÔWindows 2000 ServerΪ²Ù×÷ϵͳ£¬SQL Server 2000ΪÊý¾Ý¿âƽ̨À´´î½¨¾ÖÓòÍøµÄÓ¦ÓÃϵͳµÄÈí¼þƽ̨£¬ÒÔÍøÏßΪÔØÌ彫¹º¡¢Ïú¡¢´æµÈºËÐIJ¿ÃŵļÆËã»úͨ¹ý¾ÖÓòÍøƽ̨½ôÃܵØÁ¬½ÓÆðÀ´¡£ÕâÑù£¬¸÷¸öºËÐIJ¿ÃÅÿÌì ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ