SQL SERVER 2005Ïà¹ØÎÊÌâ
Òѳɹ¦Óë·þÎñÆ÷½¨Á¢Á¬½Ó£¬µ«ÊÇÔڵǼǰµÄÎÕÊÖÆڼ䷢Éú´íÎóµÄ´¦Àí·½·¨
ÔÚÓÃSQL SERVER Óû§µÇ½SQL SERVER 2005ʱ£¬µ¯³öÒ»¸ö¶Ô»°¿ò£¬Ìáʾ" Òѳɹ¦Óë·þÎñÆ÷½¨Á¢Á¬½Ó£¬µ«ÊÇÔڵǼǰµÄÎÕÊÖÆڼ䷢Éú´íÎó",²éÕÒÁËÒ»ÏÂÔÒò£¬ÔÀ´ÊÇSQL SERVER 2005ʱ½ûÓÃTCP/IPµÇ½ÁË£¬´ò¿ªSQL SERVER 2005²Ëµ¥ÖеÄÅäÖù¤¾ßϵÄSQL SERVER Configuration Manager.µã»÷´°ÌåÖУ¬´ò¿ªSQL SERVER 2005 ÍøÂçÅäÖõÄϽڵ㣬ѡÔñMSSQLSERVERµÄÐÒé¡£°ÑÓұߴ°¿ÚµÄTCP/IPµÄÊôÐÔÒѽûÓ㬸ÄΪÒÑÆôÓ㬾ÍOKÁË¡£
ÔÚ½¨Á¢Óë·þÎñÆ÷µÄÁ¬½Óʱ³ö´í¡£ÔÚÁ¬½Óµ½ SQL Server 2005 ʱ£¬ÔÚĬÈϵÄÉèÖÃÏ SQL Server ²»ÔÊÐí½øÐÐÔ¶³ÌÁ¬½Ó¿ÉÄܻᵼÖ´Ëʧ°Ü¡£ (provider: ÃüÃû¹ÜµÀÌṩ³ÌÐò, error: 40 - ÎÞ·¨´ò¿ªµ½ SQL Server µÄÁ¬½Ó)
1. Êý¾Ý¿âÒýÇæûÓÐÆô¶¯¡£
ÓÐÁ½ÖÖÆô¶¯·½Ê½:
(1)¿ªÊ¼->³ÌÐò->Microsoft SQL Server 2005->SQL Server 2005ÍâΧӦÓÃÅäÖÃÆ÷,ÔÚ´ò¿ªµÄ½çÃæµ¥»÷"·þÎñµÄÁ¬½ÓµÄÍâΧӦÓÃÅäÖÃÆ÷",ÔÚ´ò¿ªµÄ½çÃæÖÐÕÒµ½Database Engine,µ¥»÷"·þÎñ",ÔÚÓÒ²à²é¿´ÊÇ·ñÒÑÆô¶¯,Èç¹ûûÓÐÆô¶¯¿Éµ¥»÷"Æô¶¯",²¢È·±£"Æô¶¯ÀàÐÍ"Ϊ×Ô¶¯,²»ÒªÎªÊÖ¶¯,·ñÔòÏ´οª»úʱÓÖÒªÊÖ¶¯Æô¶¯;
(2)¿É´ò¿ª:¿ªÊ¼->³ÌÐò->Microsoft SQL Server 2005->ÅäÖù¤¾ß->SQL Server Configuration Manager,Ñ¡ÖÐSQL Server 2005·þÎñÖÐSQL Server(MSSQLSERVER) ,²¢µ¥»÷¹¤¾ßÀ¸ÖеÄ"Æô¶¯·þÎñ"°´Å¥°Ñ·þÎñ״̬¸ÄΪÆô¶¯;
ʹÓÃÉÏÃæÁ½ÖÖ·½Ê½Ê±,ÓÐʱºòÔÚÆô¶¯µÄʱºò¿ÉÄÜ»á³öÏÖ´íÎó,²»ÄÜÆô¶¯,Õâʱ¾ÍÒª²é¿´"SQL Server 2005ÅäÖùÜÀíÆ÷"ÖеÄSQL Server 2005ÍøÂçÅäÖÃ->MSSQLSERVERÐÒéÖеÄVIAÊÇ·ñÒÑÆôÓÃ,Èç¹ûÒÑÆôÓÃ,Ôò°ÑËü½ûÖ¹.È»ºóÔÙÖ´ÐÐÉÏÊöÒ»ÖÖ·½Ê½²Ù×÷¾Í¿ÉÒÔÁË.
2. ÊÇ·ñÒѾÔÊÐíÔ¶³ÌÁ¬½Ó¡£
Õâ¸ö²¿·Ö¿ÉÒÔ¼òµ¥µÄ·ÖΪ4¸ö·½Ã棬·Ö±ðÊÇÔÚ SQL ServerÉÏÆôÓÃÔ¶³ÌÁ¬½Ó¡¢ÆôÓÃSQL Server ä¯ÀÀ·þÎñ¡¢ÔÚWindows ·À»ðǽÖÐΪSQL Server 2005 ´´½¨ÀýÍâºÍÔÚWindows ·À»ðǽÖÐΪ“SQLBrowser”´´½¨ÀýÍâ¡£ÏÂÃæÊǼ¸¸ö¾ßÌåµÄ²Ù×÷·½Ê½£¬Õª×ÔMSDN£¬¸öÈ˾õµÃÎÄÕµĺÚÌ岿·ÖÓ¦µ±ÌرðµÄÒ»ÆðÎÒÃǵÄ×¢Òâ¡£
ÔÚSQLServer ʵÀýÉÏÆôÓÃÔ¶³ÌÁ¬½Ó
1.Ö¸Ïò“¿ªÊ¼->³ÌÐò->Microsoft SQL Server 2005->ÅäÖù¤¾ß->SQL Server ÍâΧӦÓÃÅäÖÃÆ÷”
2.ÔÚ“SQL Server 2005 ÍâΧӦÓÃÅäÖÃÆ÷”Ò³, µ¥»÷“·þÎñºÍÁ¬½ÓµÄÍâΧӦÓÃÅäÖÃÆ÷”
3.È»ºóµ¥»÷Õ¹¿ª“Êý¾Ý¿
Ïà¹ØÎĵµ£º
½ñÌìÔÚÏîÄ¿ÖÐÓÐÒ»ÎÊÌ⣬ÔÚÍøÉϲéѯÁËcaseµÄÓ÷¨£¬Ìû³öÀ´ºÍ´ó¼Ò·ÖÏíÏ¡£
ÎÊÌâÃèÊö£ºÔÚÒ»ÕűíÖÐÓÐÒ»×Ö¶ÎbitÀàÐÍ£¬±íʾ´ËÌõÊý¾ÝÊÇ·ñ±»Ëø¶¨£¬ÔÚÒ³ÃæÉÏÓÐÒ»°´Å¥ÊǶԴËÌõÊý¾Ý½øÐÐËø¶¨ºÍ½âËøµÄ£¬Ñ¡ÔñÒ³ÃæÖеÄÊý¾Ý£¬µã»÷Õâ¸ö°´Å¥£¬Èç¹ûÕâÌõÊý¾ÝÊÇËø¶¨µÄ£¬¾Í½âËø£»Èç¹ûÊÇδ˵¶¨µÄ¾ÍËø¶¨£¬ÕâÑù¾ÍÓÃÒ»ÌõÓï¾äÀ´ÊµÏÖ¡£ºóÀ´Ï ......
ÔÚÁгö±íÖÐËùÓÐ×Ö¶ÎÃûµÄʱºò£¬Óõ½ÁËÕâÑùÒ»¸öSQLº¯Êý£ºobject_id
ÕâÀïÎÒ½«Æä×÷ÓÃÓëÓ÷¨ÁгöÀ´£¬ºÃÈôó¼ÒÃ÷°×£º
OBJECT_ID£º
·µ»ØÊý¾Ý¿â¶ÔÏó±êʶºÅ¡£
Óï·¨
OBJECT_ID ( 'object' )
²ÎÊý
'object'
ҪʹÓõĶÔÏó¡£object µÄÊý¾ÝÀàÐÍΪ char »ò nchar¡£Èç¹û object µÄÊý¾ÝÀàÐÍÊÇ char£¬ÄÇôÒþÐÔ½«Æäת»»³É ncha ......
--»ùÓÚʱ¼äSQLº¯Êý--
getdate() --·µ»Øµ±Ç°ÏµÍ³ÈÕÆÚºÍʱ¼ä¡£
DateAdd --ÔÚÏòÖ¸¶¨ÈÕÆÚ¼ÓÉÏÒ»¶Îʱ¼äµÄ»ù´¡ÉÏ£¬·µ»ØÐ嵀 datetime Öµ¡£
DATEADD ( datepart , number, date )
--Àý£ºÏòµ±ÌìµÄʱ¼äÔö¼Ó5Ìì
select dateadd(dd,5,getdate())
datediff --·µ»Ø¿çÁ½¸öÖ¸¶¨ÈÕÆÚµÄÈÕÆÚºÍʱ¼ä±ß½çÊý¡£]
---ÀýÈç
& ......
·½·¨Ò»£º
´ò¿ªÆóÒµ¹ÜÀíÆ÷£>SQL SERVRE ×é£>(local)window NT ->ÊôÐÔ
²úÆ·:ÓÐpersonalµÄÊǸöÈË°æµÄ£¬ÓÐEnterpriseµÄÊÇÆóÒµ°æµÄ
²úÆ·°æ±¾£º8.00.2039(sp4);8.00.760(sp3)
·½·¨¶þ£º
µÚÒ»²½£ºÔÚ²éѯ·ÖÎöÆ÷
select @@version
print @@version
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 ......