SQL SERVER2008Êý¾ÝÍÚ¾ò
¸ÅÊö
Microsoft SQL Server 2008 ÈÃÄúÄܹ»Í¨¹ýÖ±¹ÛµÄÊý¾ÝÍÚ¾òµÄÔ¤²âÐÔ·ÖÎöÀ´×ö³öÃ÷ÖǺÏÀíµÄ¾ö²ß£¬ÎÞ·ìµØÕûºÏ Microsoft ÉÌÒµÖÇÄÜƽ̨²¢¿ÉÀ©Õ¹ÖÁÉÌÒµÓ¦ÓóÌÐò¡£
ÖØ´óµÄй¦ÄÜ
ͬʱÀûÓôíÎóºÍ¾«È·¶ÈµÄͳ¼Æ·ÖÊýÀ´²âÊÔ¶à¸öÊý¾ÝÍÚ¾òÄ£ÐÍ£¬²¢ÀûÓý»²æÑéÖ¤À´È·ÈÏÆäÎȶ¨ÐÔ
ÔÚµ¥Ò»½á¹¹Öн¨Á¢¶à¸ö²»¼æÈݵÄÍÚ¾òÄ£ÐÍ¡¢ÔÚɸѡ¹ýµÄÊý¾ÝÖÐÓ¦ÓÃÄ£ÐÍ·ÖÎö¡¢Õë¶Ô½á¹¹Êý¾Ý½øÐвéѯÀ´³ÊÏÖÍêÕûµÄÐÅÏ¢£¬ÔöÇ¿ÐÍÍÚ¾ò½á¹¹»áÆôÓÃËùÓеÄÕâЩ¹¦ÄÜ
ʹÓøüÓÅÖʵÄʱ¼äÐòÁÐÖ§³ÖÀ´½áºÏÓÅ»¯µÄ¶ÌÆÚÔ¤²â (ARTXP) ÓëÎȶ¨µÄ³¤ÆÚÔ¤²â (ARIMA)£¬½«Á½ÕßµÄÓÅÊƽáºÏÔÚÒ»Æð
ʹÓùºÎïÀº·ÖÎöÀ´Ì½Ë÷¾³£Ò»Æð¹ºÂòµÄÏîÄ¿Ö®¼äµÄ¹Øϵ¡¢²úÉú½»»¥Ê½´°ÌåÀ´Ê¹ÓÃÔ¤²âÐԵļÆËãÆ÷ΪÐµİ¸Àý¼Æ·Ö¡¢Ëæ×Å Office 2007 µÄ Microsoft SQL Server 2008 Êý¾ÝÍÚ¾ò¼ÓÔغêÒ»Æð´«µÝ
ÍêÕûÐÔ
½«Ö±¹ÛÐÔºÍÈ«ÃæÐÔµÄÉîÈëÔ¤²âÄÜÁ¦Ìṩ¸øËùÓÐÓû§£¬ÈÃÓû§¸ù¾Ý¶à·½ÐÅÏ¢×ö³ö¾ö²ß¡£
·á¸»ÇÒ´´ÐµÄËã·¨
Óû§»áÒòΪÐí¶à·á¸»ÇÒ´´ÐµÄÊý¾ÝÍÚ¾òËã·¨¶ø»ñÒæÁ¼¶à£¬ÕâЩËã·¨´ó¶àÊÇÓÉ Microsoft Ñо¿ÈËÔ±Ëù¿ª·¢£¬ÆäÄ¿µÄÊÇΪÁ˸ü¿ìËÙ²¢ÇÒ׼ȷµØÖ§³Ö³£¼ûµÄÉÌÒµÎÊÌâ¡£
¹ºÎïÀº·ÖÎö - ̽¾¿Ê¹ÓÃÕß¾³£»áÒ»Æð¹ºÂòÄÄЩÏîÄ¿£¬ÒÔ±ã²úÉúʵʱµÄ²É¹º½¨Òé¼°ÅжϲúÆ·µÄλÖÃÈçºÎÖ±½ÓÓ°ÏìÓû§µÄ¹ºÂò¾ö²ß
¿Í»§Á÷ʧ·ÖÎö - Ô¤ÏÈ´¦Àí¿ÉÄܻῼÂÇÈ¡ÏûÆä·þÎñµÄ¿Í»§£¬²¢Ö¸³ö¿ÉÈÃÕâЩ¿Í»§ÁôÏÂÀ´µÄºÃ´¦
Êг¡·ÖÎö - ×Ô¶¯½«ÀàËƵĿͻ§·Ö×éÔÚÒ»ÆðÀ´¶¨ÒåÊг¡·Ö¸î¡£Ê¹ÓÃÕâЩϸ·ÖÊг¡¿ÉÑ°ÕÒÓлñÀû»ú»áµÄ¿Í»§
Ô¤²â - Ô¤²âÏúÊۺʹæ»õÊýÁ¿²¢Á˽âÁ½ÕßÖ®¼äµÄÏ໥¹ØÁªÐÔ£¬ÒÔ±ãÔ¤²âÆ¿¾±¼°Ìá¸ßÐÔÄÜ
Êý¾Ýä¯ÀÀ - ·ÖÎö²»Í¬¿Í»§Ö®¼äµÄ»ñÀû»ú»á£¬»òÊǽ«Æ«°®Í¬Ò»²úÆ·µ«Æ·ÅƲ»Í¬µÄ¿Í»§½øÐбȽϣ¬ÒÔ±ãÕÒ³öеĻú»á
ÎÞÈ˼ලµÄѧϰ·½Ê½ - Ö¸³öÆóÒµÄÚ²»Í¬ÔªËØÖ®¼äµÄÏÈǰδ֪¹Øϵ£¬ÈÃÄú¸ù¾Ý¶à·½Ç鱨×ö³ö¸üºÃµÄ¾ö²ß
ÍøÕ¾·ÖÎö - Á˽âÈËÃÇÈçºÎʹÓÃÄúµÄÍøÕ¾²¢½«ÀàËƵÄʹÓÃģʽ·Ö×éÔÚÒ»Æð£¬ÒÔ±ãÌṩ¸üºÃµÄʹÓþÑé¸øÓû§
ÓªÏú»î¶¯·ÖÎö - Õë¶Ô×îÓпÉÄÜÏìÓ¦´ÙÏú»î¶¯µÄ¿Í»§½øÐдÙÏú£¬ÒÔ¸üÓÐЧµÄ·½Ê½Ê¹ÓÃÓªÏú¾·Ñ
ÐÅÏ¢ÖÊÁ¿ - Ö¸³öÊý¾ÝÊäÈë»òÊý¾Ý¼ÓÔØÆÚ¼äµÄÒì³£Çé¿ö²¢¼ÓÒÔ´¦Àí£¬ÒÔÌá¸ßÐÅÏ¢µÄÖÊÁ¿
ÎÄ×Ö·ÖÎö - ·ÖÎö¶à·½Òâ¼û£¬ÒÔÕÒ³öÓйؿͻ§»òÔ±¹¤Ëù¹ØÐĵij£¼û»°ÌâºÍÇ÷ÊÆ£¬Ê¹ÓÃδ¾¹ý×éÖ¯µÄÊäÈëÊý¾ÝÀ´×ö³ö¾ö²ß
È«ÃæÐԵĿª·¢»·¾³
¾ß±¸¿ÉÖ´ÐеÄÉîÈ붴²ìÁ¦£¬ÀûÓà Business Intelligence Development Studio (BIDS) À´¿ìËÙÇÒ¾«È·µØ×ö³ö¾ö²ß¡£
ʹÓÃÊý¾ÝÍÚ¾òÏòµ¼ºÍÊý¾ÝÍÚ¾òÉè¼Æ¹¤¾ßÀ´½¨Á¢¸´
Ïà¹ØÎĵµ£º
SQL ServerµÄһЩϵͳ±äÁ¿
sp_configure 'min server memory' --·þÎñÆ÷×îСÄÚ´ægosp_configure 'max server memory' --·þÎñÆ÷×î´óÄÚ´æ'gosp_configure 'index create memory'--´´½¨Ë÷ÒýÕ¼ÓõÄÄÚ´ægo--sp_configure 'min memory per query'--ÿ´Î²éѯռÓõÄ×îСÄÚ´æ
--»ñÈ¡I/O¹¤×÷Çé¿öselect -- @@id_bus ......
1.Ôø¾²»Ð¡ÐÄ°Ñ¿ª·¢¿âµÄÊý¾Ý¿â±íÈ«²¿É¾³ý£¬µ±Ê±ÏŵÄÒªËÀ¡£½á¹ûÕÒµ½ÏÂÃæµÄÓï¾ä»Ö¸´µ½ÁË1¸öСʱ֮ǰµÄÊý¾Ý£¡ºÜ¼òµ¥¡£
×¢ÒâʹÓùÜÀíÔ±µÇ¼ϵͳ£º
select * from ±íÃû as of timestamp sysdate-1/12 //²éѯÁ½¸öСʱǰµÄij±íÊý¾Ý£¡¼ÈÈ»Á½Ð¡Ê±ÒÔÇ°µÄÊý¾Ý¶¼µÃµ½ÁË£¬¼ÌÐøÔõô×ö£¬ÖªµÀÁË°É¡£¡£
Èç¹ûdropÁË±í£¬Ôõô°ì£¿£¿¼ûÏ ......
Ö´ÐÐ Êý¾Ý¿â²éѯʱ£¬ÓÐÍêÕû²éѯºÍÄ£ºý²éѯ֮·Ö¡£
Ò»°ãÄ£ºýÓï¾äÈçÏ£º
SELECT ×ֶΠfrom ±í WHERE ij×ֶΠLike Ìõ¼þ
ÆäÖйØÓÚÌõ¼þ£¬SQLÌṩÁËËÄÖÖÆ¥Åäģʽ£º
1£¬%£º±íʾÈÎÒâ0¸ö»ò¶à¸ö×Ö·û¡£¿ÉÆ¥ÅäÈÎÒâÀàÐͺͳ¤¶ÈµÄ×Ö·û£¬ÓÐЩÇé¿öÏÂÈôÊÇÖÐÎÄ£¬ÇëÔËÓÃÁ½¸ö°Ù·ÖºÅ£¨%%£©±íʾ¡£
±ÈÈç SELECT * from [user] WHERE u_na ......
СµÜÏëÎʸöÎÊÌ⣬ÔÚSQL Server 2005ÉÏ£¬½¨Á¢Ö÷¼üµÄͬʱ¾Í»áĬÈÏÔÚÖ÷¼üÉÏÉèÖþ۴ØË÷Òý£¬ÄÇôÄÜ·ñÔÚÒ»¸ö×Ö¶ÎÉÏÉèÖÃÖ÷¼üºÍΨһÐÔË÷Òý£¨Unique£©£¬µ«ÊǰѾ۴ØË÷ÒýÉèÖõ½ÁíÒ»¸ö×Ö¶ÎÉÏ£¿
¾Ù¸ö¼òµ¥µÄÀý×Ó£¬±ÈÈçÎÒÓиö±í½ÐTableTest£¬±íÀïÓÐÁ½¸ö×ֶΣ¬id,date£¬±¾À´idÊÇÖ÷¼üµÄ£¬ÎÒÏÖÔÚÏë°Ñ¾Û´ØË÷ÒýÉèÖõ½date×Ö¶ÎÉÏ¡£
ÎÒÏÈɾ³ýÖ ......
SQL Server ·ÖÒ³
½¨Á¢±í£º
CREATE TABLE [TestTable] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[FirstName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
[LastName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
[Country] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[Note] [nvarchar ......