ÔÚSQL ServerÀï²é¿´µ±Ç°Á¬½ÓµÄÔÚÏßÓû§Êý
ÔÚSQL ServerÀï²é¿´µ±Ç°Á¬½ÓµÄÔÚÏßÓû§Êý
use master
select loginame,count(0) from sysprocesses
group by loginame
order by count(0) desc
select nt_username,count(0) from sysprocesses
group by nt_username
order by count(0) desc
Èç¹ûij¸öSQL ServerÓû§ÃûtestÁ¬½Ó±È½Ï¶à,²é¿´ËüÀ´×ÔµÄÖ÷»úÃû:
select hostname,count(0) from sysprocesses where loginame='test'
group by hostname
order by count(0) desc
Èç¹ûij¸öSQL ServerÓû§ÃûtestÁ¬½Ó±È½Ï¶à,²é¿´Ëü×îºóÒ»´Î²Ù×÷µÄʱ¼ä·¶Î§·Ö×é:
select convert(varchar,last_batch,111),count(0) from sysprocesses where loginame='test'
group by convert(varchar,last_batch,111)
order by count(0) desc
Èç¹û´ÓÖ÷»ú(www)À´µÄÁ¬½Ó±È½Ï¶à,¿ÉÒԲ鿴ËüµÄ½ø³ÌÏêϸÇé¿ö
select * from??sysprocesses where hostname='www'
Èç¹ûwww»úÆ÷Ö÷ÒªÌṩÍøÒ³·þÎñ,¿ÉÄÜÊÇasp³ÌÐò´¦ÀíÁ¬½Óʱ³öÁËÎÊÌâ, Éú³ÉɱÕâЩ½ø³ÌµÄSQLÓï¾ä:
select 'kill '+convert(varchar,spid) from sysprocesses where hostname='www'
Èç¹ûÕâÑùµÄÎÊÌâƵ·±³öÏÖ,¿ÉÒÔдһ¸ö´æ´¢¹ý³Ìsp_KillIdleSpids.sql,
дһ¸ö×÷Òµ, Ö´ÐÐËü, À´×Ô¶¯É±µô´ÓÖ÷»ú(www)À´µ«ÒѾһÌìûÓÐÏìÓ¦µÄÓû§Á¬½Ó.
?
?
?
--------------------------------
SQL ServerµÄÓû§¼°È¨ÏÞ?
?sysadmin ¿ÉÒÔÔÚ SQL Server ÖÐÖ´ÐÐÈκλ?
serveradmin ¿ÉÒÔÉèÖ÷þÎñÆ÷·¶Î§µÄÅäÖÃÑ¡Ïî ¹Ø±Õ·þÎñÆ÷?
setupadmin ¿ÉÒÔ¹ÜÀíÁ´½Ó·þÎñÆ÷ºÍÆô¶¯¹ý³Ì?
securityadmin ¿ÉÒÔ¹ÜÀíµÇ¼ºÍ CREATE DATABASE ȨÏÞ »¹¿ÉÒÔ¶ÁÈ¡´íÎóÈÕÖ¾ºÍ¸ü¸ÄÃÜÂë?
processadmin ¿ÉÒÔ¹ÜÀíÔÚ SQL Server ÖÐÔËÐеĽø³Ì?
dbcreator ¿ÉÒÔ´´½¨ ¸ü¸ÄºÍ³ýÈ¥Êý¾Ý¿â?
diskadmin ¿ÉÒÔ¹ÜÀí´ÅÅÌÎļþ?
bulkadmin ¿ÉÒÔÖ´ÐÐ BULK INSERT Óï¾ä?
Ïà¹ØÎĵµ£º
window.onerror = function() { return true; };
body {margin:0;overflow:auto;font:normal 14px Verdana;background:#fff;padding:2px 4px 0;}body, p, font, div, li { line-height: 150%;}body, td, th {color:#000000;}.i {width:100%;*width:auto;table-layout:fixed;}pre {white-space: pre-wrap;white-spa ......
ORACLE SQLÓï¾äÓÅ»¯×ܽá
1£© Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
ORACLEµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡£Èç¹ûÓÐ3¸öÒÔÉϵıíÁ¬½Ó²éѯ, Ä ......
Êý¾Ý¿âÖÐÖ÷¼üºÍÍâ¼ü
(1)×÷ÓÃ
¼òµ¥ÃèÊö£º
Ö÷¼üÊǶԱíµÄÔ¼Êø£¬±£Ö¤Êý¾ÝµÄΨһÐÔ£¡
Íâ¼üÊǽ¨Á¢±íÓÚ±íÖ®¼äµÄÁªÏµ£¬·½±ã³ÌÐòµÄ±àд£¡
(2)Éè¼ÆÔÔò
Ö÷¼üºÍÍâ¼üÊǰѶà¸ö±í×é֯Ϊһ¸öÓÐЧµÄ¹ØϵÊý¾Ý¿âµÄÕ³ºÏ¼Á¡£Ö÷¼üºÍÍâ¼üµÄÉè¼Æ¶ÔÎïÀíÊý¾Ý¿âµÄÐÔÄܺͿÉÓÃÐÔ¶¼ÓÐמö¶¨ÐÔµÄÓ°Ïì¡£
±ØÐ뽫Êý¾Ý¿âÄ£Ê ......
SQL ÃüÁî
Õⲿ·Ö°üº¬ÄÇЩ PostgreSQL Ö§³ÖµÄ SQL ÃüÁîµÄÐÅÏ¢£®ÕâÀïµÄ "SQL" ¾ÍÊǸÃÓïÑÔͨ³£µÄº¬Ò壻 ÿÌõÃüÁîµÄÓë±ê×¼ÓйصļæÈÝÐÔµÄÐÅÏ¢¿ÉÒÔÔÚÏà¹ØµÄ²Î¿¼Ò³ÖÐÕÒµ½£®
Table of Contents
ABORT -- Í˳öµ±Ç°ÊÂÎñ
ALTER GROUP -- Ïò×éÖÐÔö¼ÓÓû§»ò´Ó×éÖÐɾ³ýÓû§
ALTER USER -- ¸Ä±äÊý¾ ......