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

Ô¶³ÌÁ¬½Ósql server 2000·þÎñÆ÷µÄ½â¾ö·½°¸

Ô¶³ÌÁ¬½Ósql server 2000·þÎñÆ÷µÄ½â¾ö·½°¸
                                        ----ת×Ô£º·ÉºüСÎÝ
ÓÉÓÚÌض¨ÐèÇó£¬×î½üʵÑéÊÒÐèÒªÔ¶³ÌÁ¬½ÓÍâµØµÄsql server 2000·þÎñÆ÷£¬×ʼÔõôÁ¬Ò²Á¬²»ÉÏ£¬³öÏÖÁ˺ܶàÎÊÌ⣬µ«ÊÇÔÚ½ñÌìÉÏÎ磬½èÓÃʵÑéÊҵIJâÊÔÌõ¼þ£¨Ò»¸ö¹«ÍøIP£¬Á½¸ö½ÌÓýÍø¾²Ì¬IP£©£¬ÖÕÓÚµ÷ÊÔͨ¹ý£¬Ò²ËãÊÇÍê³ÉÁËÀÏʦµÄÈÎÎñ£¬ÔÚÕâÀïдÏÂ×Ô¼ºµÄÐĵ㬲ο¼Á˺ܶàÍøÉϵÄÎÄÕºÍÂÛ̳ÀïµÄÎÊÌ⣬ϣÍû¶ÔÓдËÐèÒªµÄÓаïÖú¡£²»ÍêÉÆÖ®´¦£¬Ò²ÇëÁôÑÔ¡£·Ï»°ÉÙ˵£¬½øÈëÖ÷Ìâ¡£
²½Ö裺
Ò» ¿´ping ·þÎñÆ÷IPÄÜ·ñpingͨ¡£
   Õâ¸öʵ¼ÊÉÏÊÇ¿´ºÍÔ¶³Ìsql server 2000·þÎñÆ÷µÄÎïÀíÁ¬½ÓÊÇ·ñ´æÔÚ¡£Èç¹û²»ÐУ¬Çë¼ì²éÍøÂ磬²é¿´ÅäÖ㬵±È»µÃÈ·±£Ô¶³Ìsql server 2000·þÎñÆ÷µÄIPƴдÕýÈ·¡£
¶þ ÔÚDos»òÃüÁîÐÐÏÂÊäÈëtelnet ·þÎñÆ÷IP ¶Ë¿Ú£¬¿´ÄÜ·ñÁ¬Í¨¡£
Èçtelnet 202.114.100.100 1433
ͨ³£¶Ë¿ÚÖµÊÇ1433£¬ÒòΪ1433ÊÇsql server 2000µÄ¶ÔÓÚTcp/IPµÄĬÈÏÕìÌý¶Ë¿Ú¡£Èç¹ûÓÐÎÊÌ⣬ͨ³£ÕâÒ»²½»á³öÎÊÌ⡣ͨ³£µÄÌáʾÊÇ“……ÎÞ·¨´ò¿ªÁ¬½Ó,Á¬½Óʧ°Ü"¡£
Èç¹ûÕâÒ»²½ÓÐÎÊÌ⣬Ӧ¸Ã¼ì²éÒÔÏÂÑ¡Ïî¡£
   1 ¼ì²éÔ¶³Ì·þÎñÆ÷ÊÇ·ñÆô¶¯ÁËsql server 2000·þÎñ¡£Èç¹ûûÓУ¬ÔòÆô¶¯¡£
   2 ¼ì²é·þÎñÆ÷¶ËÓÐûÆôÓÃTcp/IPЭÒ飬ÒòΪԶ³ÌÁ¬½Ó£¨Í¨¹ýÒòÌØÍø£©ÐèÒª¿¿Õâ¸öЭÒé¡£¼ì²é·½·¨ÊÇ£¬ÔÚ·þÎñÆ÷ÉÏ´ò¿ª¿ªÊ¼²Ëµ¥->³ÌÐò->Microsoft SQL Server->·þÎñÆ÷ÍøÂçʵÓù¤¾ß£¬¿´ÆôÓõÄЭÒéÀïÊÇ·ñÓÐtcp/ipЭÒ飬Èç¹ûûÓУ¬ÔòÆôÓÃËü¡£
   3 ¼ì²é·þÎñÆ÷µÄtcp/ip¶Ë¿ÚÊÇ·ñÅäÖÃΪ1433¶Ë¿Ú¡£ÈÔÈ»ÔÚ·þÎñÆ÷ÍøÂçʵÓù¤¾ßÀï²é¿´ÆôÓÃЭÒéÀïÃæµÄtcp/ipµÄÊôÐÔ£¬È·±£Ä¬È϶˿ÚΪ1433£¬²¢ÇÒÒþ²Ø·þÎñÆ÷¸´Ñ¡¿òûÓй´ÉÏ¡£
     ÊÂʵÉÏ£¬Èç¹ûĬÈ϶˿ڱ»Ð޸ģ¬Ò²ÊÇ¿ÉÒԵģ¬µ«ÊÇÔÚ¿Í»§¶Ë×ötelnet²âÊÔʱ£¬Ð´·þÎñÆ÷¶Ë¿ÚºÅʱ±ØÐëÓë·þÎñÆ÷ÅäÖõĶ˿ںű£³ÖÒ»Ö¡£Èç¹ûÒþ²Ø·þÎñÆ÷¸´Ñ¡¿ò±»¹´Ñ¡£¬ÔòÒâζ×Å¿Í»§¶ËÎÞ·¨Í¨¹ýö¾Ù·þÎñÆ÷À´¿´µ½Õą̂·þÎñÆ÷£¬Æðµ½Á˱£»¤µÄ×÷Ó㬵«²»Ó°ÏìÁ¬½Ó£¬µ«ÊÇTcp/ipЭÒéµÄĬÈ϶˿ڽ«±»ÒþʽÐÞ¸ÄΪ2433£¬ÔÚ¿Í»§¶ËÁ¬½Óʱ±ØÐë×÷ÏàÓ¦µÄ¸Ä±ä¡£
     4 Èç¹û·þÎñÆ÷¶Ë²Ù×÷ϵͳ´ò¹ýsp2²¹¶¡£¬ÔòÒ


Ïà¹ØÎĵµ£º

»ñÈ¡¾ÖÓòÍøSQL ServerʵÀýÐÅÏ¢

ÓÉÓÚ´úÂë¹ýÓÚ¼òµ¥£¬Ö±½ÓÌù³ö£º
SqlDataSourceEnumerator SseInstance = SqlDataSourceEnumerator.Instance;
//ServerName:·þÎñÆ÷Ãû;
//InstanceName:ʵÀýÃû;
//IsClustered:ÊÇ·ñΪȺ¼¯·þÎñÆ÷µÄÒ»²¿·Ö;
//Version:°æ±¾,8.*ÊÇSQL 2000,9.*ÊÇSQL 2005
DataTable DtSqlInstance = SseInstance.GetDataSources();

×¢£º ......

SQLÖÐÖ÷¼üºÍÍâ¼üµÄÇø±ð

Ö÷¼ü:
Äܹ»Î¨Ò»±íʾÊý¾Ý±íÖеÄÿ¸ö¼Ç¼µÄ¡¾×ֶΡ¿»òÕß¡¾×ֶΡ¿µÄ×éºÏ¾Í³ÆΪÖ÷Âë(Ö÷¼ü)¡£ Ò»¸öÖ÷¼üÊÇΨһʶ±ðÒ»¸ö±íµÄÿһ¼Ç¼£¬µ«ÕâÖ»ÊÇÆä×÷ÓõÄÒ»²¿·Ö£¬Ö÷¼üµÄÖ÷Òª×÷ÓÃÊǽ«¼Ç¼ºÍ´æ·ÅÔÚÆäËû±íÖеÄÊý¾Ý½øÐйØÁª¡£ÔÚÕâÒ»µãÉÏ£¬Ö÷¼üÊDz»Í¬±íÖи÷¼Ç¼֮¼äµÄ¼òµ¥Ö¸Õë¡£Ö÷¼üÔ¼Êø¾ÍÊÇÈ·¶¨±íÖеÄÿһÌõ¼Ç¼¡£Ö÷¼ü²»ÄÜÊÇ¿ÕÖµ¡£Î¨Ò ......

¹ØÓÚSQLÓï¾äCountµÄÒ»µãϸ½Ú

countÓï¾äÖ§³Ö*¡¢ÁÐÃû¡¢³£Á¿¡¢±äÁ¿,²¢ÇÒ¿ÉÒÔÓÃdistinct¹Ø¼ü×ÖÐÞÊΣ¬ ²¢ÇÒcount(ÁÐÃû)²»»áÀÛ¼ÆnullµÄ¼Ç¼¡£ÏÂÃæËæ±ãÓÃһЩÀý×Óʾ·¶Ò»ÏÂcountµÄ¹æÔò£º±ÈÈç¶ÔÈçϱí×öͳ¼Æ£¬ËùÓÐÁÐÕâÀﶼÓÃsql_variantÀàÐÍÀ´±íʾ¡£
if (object_id ('t_test' )> 0 )
    drop table t_test
go
create table t_test (a ......

ÈçºÎÔÚMS SQL ProfilerÀïÃæ¹ýÂËÄÚǶµÄ´æ´¢¹ý³Ì

×î½üÔÚ¸ãÐÔÄÜÓÅ»¯£¬ÓÉÓÚÏîÄ¿µÄÐèÒª£¬ÎÒÃDZØÐ뾡¿ÉÄܵļõÉÙÊý¾Ý¿âµÄµ÷Óã¬ÓÚÊÇÎÒÃÇ×öÁ˲»ÉÙµÄÓÅ»¯£¬±ÈÈçÔ­ÏÈÐèÒª3¸öÊý¾Ý¿âµ÷Óõģ¬ÏÖÔÚÎÒÃÇ°ÑËüÕûºÏµ½Ò»¸ö´æ´¢¹ý³ÌÖУ¬ÕâÑùÖ»ÐèÒªÒ»¸ö·½·¨¼´¿É¡£
µ«ÕâÒ²²úÉúÁËÁíÍâÒ»¸öÎÊÌ⣬֮ǰÎÒÃÇÊÇʹÓÃMS SQL ProfilerÈ¥¸ú×ÙÊý¾Ý¿âµÄµ÷Óõģ¬ÓÉÓÚÕûºÏÁ˲»ÉÙ´æ´¢¹ý³Ì£¬±ÈÈçÔ­ÏÈÐèÒªÈý¸ö´æ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ