win7 Ï ÅäÖà SQL Server 2005 ÔÊÐíÔ¶³Ì·ÃÎÊ
win7 Ï ÅäÖà SQL Server 2005 ÔÊÐíÔ¶³Ì·ÃÎÊ
2010Äê2ÔÂ2ÈÕ bibiQ
±¾À´Ò»Ö±²»Ô¸ÒâÅäÖÃÔ¶³Ì·ÃÎÊSQL server£¬µ«½ñÌìÒ»ºÝÐÄ°ÑËüÅäºÃÁË¡£
²Î¿¼ÁËÍøÉϵÄÌû×Óhttp://www.cnblogs.com/sukiwqy/archive/2009/11/11/1601381.html
step1£º ÅäÖÃSQL Server ÍâΧӦÓÃÅäÖÃÆ÷£¨Îª SQL Server 2005 ÆôÓÃÔ¶³ÌÁ¬½Ó¡¢ÆôÓà SQL Server Browser ·þÎñ£©
1. µ¥»÷”¿ªÊ¼”£¬ÒÀ´ÎÑ¡Ôñ”ËùÓгÌÐò”¡¢”Microsoft SQL Server 2005″¡¢”ÅäÖù¤¾ß”£¬È»ºóµ¥»÷”SQL Server ÍâΧӦÓÃÅäÖÃÆ÷”¡£
2. ÔÚ”SQL Server ÍâΧӦÓÃÅäÖÃÆ÷”Ò³ÉÏ£¬µ¥»÷”·þÎñºÍÁ¬½ÓµÄÍâΧӦÓÃÅäÖÃÆ÷”¡£
3. ÔÚ”·þÎñºÍÁ¬½ÓµÄÍâΧӦÓÃÅäÖÃÆ÷”Ò³ÉÏ£¬Õ¹¿ª”Database Engine”(Êý¾Ý¿âÒýÇæ)£¬µ¥»÷”Ô¶³ÌÁ¬½Ó£¬Ñ¡Ôñ”±¾µØÁ¬½ÓºÍÔ¶³ÌÁ¬½Ó”¸´Ñ¡¿ò£¬Ñ¡ÔñÊÊÓÃÓÚÄúµÄ»·¾³µÄÏàÓ¦ÐÒé(ÎÒÕâÀïʹÓÃͬʱʹÓÃTCP/IPºÍnamed pipes)£¬È»ºóµ¥»÷”Ó¦ÓÔ¡£
×¢Òâ:ÇëÔÚ½ÓÊÕµ½ÒÔÏÂÏûϢʱµ¥»÷“È·¶¨”¡£
Ö±µ½ÖØÐÂÆô¶¯Êý¾Ý¿âÒýÇæ·þÎñºó£¬¶ÔÁ¬½ÓÉèÖÃËù×öµÄ¸ü¸Ä²Å»áÉúЧ¡£
4. ÔÚ”·þÎñºÍÁ¬½ÓµÄÍâΧӦÓÃÅäÖÃÆ÷”Ò³ÉÏ£¬µ¥»÷”SQL Server Browser”£¬ÔÚ”Æô¶¯ÀàÐÍ”Öе¥»÷”×Ô¶¯”Ñ¡ÏȻºóµ¥»÷”Ó¦ÓÔ¡£
5. µ¥»÷”Æô¶¯”£¬È»ºóµ¥»÷”È·¶¨”¡£
step2£º¸ü¸Äwindows·À»ðǽÉèÖã¨ÔÚ Windows ·À»ðǽÖÐΪ SQL Server 2005 ºÍSQL Server Browser´´½¨ÀýÍ⣩
1. ÔÚ Windows ·À»ðǽÖУ¬µ¥»÷”ÔÊÐí³ÌÐò»ò¹¦ÄÜͨ¹ýwindows·À»ðǽ”£¬È»ºóµ¥»÷”ÔÊÐíÔËÐÐÁíÒ»³ÌÐò£¨R£©”¡£
2. ÔÚ”Ìí¼Ó³ÌÐò”´°¿ÚÖУ¬µ¥»÷”ä¯ÀÀ”¡£
3. µ¥»÷ C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe ¿ÉÖ´ÐгÌÐò£¬µ¥»÷”´ò¿ª”£¬È»ºóµ¥»÷”È·¶¨”¡£
×¢Òâ:ÉÏÊö·¾¶¿ÉÄÜ»á¸ù¾Ý SQL Server 2005 µÄ°²×°Î»Ööø²»Í¬¡£
4. µ¥»÷ C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe ¿ÉÖ´ÐгÌÐò£¬µ¥»÷”´ò¿ª”£¬È»ºóµ¥»÷”È·¶¨”¡£
×¢Òâ:ÉÏÊö·¾¶¿ÉÄÜ»á¸ù¾Ý SQL Server 2005 µÄ°²×°Î»Ööø²»Í¬¡£
step3£ºÅäÖÃÔ¶³ÌÁ¬½ÓµÄTCP¶Ë¿Ú1433
1. ÔÚ·þÎñÆ÷ÉÏ´ò¿ªSQL Server Configuration Manager¡£
·½·¨:µ¥»÷”¿ªÊ¼&rd
Ïà¹ØÎĵµ£º
SQL:Structured Query Language,1974ÄêBoyceºÍChamberlinÌá³ö.
Êý¾Ý¶¨Òå :CREATE,DROP
Êý¾Ý¿â²éѯ:SELECT
Êý¾Ý²Ù×Ý :INSERT,UPDATE,DELETE
Êý¾Ý¿ØÖÆ :GRANT,REVOKE
Ò».Êý¾ÝµÄ¶¨ÒåºÍÐÞ¸Ä:
1.¶¨Òå»ù±í
CREATE TABLE ±íÃû (<ÁÐÃû1 ÀàÐÍ[NOT NULL][,ÁÐÃû2 ÀàÐÍ[NOT NULL]>…[ÆäËû²ÎÊý]);
¹ØÓÚÀàÐÍ:
INTEGE ......
SQLServerʱ¼äÈÕÆÚº¯ÊýÏê½â,SQLServer,ʱ¼äÈÕÆÚ,
1. µ±Ç°ÏµÍ³ÈÕÆÚ¡¢Ê±¼ä
select getdate()
2. dateadd ÔÚÏòÖ¸¶¨ÈÕÆÚ¼ÓÉÏÒ»¶Îʱ¼äµÄ»ù´¡ÉÏ£¬·µ»ØÐ嵀 datetime Öµ
ÀýÈ ......
--Excelµ¼ÈëSQL SERVERÖÐ
--±í½á¹¹²»´æÔÚ¿ÉÒÔʹÓÃ
--ÆôÓÃAd Hoc Distributed Queries£º
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
select * into serv_user_bak1 from
OpenRowSet('microsoft.jet.oledb.4.0','Excel 8.0;HDR=yes;dat ......
SQLÃæÊÔÌ⣨1£©
create table testtable1
(
id int IDENTITY,
department varchar(12)
)
select * from testtable1
insert into testtable1 values('Éè¼Æ')
insert into testtable1 values('Êг¡')
insert into testtable1 values('ÊÛºó')
/*
½á¹û
id department
1 Éè¼Æ
2 Êг¡
3& ......
¾¯±¨¹ÜÀí
×÷ÒµÖ´ÐÐʱ£¬SQL Server´íÎóÏûÏ¢µÄÐÅÏ¢´æ·ÅÔÚWindowsÊÂÎñÈÕÖ¾ÖС£SQL Server´úÀí¶ÁÈ¡Õâ¸öÈÕÖ¾£¬²¢±È½Ï´æ´¢µÄÏûÏ¢ÓëΪϵͳ¶¨ÒåµÄ¾¯±¨£¬Èç¹ûÆ¥Å䣬SQL Server´úÀí¼¤»î¸Ã¾¯±¨£¬ËùÒÔ£¬¾¯±¨¿ÉÒÔÓÃÓÚÏìӦDZÔÚµÄÎÊÌâ(ÈçÌîÂúÊÂÎñÈÕÖ¾)¡£µ±¾¯±¨±»´¥·¢Ê±£¬Í¨¹ýµç×ÓÓʼþ»òÕßÑ°ºô֪ͨ²Ù×÷Ô±£¬´Ó¶øÈòÙ×÷Ô±Á˽âϵͳÖз¢ÉúÁËʲà ......