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

SQL Server 2008 Books Online (November 2009)

ÈôÒªÊÕËõÌض¨Êý¾Ý¿âµÄËùÓÐÊý¾ÝºÍÈÕÖ¾Îļþ£¬ÇëÖ´ÐÐ DBCC SHRINKDATABASE ÃüÁî¡£ÈôÒªÒ»´ÎÊÕËõÒ»¸öÌض¨Êý¾Ý¿âÖеÄÒ»¸öÊý¾Ý»òÈÕÖ¾Îļþ£¬ÇëÖ´ÐÐ DBCC SHRINKFILE
ÃüÁî¡£
ÈôÒª²é¿´Êý¾Ý¿âÖе±Ç°µÄ¿ÉÓã¨Î´·ÖÅ䣩¿Õ¼äÁ¿£¬ÇëÔËÐÐ sp_spaceused
¡£
¿ÉÔÚ½ø³ÌÖеÄÈÎÒ»µãÍ£Ö¹ DBCC SHRINKDATABASE ²Ù×÷£¬ÈκÎÒÑÍê³ÉµÄ¹¤×÷¶¼½«±£Áô¡£
ÊÕ
ËõºóµÄÊý¾Ý¿â²»ÄÜСÓÚÊý¾Ý¿âµÄ×îС´óС¡£×îС´óСÊÇÔÚÊý¾Ý¿â×î³õ´´½¨Ê±Ö¸¶¨µÄ´óС£¬»òÊÇʹÓÃÎļþ´óС¸ü¸Ä²Ù×÷£¨Èç DBCC SHIRNKFILE »ò
ALTER DATABASE£©ÏÔʽÉèÖõÄ×îºó´óС¡£ÀýÈ磬Èç¹ûÊý¾Ý¿â×î³õ´´½¨Ê±µÄ´óСΪ 10 MB£¬ºóÀ´Ôö³¤µ½ 100
MB£¬Ôò¸ÃÊý¾Ý¿â×îСֻÄÜÊÕËõµ½ 10 MB£¬¼´Ê¹ÒѾ­É¾³ýÊý¾Ý¿âµÄËùÓÐÊý¾ÝÒ²ÊÇÈç´Ë¡£
ÔË
ÐÐ DBCC SHRINKDATABASE ¶ø²»Ö¸¶¨ NOTRUNCATE Ñ¡Ïî»ò TRUNCATEONLY Ñ¡ÏîµÈ¼ÛÓÚ´ø
NOTRUNCATE ÔËÐÐ DBCC SHRINKDATABASE ²Ù×÷£¬È»ºóÔÙ´ø TRUNCATEONLY ÔËÐÐ DBCC
SHRINKDATABASE ²Ù×÷¡£
ÒªÊÕËõµÄÊý¾Ý¿â²»±ØÔÚµ¥Óû§Ä£Ê½Ï£»ÆäËûµÄÓû§ÈÔ¿ÉÒÔÔÚÊý¾Ý¿âÊÕËõʱ¶ÔÆä½øÐй¤×÷¡£ÕâÒ²°üÀ¨ÏµÍ³Êý¾Ý¿â¡£
²»ÄÜÔÚ±¸·ÝÊý¾Ý¿âʱÊÕËõÊý¾Ý¿â¡£·´Ö®£¬Ò²²»ÄÜÔÚÊý¾Ý¿âÖ´ÐÐÊÕËõ²Ù×÷ʱ±¸·ÝÊý¾Ý¿â¡£
NOTRUNCATE
ͨ¹ý½«ÒÑ·ÖÅäµÄÒ³´ÓÎļþĩβÒƶ¯µ½ÎļþÇ°ÃæµÄδ·ÖÅäÒ³À´Ñ¹ËõÊý¾ÝÎļþÖеÄÊý¾Ý
¡£target_percent
ÊÇ¿ÉÑ¡²ÎÊý¡£
ÎļþĩβµÄ¿ÉÓÿռ䲻»á·µ»Ø¸ø²Ù×÷ϵͳ
£¬ÎļþµÄÎïÀí´óСҲ²»»á¸ü¸Ä
¡£Òò´Ë£¬Ö¸¶¨ NOTRUNCATE ʱ£¬Êý¾Ý¿â¿´ÆðÀ´Î´ÊÕËõ¡£
NOTRUNCATE Ö»ÊÊÓÃÓÚÊý¾ÝÎļþ¡£ÈÕÖ¾Îļþ²»ÊÜÓ°Ïì¡£
TRUNCATEONLY
½«ÎļþĩβµÄËùÓпÉÓÿռäÊͷŸø²Ù×÷ϵͳ
£¬µ«²»ÔÚÎļþÄÚ²¿Ö´ÐÐÈκÎÒ³Òƶ¯
¡£Êý¾ÝÎļþÖ»ÊÕËõµ½×î½ü·ÖÅäµÄÇø¡£Èç¹ûÓë TRUNCATEONLY Ò»ÆðÖ¸¶¨£¬½«ºöÂÔ target_percent
¡£
TRUNCATEONLY Ö»ÊÊÓÃÓÚÊý¾ÝÎļþ¡£ÈÕÖ¾Îļþ²»ÊÜÓ°Ïì
¡£


Ïà¹ØÎĵµ£º

mysql+phpÎÞ·¨Á¬½Ósql£¨Òѽâ¾ö£©

¸ãÁ˺ܾᣡ£ÖÕÓÚ·¢ÏÖÔ­À´ÊÇȨÏÞÎÊÌâ¡£¡£
2ÐÐÃüÁî¸ã¶¨
grant all privileges on rogue.* to admin@localhost identified by 'admin' with grant option
grant all privileges on rogue.* to admin@'%' identified by 'admin' with grant option
¾­µäÁË¡£¡£¡£
ħÁ¦Ë½·þÍøÒ³¶Ë¸ã¶¨¿©~~ ......

sql´æ´¢¹ý³ÌѧϰʵÀý

ʲôÊÇ´æ´¢¹ý³ÌÄØ£¿
¡¡¡¡¶¨Ò壺
¡¡¡¡½«³£ÓõĻòºÜ¸´ÔӵŤ×÷£¬Ô¤ÏÈÓÃSQLÓï¾äдºÃ²¢ÓÃÒ»¸öÖ¸¶¨µÄÃû³Æ´æ´¢ÆðÀ´, ÄÇôÒÔºóÒª½ÐÊý¾Ý¿âÌṩÓëÒѶ¨ÒåºÃµÄ´æ´¢¹ý³ÌµÄ¹¦ÄÜÏàͬµÄ·þÎñʱ,Ö»Ðèµ÷ÓÃexecute,¼´¿É×Ô¶¯Íê³ÉÃüÁî¡£
¡¡¡¡½²µ½ÕâÀï,¿ÉÄÜÓÐÈËÒªÎÊ£ºÕâô˵´æ´¢¹ý³Ì¾ÍÊÇÒ»¶ÑSQLÓï¾ä¶øÒÑ°¡£¿
¡¡¡¡Microsoft¹«Ë¾ÎªÊ²Ã´»¹ÒªÌí¼ÓÕ ......

SqlÓï¾ä

Update  Channel set Unit ='mg' ,
RunUpThreshold='10' ,
RunDownThreshold='10' ,
SafetyUpThreshold='10' ,
SafetyDownThreshold='10' 
where Bridge='001' and DeviceCode='AS'
and SensorCode='001' and Supplement='N'
set  £º ','
where: and ......

SQLÈÕÖ¾µÄ¸ÅÄî

½ñÌì³é³öÒ»µãʱ¼ä½âÊͼ¸¸ö¹ØÓÚSQLÈÕÖ¾µÄ¸ÅÄËûÃÇÒ²¾­³£Ê¹³õѧÕßÍû¶øÖ¹²½£¬·´Õý¼ÆËã»úµÄÊõÓﶼÊǺܳéÏóµÄ£¬ËùÒÔµÚÒ»¸Ð¾õ¾ÍÊÇÍ·ÌÛ£¬È»ºóÈ»ºó¼¸´Îºó¾Íû¸Ð¾õÁË.ÒÔÏÂÓÐЩÊÇ´ÓÊéÉÏÕª³­µÄ,ÓеÄÊÇ´ÓÍøÉÏÕÒµÄËãÊǽ軨Ï×·ð°É!!
¡¡¡¡ÎïÀíÈÕÖ¾Îļþ£º
    Õâ¸ö±È½ÏºÃÀí½â£¬ÊµÊµÔÚÔڵĶ«Î÷£¬Êý¾Ý¿âĿ¼ÏÂÃæµÄ.ldfÎļþ ......

oracle PL/SQL FOR UPDATE Óë FOR UPDATE OFµÄÇø±ð

PL/SQL-FOR UPDATE Óë FOR UPDATE OFµÄÇø±ð
url:http://hi.baidu.com/1413/blog/item/a521251f7e5993c4a686696b.html
Êý¾Ý¿â oracle for update of   ºÍ   for updateÇø±ð    
select * from TTable1 for update Ëø¶¨±íµÄËùÓÐÐУ¬Ö»ÄܶÁ²»ÄÜд
2 select * from TTable1 wher ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ