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

SQL SERVER 2005 Ô¶³Ì·ÃÎÊ

(ÊÊÓà SQL Server 2005 ÆäËû°æ±¾)
ÊÕ²Ø



SQL Server 2005 Express ÊÇ΢ÈíÌṩµÄÊý¾Ý¿âµÄµÍ¶Ë½â¾ö·½°¸,
¿ÉÃâ·ÑÈÎÒâËæ²úÆ··Ö·¢, ¿ÉÒÔÔÚXPµÈ·Çרҵ·þÎñÆ÷ϵͳϰ²×°, »¹¿ÉÒÔÔ¶³Ì·ÃÎÊ, ¶ÔÓÚСÐÍÊý¾ÝÓ¦ÓóÌÐòÒÑ×ã¹»Âú×ãÊý¾ÝʹÓÃÒªÇó.
ĬÈϰ²×°ÏÂ,SQL Server 2005 Express ²»ÔÊÐíÔ¶³Ì·ÃÎÊ, ¸ù¾Ý×Ô¼ºµÄʵ¼ù, ÏÖ×ܽáÏÂSQL Server 2005
Express Ô¶³Ì·ÃÎÊÉèÖù¥ÂÔ, Ï£Íû¶Ô³õѧÕßÓÐËù°ïÖú.
Ô¶³Ì·ÃÎʹ¥ÂÔÖ®Ò»: ¶¯Ì¬¶Ë¿Ú²ßÂÔ
 
Ò» Ê×ÏÈͨ¹ýÒÔÏÂÁ½ÖÖ·½Ê½Ö®Ò»´ò¿ª SQL Server ÍâΧӦÓÃÅäÖÃÆ÷
1.¿ªÊ¼--ÔËÐпòÖÐÊäÈë C:\Program Files\Microsoft SQL
Server\90\Shared\SqlSAC.exe
2.¿ªÊ¼--ËùÓгÌÐò--Microsoft SQL Server 2005--ÅäÖù¤¾ß--SQL Server ÍâΧӦÓÃÅäÖÃÆ÷
 
 
µãÈ·¶¨Í˳ö
¶þ È»ºóͨ¹ýÒÔÏÂÁ½ÖÖ·½Ê½Ö®Ò»´ò¿ªSQL Server Configuration Manager
1.¿ªÊ¼--ÔËÐпòÖÐÊäÈë C:\WINDOWS\system32\mmc.exe /32
"C:\WINDOWS\system32\SQLServerManager.msc"
2.¿ªÊ¼--ËùÓгÌÐò--Microsoft SQL Server 2005--ÅäÖù¤¾ß--SQL Server Configuration
Manager
Èý È·±£sql server Browser·þÎñÒѰ²×°²¢´¦ÓÚÆô¶¯×´Ì¬£¬sql server
Browser·þÎñʹµÃ¿Í»§¶ËÔÚ·ÃÎÊʱ²»ÐèÖ¸¶¨¶Ë¿ÚºÅ¡£ÔÚserver ²ÉÓö¯Ì¬ÅäÖö˿ںŵÄÇé¿öÏ£¬±ØÐëÒª¿ªÆôsql server
Browser·þÎñ¡£Ä¬ÈÏÇé¿öÏ£¬Êý¾Ý¿âÒýÇæµÄĬÈÏʵÀýʹÓà 1433 ºÅ TCP ¶Ë¿Ú¡£µ«ÃüÃûʵÀýÔÚÆô¶¯Ê±£¬»á¶¯Ì¬·ÖÅäδʹÓÃµÄ TCP
¶Ë¿ÚºÅ¡£ÔÚĬÈϰ²×°Ï£¬server »á°²×°²¢ÆôÓÃsql server Browser·þÎñ¡£
 
ËÄ ÔÚWindows ·À»ðǽÖÐΪ“SQL Server 2005”´´½¨ÀýÍâ
1.ÔÚ Windows ·À»ðǽÉèÖýçÃæÖУ¬Ñ¡Ôñ“ ÀýÍâ”
Ñ¡Ï£¬È»ºóµ¥»÷“Ìí¼Ó³ÌÐò”
2.ÔÚ“Ìí¼Ó³ÌÐò´°¿Ú”Öе¥»÷“ä¯ÀÀ”
3.È»ºóÕÒµ½“C:\ProgramFiles
\Microsoft Files\Microsoft SQL Server\ MSSQL.1
\MSSQL\Binn\sqlservr.exe”, µ¥»÷"È·¶¨".  ×¢Ò⣺ ·¾¶¿ÉÄÜ»á¸ù¾Ý SQL Server 2005 °²×°²»Í¬¶ø²»Í¬,
MSSQL.1 ÊÇռλ·û£¬¶ÔÓ¦Êý¾Ý¿âʵÀýID¡£
4.¶Ôÿ¸öÐèÒª´ò¿ªÔ¶³Ì·ÃÎʵÄSQL Server 2005 ʵÀý£¬Öظ´²½Öè 1 ÖÁ 3¡£
ÁíÍâ,·À»ðǽÀýÍâÖÐÐè Ìí¼Ó ¶Ë¿Ú£º1434£¬UDP, Õâ¸ö¶Ë¿ÚÊÇsql server BrowserÌṩ·þÎñµÄ¶Ë¿Ú,µ±Ëü¸ºÔð½âÊÍsql
serverµÄ¶Ë¿Ú.Ìí¼ÓÁËÕâ¸ö¶Ë¿Úµ½ÀýÍ


Ïà¹ØÎĵµ£º

SQL¿ìËÙÓÃÆô¶¯


¿ªÆô¸÷ÖÖ·þÎñ
      @NET stop SQLSERVERAGENT
      @NET stop MSSQLServerOLAPService
      @NET stop msftesql
      @NET stop MsDtsServer
      @NET stop SQLWriter
  ......

vc+sqlÁ¬½Ó×Ö·û´®

1£©
#pragma warning(disable:4146)
#import "C:\Program Files\Common Files\System\ADO\msado15.dll"
named_guids rename("EOF","adoEOF"), rename("BOF","adoBOF")
#pragma warning(default:4146)
using namespace ADODB;
2£©
#pragma warning(disable:4146) ......

SQL Server ·µ»Ø×îºó²åÈë¼Ç¼µÄidÖµ

SQL Server 2000ÖУ¬ÓÐÈý¸ö±È½ÏÀàËÆµÄ¹¦ÄÜ£ºËûÃÇ·Ö±ðÊÇ£ºSCOPE_IDENTITY¡¢IDENT_CURRENT ºÍ @@IDENTITY£¬ËüÃǶ¼·µ»Ø²åÈëµ½ IDENTITY ÁÐÖеÄÖµ¡£
IDENT_CURRENT ·µ»ØÎªÈκλỰºÍÈκÎ×÷ÓÃÓòÖеÄÌØ¶¨±í×îºóÉú³ÉµÄ±êʶֵ¡£IDENT_CURRENT ²»ÊÜ×÷ÓÃÓòºÍ»á»°µÄÏÞÖÆ£¬¶øÊÜÏÞÓÚÖ¸¶¨µÄ±í¡£IDENT_CURRENT ·µ»ØÎªÈκλỰºÍ×÷ÓÃÓòÖÐµÄ ......

SQL UNION ºÍ UNION ALL²Ù×÷·û


SQL UNION ²Ù×÷·û
UNION ²Ù×÷·ûÓÃÓںϲ¢Á½¸ö»ò¶à¸ö SELECT Óï¾äµÄ½á¹û¼¯¡£
Çë×¢Ò⣬UNION ÄÚ²¿µÄ SELECT Óï¾ä±ØÐëÓµÓÐÏàͬÊýÁ¿µÄÁС£ÁÐÒ²±ØÐëÓµÓÐÏàËÆµÄÊý¾ÝÀàÐÍ¡£Í¬Ê±£¬Ã¿Ìõ SELECT Óï¾äÖеÄÁеÄ˳Ðò±ØÐëÏàͬ¡£
SQL UNION Óï·¨
SELECT column_name(s) from table_name1
UNION
SELECT column_name(s) from table_na ......

SQL server 2005ѧϰ±Ê¼Ç(ÊÓͼ)


Ò»£®ÊÓͼ(VIEW)
¶¨Ò壺ÊÓͼÊÇÒ»ÕÅÐéÄâµÄ±í£¬ÆäÄÚÈÝÊÇ´ÓÒ»ÕÅ»ò¶àÕűíÖвéѯµÃÀ´µÄ½á¹û¼¯¡£
ÃèÊö£ºÊÓͼÊÇ´æ´¢ÔÚϵͳĿ¼ÖеÄÐÅÏ¢£¬Ëý²¢Ã»ÓÐÕæÕý´æ´¢Êý¾Ý£¬¶øÊÇÒÑ´æ±íµÄͶӰ¡£ÊÓͼµÄÊôÐÔÊǰ´ÕÕÒ»¸ö²éѯµÄ¹æ¶¨´ÓÒ»¸ö»òÕß¶à¸ö±íÖе¼³öµÄ£¬ÊÇÒÑ´æ±íµÄ¹ýÂËÆ÷¡£ËýÊÇÒ»ÕÅ“Ðé±í”£¬´ÓÒ»Õűí»òÕß¶àÕűíÖÐÅÉÉú³öÀ´µÄ£¬Æä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ