Sql Server µÈ´ý״̬˵Ã÷
µÈ´ýÀàÐÍ ËµÃ÷
ASYNC_DISKPOOL_LOCK
µ±³¢ÊÔͬ²½²¢ÐеÄỊ̈߳¨Ö´Ðд´½¨»ò³õʼ»¯ÎļþµÈÈÎÎñ£©Ê±³öÏÖ¡£
ASYNC_IO_COMPLETION
µ±Ä³ÈÎÎñÕýÔڵȴý I/O Íê³Éʱ³öÏÖ¡£
ASYNC_NETWORK_IO
µ±ÈÎÎñ±»×èÖ¹ÔÚÍøÂçÖ®ºóʱ³öÏÖÔÚÍøÂçдÈëÖС£
BACKUP
µ±ÈÎÎñ×÷Ϊ±¸·Ý´¦ÀíµÄÒ»²¿·Ö±»×èֹʱ³öÏÖ¡£
BACKUP_OPERATOR
µ±ÈÎÎñÕýÔڵȴý´Å´ø×°Èëʱ³öÏÖ¡£ÈôÒª²é¿´´Å´ø״̬£¬Çë²éѯ sys.dm_io_backup_tapes¡£Èç¹û×°Èë²Ù×÷ûÓйÒÆð£¬Ôò¸ÃµÈ´ýÀàÐÍ¿ÉÄÜָʾ´Å´ø»ú·¢ÉúÓ²¼þÎÊÌâ¡£
BACKUPBUFFER
ÔÚ±¸·ÝÈÎÎñµÈ´ýÊý¾Ý»òµÈ´ýÓÃÀ´´æ´¢Êý¾ÝµÄ»º³åÇøʱ·¢Éú¡£´ËÀàÐͲ»³£¼û£¬Ö»Óе±ÈÎÎñµÈ´ý×°Èë´Å´øʱ²Å»á³öÏÖ¡£
BACKUPIO
ÔÚ±¸·ÝÈÎÎñµÈ´ýÊý¾Ý»òµÈ´ýÓÃÀ´´æ´¢Êý¾ÝµÄ»º³åÇøʱ·¢Éú¡£´ËÀàÐͲ»³£¼û£¬Ö»Óе±ÈÎÎñµÈ´ý×°Èë´Å´øʱ²Å»á³öÏÖ¡£
BACKUPTHREAD
µ±Ä³ÈÎÎñÕýÔڵȴý±¸·ÝÈÎÎñÍê³Éʱ³öÏÖ¡£µÈ´ýʱ¼ä¿ÉÄܽϳ¤£¬´Ó¼¸·ÖÖÓµ½¼¸¸öСʱ¡£Èç¹û±»µÈ´ýµÄÈÎÎñÕý´¦ÓÚ I/O ½ø³ÌÖУ¬Ôò¸ÃÀàÐͲ»Ö¸Ê¾·¢ÉúÎÊÌâ¡£
BAD_PAGE_PROCESS
µ±ºǫ́´íÎóÒ³¼Ç¼Æ÷ÕýÔÚ³¢ÊÔ±ÜÃâÿ¸ôÎåÃëÒÔÉϵÄʱ¼äÔËÐÐʱ³öÏÖ¡£
BROKER_RECEIVE_WAITFOR
µ± RECEIVE WAITFOR ÕýÔڵȴýʱ³öÏÖ¡£Èç¹ûûÓÐ×¼±¸½ÓÊÕµÄÏûÏ¢£¬Ôòͨ³£³öÏÖ¸Ã״̬¡£
BROKER_TRANSMITTER
µ± SQL Server 2005 Service Broker ´«Êä´úÂëÖгöÏַdz£¶ÌÔݵĵȴýʱ³öÏÖ¡£
BROKER_SHUTDOWN
µ±°´¼Æ»®¹Ø±Õ Service Broker ʱ³öÏÖ¡£¸Ã״̬³öÏÖµÄʱ¼äÓ¦µ±¾¡Á¿¶ÌÔÝ¡£
BROKER_MASTERSTART
µ±Ä³ÈÎÎñÕýÔڵȴý Service Broker µÄÖ÷ʼþ´¦Àí³ÌÐòÆô¶¯Ê±³öÏÖ¡£¸Ã״̬³öÏÖµÄʱ¼äÓ¦µ±·Ç³£¶ÌÔÝ¡£
BROKER_EVENTHANDLER
µ±Ä³ÈÎÎñÕýÔÚ Service Broker µÄÖ÷ʼþ´¦Àí³ÌÐòÖеȴýʱ³öÏÖ¡£³öÏÖʱ¼äÓ¦¸Ã·Ç³£¶ÌÔÝ¡£
BROKER_REGISTERALLENDPOINTS
ÔÚ³õʼ»¯ Service Broker Á¬½Ó¶ËµãµÄ¹ý³ÌÖгöÏÖ¡£³öÏÖʱ¼äÓ¦¸Ã·Ç³£¶ÌÔÝ¡£
BROKER_INIT
µ±³õʼ»¯Ã¿¸ö»î¶¯Êý¾Ý¿âÖÐµÄ Service Broker ʱ³öÏÖ¡£¸Ã״̬²»Ó¦µ±Æµ·±³öÏÖ¡£
BUILTIN_HASHKEY_MUTEX
½ö¹©ÄÚ²¿Ê¹Óá£
CHKPT
ÔÚ·þÎñÆ÷Æô¶¯Ê±³öÏÖÒÔ֪ͨ¼ì²éµãÏ߳̿ÉÒÔÆô¶¯¡£
CLR_AUTO_EVENT
µ±Ä³ÈÎÎñµ±Ç°ÕýÔÚÖ´Ðй«¹²ÓïÑÔÔËÐÐʱ (CLR) Ö´Ðв¢ÇÒÕýÔڵȴýÌØÊâµÄ×Ô¶¯Ê¼þÆô¶¯Ê±³öÏÖ¡£
Ïà¹ØÎĵµ£º
±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Ò»)--sum()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(¶þ)--max()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Èý)--row_number() /rank()/dense_rank()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(ËÄ)--lag()/lead()
ʵ¼ÊÓ¦ÓÃÖÐÎÒÃÇ¿ÉÒÔͨ¹ýsum()ͳ¼Æ³ö×éÖеÄ×ܼƻòÕßÊÇÀÛ¼ÓÖµ£¬¾ßÌåʾÀýÈçÏ£º
......
±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Ò»)--sum()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(¶þ)--max()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Èý)--row_number() /rank()/dense_rank()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(ËÄ)--lag()/lead()
Èç¹ûÎÒÃÇ°´ÕÕʾÀýÏëµÃµ½Ã¿¸ö²¿ÃÅнˮֵ×î¸ßµÄ¹ÍÔ±µÄ¼Í¼£¬¿ÉÒÔÓÐËÄÖÖ·½·¨ÊµÏÖ£ ......
±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Ò»)--αÁÐROWNUMʹÓü¼ÇÉ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(¶þ)--±êÁ¿×Ó²éѯ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Èý)--PackageµÄÓŵã
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(ËÄ)--ÅúÁ¿´¦Àí
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Îå)--µ÷Óô洢¹ý³Ì·µ»Ø½á¹û¼¯
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Áù)- ......
±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Ò»)--αÁÐROWNUMʹÓü¼ÇÉ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(¶þ)--±êÁ¿×Ó²éѯ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Èý)--PackageµÄÓŵã
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(ËÄ)--ÅúÁ¿´¦Àí
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Îå)--µ÷Óô洢¹ý³Ì·µ»Ø½á¹û¼¯
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Áù)- ......
ʹÓþۼ¯Ë÷ÒýÓÅ»¯SQL²éѯ
Ê×ÏÈÈÃÎÒÃÇ×öÒ»¸ö²âÊÔ£¬ÏÖ´´½¨Ò»¸ö±í Ïò±íÖвåÈë²»µÈÊý¾Ý
--DROP TABLE T_UserInfo--------------------------------------
CREATE
TABLE
T_UserInfo
(
Userid
varchar(20),
UserName varchar(20)
)
--
DECLARE
@I INT
DECLARE
@ENDID INT
SELECT
@I =
1
SELECT
@ ......