Óû§saµÇ¼ʧ°Ü,¸ÃÓû§Óë¿ÉÐÅsql serverÁ¬½ÓÎÞ¹ØÁª
Õâ¸öÓпÉÄÜÊÇÄãÔÚ°²×°SQL SERVER2005µÄʱºòÑé֤ģʽûÓÐÉèÖúÃ.
1.Ñ¡ÖзþÎñÆ÷(ÓÒ¼ü)->ÊôÐÔ->°²È«ÐÔ->·þÎñÆ÷Éí·ÝÑéÖ¤ÐÞ¸ÄΪ"SQL SERVERºÍWINDOWSÉí·ÝÑé֤ģʽ"
2.Õ¹¿ª·þÎñÆ÷ÉϵÄ"°²È«ÐÔ"->µÇ½Ãû->Ñ¡ÖÐSAµÇ½ÕʺÅ(ÓÒ¼ü)->״̬->µÇ½ÐÞ¸ÄΪÆôÓÃ.
°²×°ÍêSQL Serverºó,¿ÉÒÔÓÃWindowsÉí·ÝÈÏÖ¤µÇ¼,¾ÍÊDz»ÄÜÓÃsaÕË»§µÇ¼
½â¾ö²½Öè:1)½«µÇ¼·½Ê½ÉèΪ"»ìºÏÈÏÖ¤"(ÓÒ»÷·þÎñÆ÷->Ñ¡Ôñ"°²È«ÐÔ"->µãÑ¡"Sql Server"ºÍWindowsÉí·ÝÈÏ֤ģʽ)
2)ÉèÖÃsaÕË»§(Êý¾Ý¿â->°²È«ÐÔ(ÓëÉÏÃæµÄ²»ÊÇͬһ¸ö,Õâ¸ö²»ÓÃÓÒ»÷)->µÇ¼Ãû->saÕË»§->ÉèÖÃÃÜÂë->Óû§Ó³Éä->Ó³Éäµ½ÄãµÄÊý¾Ý¿â
Èç¹ûÔÚ°²×°¹ý³ÌÖÐÑ¡Ôñ¡°Windows Éí·ÝÑé֤ģʽ¡±£¬Ôò sa µÇ¼½«±»½ûÓá£Èç¹ûÉÔºó½«Éí·ÝÑé֤ģʽ¸ü¸ÄΪ¡°SQL Server ºÍ Windows Éí·ÝÑé֤ģʽ¡±£¬Ôò sa µÇ¼ÈÔ´¦ÓÚ½ûÓÃ״̬¡£ÈôÒªÆôÓà sa µÇ¼£¬ÇëʹÓà ALTER LOGIN ÃüÁî¡£
sa µÇ¼ֻÄÜʹÓà SQL Éí·ÝÑéÖ¤Á¬½Óµ½·þÎñÆ÷¡£
ÔÚ SQL Server Management Studio ¶ÔÏó×ÊÔ´¹ÜÀíÆ÷ÖУ¬ÓÒ¼üµ¥»÷·þÎñÆ÷£¬ÔÙµ¥»÷¡°ÊôÐÔ¡±¡£
ÔÚ¡°°²È«ÐÔ¡±Ò³Éϵġ°·þÎñÆ÷Éí·ÝÑéÖ¤¡±Ï£¬Ñ¡ÔñеķþÎñÆ÷Éí·ÝÑé֤ģʽ£¬ÔÙµ¥»÷¡°È·¶¨¡±¡£
ÔÚ SQL Server Management Studio ¶Ô»°¿òÖУ¬µ¥»÷¡°È·¶¨¡±ÒÔÈ·ÈÏÐèÒªÖØÐÂÆô¶¯ SQL Server¡£
ÔÚ¶ÔÏó×ÊÔ´¹ÜÀíÆ÷ÖУ¬ÓÒ¼üµ¥»÷ÄúµÄ·þÎñÆ÷£¬ÔÙµ¥»÷¡°ÖØÐÂÆô¶¯¡±¡£Èç¹ûÔËÐÐÓÐ SQL Server ´úÀí£¬ÔòÒ²±ØÐ뽫ÆäÖØÐÂÆô¶¯¡£
Ö´ÐÐÏÂÁÐÓï¾äÒÔÆôÓà sa ÃÜÂë²¢·ÖÅäÒ»¸öÃÜÂë¡£
ALTER LOGIN sa ENABLE ;
GO
ALTER LOGIN sa WITH PASSWORD = ' <password>' ;
GO
Ïà¹ØÎĵµ£º
²Î¿¼ÎÄÏ×£ºhttp://www.cnblogs.com/chenxizhang/archive/2009/04/23/1441913.html
SQL ServerÌṩËÄÖÖ·½Ê½Á¬½ÓÊý¾Ý¿â·þÎñÆ÷:
1. share memory: Ö»ÊÊÓÃÓÚ¿Í»§¶ËºÍ·þÎñÆ÷¶ËÔÚͬһ̨»úÆ÷ÉÏ,²ÅÄܲÉÓõÄÁ¬½Ó
2. Named pipe:
ÔÚ¾ÖÓòÍø(LAN)ÄÚʵÏÖÁ¬½Ó,Ò»¸ö½ø³ÌʹÓÃÒ»²¿·ÖµÄÄÚ´æÀ´Ïò½ø³ÌµÄÁíÒ»¶Ë´«µÝÏûÏ¢,Ò»¸ö½ø³ÌµÄÊä³öÊÇÁíÍâ ......
select * from tableName where datediff(week,dateField,getdate())=0
ÕâÑù²é³öÀ´µÄ½á¹ûÊÇ´ÓÐÇÆÚÌìµ½ÐÇÆÚÁù(ÀÏÍâĬÈÏÐÇÆÚÌìÊÇÒ»ÖܵĵÚÒ»Ìì).
Èç¹ûÏëÒÔÐÇÆÚÒ»×÷ΪµÚÒ»ÌìµÄ»°,Á½¸öʱ¼ä¶¼ÐèÒª¼õÒ»,ÈçÏÂ:
select * from tableName where datediff(week,dateField-1,getdate()-1)=0 ......
//--Ìí¼Ó·þÎñÆ÷
EXEC sp_addlinkedserver
@server='LQXLSJ-600A5A60',--±»·ÃÎʵķþÎñÆ÷±ðÃû
@srvproduct='',
@provider='SQLOLEDB',
@datasrc='LQXLSJ-600A5A60' --Òª·ÃÎ ......
ÄÚÈÝת×Ô£ºhttp://blog.csdn.net/lfzwenzhu/archive/2008/03/06/2153473.aspx
SELECT CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
SELECT CONVERT(varchar(100), GETDATE(), 1): 05/16/06
SELECT CONVERT(varchar(100), GETDATE(), 2): 06.05.16
SELECT CONVERT(varchar(100), GETDATE(), 3): 16/05/06
......