SQL Server 2005 Express Edition Óû§ÊµÀý
Roger Wolter
ÊÊÓÃÓÚ£º
SQL Server 2005 Express Edition
ÕªÒª£º±¾ÎĽéÉÜ SQL Server 2005 Express Edition ÖеÄÓû§ÊµÀý£¬ÒÔ¼°ÈçºÎʹÓÃËüÃÇÀ´¼ò»¯Ïò Visual Studio ÏîÄ¿Ìí¼ÓÊý¾Ý¿â¹¦ÄܵIJÙ×÷¡£
Äú¿ÉÒÔÏÂÔر¾ÎÄʹÓÃµÄ Microsoft Word °æ±¾¡£
±¾Ò³ÄÚÈÝ
¼ò½é
¸½¼ÓÊý¾Ý¿âÎļþ
AttachDBFilename
Óû§ÊµÀý
´ò¿ªÓû§ÊµÀýÁ¬½Ó
SSEUtil
ĬÈÏÅäÖÃΪ¹Ø±Õ
´ÓÆäËû¿Í»§¶ËÁ¬½Óµ½Óû§ÊµÀý
Óû§ÊµÀýÏÞÖÆ
³£¼ûÎÊÌâ
·Ö·¢ºÍ²¿Êð
RANU
ת»»Óû§ÊµÀýÊý¾Ý¿â
С½á
¼ò½é
Ð嵀 SQL Server 2005 Express Edition µÄÉè¼ÆÄ¿±êÊÇʵÏÖÓë Visual Studio Êý¾Ý¿âÉè¼Æ¹¦Äܸü½ôÃܵļ¯³É¡£Visual Studio ÏîĿϵͳ·Ç³£Éó¤¹ÜÀí×é³ÉÏîÄ¿µÄÒ»×éÎļþ¡£ÒªË³ÀûµØÊÊÓ¦´Ë¹¤¾ß¼¯£¬±ØÐ뽫 SQL Server Êý¾Ý¿â×÷ΪÎļþ½øÐвÙ×÷¡£ÐÒÔ˵أ¬SQL Server Êý¾Ý¿âÊÇÒ»¸öÎļþ¼¯ºÏ£¬Òò´Ë½«Îļþ¼¯ºÏ×÷Ϊ Visual Studio ÏîÄ¿µÄÒ»²¿·Ö½øÐйÜÀí²¢²»¸´ÔÓ¡£Òź¶µÄÊÇ£¬ÔÚÄúµÄÓ¦ÓóÌÐòÖн«ÕâЩÎļþ×÷ΪÊý¾Ý¿â½øÐÐÁ¬½Ó²¢²»ÈçËùÔ¸µÄÄÇÑù¼òµ¥ºÍ×Ô¶¯»¯¡£Óû§ÊµÀý¹¦ÄÜʹ¸Ã²Ù×÷±äµÃ¸üÈÝÒס£
·µ»ØÒ³Ê×
¸½¼ÓÊý¾Ý¿âÎļþ
Èç¹ûÎÒÃÇÁ˽â Microsoft SQL Server 2005 ÖеÄÓû§ÊµÀýÊÇÓÃÀ´½â¾öÄÄЩÎÊÌâµÄ£¬¾Í¸üÈÝÒ×Àí½âÕâЩʵÀý¡£±¾½Ú½éÉÜÈçºÎ½«Êý¾Ý¿âÎļþ¸½¼Óµ½Ò»¸ö SQL Server Êý¾Ý¿âʵÀýÖУ¬ÕâÊÇÓû§ÊµÀý¿ÉÒÔ¼ò»¯µÄ²Ù×÷Ö®Ò»¡£
±¾ÎÄÌṩÁ½ÖÖ SQL Server Êý¾Ý¿âÎļþÀàÐÍ£¨»¹ÓÐÆäËûÀàÐÍ£¬µ«ÊǶÔÓÚÎÒÃǶøÑÔ£¬Á½ÖÖ×ãÒÔ£©¡£¼´Êý¾Ý (.mdf) ÎļþºÍÈÕÖ¾ (.log) Îļþ¡£
°üº¬Êý¾Ý¿âÊý¾ÝµÄÎļþµÄÀ©Õ¹ÃûΪ .mdf£¬ÀýÈ磬AccountsReceivable.mdf ÊÇÒ»¸öÊý¾ÝÎļþ¡£Ã¿¸öÊý¾ÝÎļþ¶¼ÓÐÒ»¸ö¶ÔÓ¦µÄÈÕÖ¾Îļþ£¬¸ÃÈÕÖ¾Îļþ°üº¬ÊÂÎñÈÕÖ¾¡£ÈÕÖ¾ÎļþµÄÀ©Õ¹ÃûΪ .ldf¡£ÀýÈ磬Êý¾Ý¿âµÄÈÕÖ¾Îļþ±»ÃüÃûΪ AccountsReceivable_log.ldf¡£
ÕâÁ½¸öÎļþ±Ë´Ë½ôÃÜñîºÏ¡£Êý¾Ý¿âÎļþ°üº¬ÓйØÈÕÖ¾Îļþ׼ȷ°æ±¾µÄÐÅÏ¢¡£Èç¹û´Ó±¸·Ý»Ö¸´Êý¾ÝÎļþ£¬µ«²»»Ö¸´Ïàͬ°æ±¾µÄÈÕÖ¾Îļþ£¬ÔòÊý¾Ý¿â²»»áÆô¶¯¡£µ±ÔÚÏîÄ¿ÖвÙ×÷Êý¾Ý¿âÎļþʱ£¬½«ÕâÁ½¸öÎļþ×÷Ϊһ¸öÆ¥Å伯·Ç³£ÖØÒª¡£ÀýÈ磬Èç¹û»¹Ôµ½ÒÔÇ°°æ±¾µÄ .mdf Îļþ£¬»¹±ØÐ뻹Ե½Ïàͬ°æ±¾µÄ .ldf Îļþ¡£
ÔÚÁ¬½Óµ½ SQL Server Êý¾Ý¿â֮ǰ£¬·þÎñÆ÷±ØÐëÖªµÀÕâЩÊý¾Ý¿âÎļþ¡£·þÎñÆ÷´ò¿ªÎļþ¡¢ÑéÖ¤°æ±¾¡¢È·±£ÈÕÖ¾ÎļþÓëÊý¾Ý¿âÎļþÆ¥Å䣬ȻºóÖ´ÐÐʹÊý¾Ý¿âÎļþÓëÈÕÖ¾Îļþͬ²½ËùÐèµÄÈκλָ´²Ù×÷¡£ÈÃÔËÐÐ SQL Server µÄ·þÎñÆ÷ÖªµÀij¸öÊý¾Ý¿âÎļþµÄ¹ý³Ì³ÆΪ¸½¼Ó Êý¾Ý¿â¡£Èç¹û Sally ÓÐÒ»¸öÐèҪͨ¹ýÆóÒµ·
Ïà¹ØÎĵµ£º
EXECºÍsp_executesqlµÄÇø±ð£¿
DBCC FREEPROCCACHE --¡·Çå¿Õ»º´æÖеÄÖ´Ðмƻ®
SELECT cacheobjtype,objtype,usecounts,sql from sys.syscacheobjects WHERE sql NOT LIKE '%cach%' AND sql NOT LIKE '%sys.%' --¡·²éÕÒ¶ÔÓ¦µÄ»º´æÖеĶÔÓ¦¼Æ»®
SQL ServerΪÿһ¸öµÄ²éѯ×Ö·û´®´´½¨ÐµÄÖ´Ðмƻ®£¬¼´Ê¹²éѯģʽÏàͬҲÊÇÕâÑù
......
1. ËÀËøÔÀí
¸ù¾Ý²Ù×÷ϵͳÖеĶ¨Ò壺ËÀËøÊÇÖ¸ÔÚÒ»×é½ø³ÌÖеĸ÷¸ö½ø³Ì¾ùÕ¼Óв»»áÊͷŵÄ×ÊÔ´£¬µ«Òò»¥ÏàÉêÇë±»ÆäËû½ø³ÌËùÕ¾Óò»»áÊͷŵÄ×ÊÔ´¶ø´¦ÓÚµÄÒ»ÖÖÓÀ¾ÃµÈ´ý״̬¡£
ËÀËøµÄËĸö±ØÒªÌõ¼þ£º
»¥³âÌõ¼þ(Mutual exclusion)£º×ÊÔ´²»Äܱ»¹²Ïí£¬Ö»ÄÜÓÉÒ»¸ö½ø³ÌʹÓá£
ÇëÇóÓë±£³ÖÌõ¼þ(Ho ......
select batch_no "Åú´ÎºÅ",get_id "·ÖÀà" from (
select(
select plan1.batch_no from product_plan plan1 where plan1.item_no=(select head1.product_code from wo_head head1 where head1.order_no =bbb)) batch_no,
(select decode(get_id,'BUY','Í⹺¼þ','MAK','×ÔÖƼþ','MB','䶨') from item where item_ ......
£¨1£©Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
ORACLE µÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡£Èç¹ûÓÐ3¸öÒÔÉϵıíÁ¬½Ó²éѯ, ÄǾÍÐèҪѡÔñ½»²æ±í(interse ......
ת×Ôhttp://www.tzwhx.com/newOperate/Html/3/31/311/16609.html
Óï·¨
CREATE TRIGGER trigger_name
ON { table | view }
[ WITH ENCRYPTION ]
{
{ { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] }
[ WITH APPEND ]
......