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

ÔÚWindows2003Ï°²×°SQL Server 2000

     ÔÚwindows2003ÏÂÃæ°²×°SQL Server2000£¬»áÌáʾwindows²»Ö§³ÖSQL Server2000µÄ°æ±¾£¬°²×°ºó£¬ÔÚ±¾»úÊÇ¿ÉÒÔÕý³£Ê¹Óõģ¬µ«ÊÇÎÞ·¨Á¬½Óµ½ÆäËûSQL Server2000µÄ·þÎñÆ÷£¬Ò²ÎÞ·¨Í¨¹ýÆäËû»úÆ÷ÉϵÄSQL Server2000·ÃÎÊ£¬±ØÐë°²×°SQL Server2000sp3»òsp4²¹¶¡²Å¿ÉÒÔ¡£ÆäʵÓÃSQL Server2005¾ÍûÕâôÂé·³ÁË¡£


Ïà¹ØÎĵµ£º

ÌØÊâSQLÓï¾ä

1.²éѯÁ¬½Óµ½Ä³Êý¾Ý¿âµÄÁ¬½ÓÊý
   select   count(*)   as   Á¬½ÓÊý   from   master..sysprocesses   where   db_name(dbid)='Êý¾Ý¿âÃû' ......

Asp.NetÖÐsql server 2000/2005 Á¬½Ó×Ö·û´®


http://zhanglei1286.blog.163.com/blog/static/1895797120091112113019600/
ÔÚºǫ́´úÂëÀ
SQL 2000:
static string StrConn = "server=.;uid=sa;pwd=sa;database=MyCUDS";
SQL2005:
con = new SqlConnection(@"Server=.\SQLExpress;Database=db_CMS;Persist Security Info=True;User ID=sa;Password=Masslong"); ......

½²½âMSSQLÊý¾Ý¿âÖÐSQLËø»úÖƺÍÊÂÎñ¸ôÀ뼶±ð

Ëø»úÖÆ
NOLOCKºÍREADPASTµÄÇø±ð¡£
1. ¿ªÆôÒ»¸öÊÂÎñÖ´ÐвåÈëÊý¾ÝµÄ²Ù×÷¡£
BEGIN TRAN t
INSERT INTO Customer
SELECT 'a','a'
2. Ö´ÐÐÒ»Ìõ²éѯÓï¾ä¡£
SELECT * from Customer WITH (NOLOCK)
½á¹ûÖÐÏÔʾ"a"ºÍ"a"¡£µ±1ÖÐÊÂÎñ»Ø¹öºó£¬ÄÇôa½«³ÉΪÔàÊý¾Ý¡£(×¢:1ÖеÄÊÂÎñδÌá½») ¡£NOLOCK±íÃ÷ûÓжÔÊý¾Ý±íÌí¼Ó¹²Ï ......

sqlµ÷ÓÅÖ® Ñ°ÕÒÎÒÃÇ×î¸ÐÐËȤµÄÓï¾ä

Tuning an Application / Reducing Load
If your whole application is performing suboptimally, or if you are attempting to
reduce the overall CPU or I/O load on the database server, then identifying
resource-intensive SQL involves the following steps:
1. Determine which period in the day you would ......

SQl Cookbookѧϰ±Ê¼Ç

1.select  * from A where a.a='a';
  Ö´ÐÐ˳Ðò ÏÈÖ´ÐÐ from ÔÚÖ´ÐÐ where ÖеĶ«Î÷ £¬×îºóÖ´ÐÐ select
2.ÁÐÖµÁ¬½Ó db2 oracle ||  , mysql concat(column1,'sss',column2) sqlServlerʹÓÃ+Á¬½Ó;
3. case when  ±í´ïʽ then ''
           ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ