SQL 2005ÆôÓÃ×é¼þAd Hoc Distributed Queries
SQL Server ×èÖ¹Á˶Ô×é¼þ 'Ad Hoc Distributed Queries' µÄ STATEMENT'OpenRowset/OpenDatasource' µÄ·ÃÎÊ£¬ÒòΪ´Ë×é¼þÒÑ×÷Ϊ´Ë·þÎñÆ÷°²È«ÅäÖõÄÒ»²¿·Ö¶ø±»¹Ø±Õ¡£ÏµÍ³¹ÜÀíÔ±¿ÉÒÔͨ¹ýʹÓà sp_configure ÆôÓà 'Ad Hoc Distributed Queries'¡£ÓйØÆôÓà 'Ad Hoc Distributed Queries' µÄÏêϸÐÅÏ¢£¬Çë²ÎÔÄ SQL Server Áª»ú´ÔÊéÖÐµÄ "ÍâΧӦÓÃÅäÖÃÆ÷"¡£ ÓÚÊÇ°´ÕÕÌáʾ·ÁËÒ»ÏÂSQL 2005µÄÁª»ú´ÔÊ飬µÃÖªÆôÓÃAd Hoc Distributed QueriesµÄ·½·¨£¬¾ßÌåÈçÏ£º exec sp_configure 'show advanced options',1 reconfigure exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure ʹÓÃÍê±Ïºó£¬¼ÇµÃÒª¹Ø±ÕËü£¬ÒòΪÕâÊÇÒ»¸ö°²È«Òþ»¼ exec sp_configure 'Ad Hoc Distributed Queries',0 reconfigure exec sp_configure 'show advanced options',0 reconfigure ±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/lishewen/archive/2007/12/14/1935986.aspx
Ïà¹ØÎĵµ£º
1. ¶¨ÒåÓα궨Òå
ÓαêÓï¾äµÄºËÐÄÊǶ¨ÒåÁËÒ»¸öÓαê±êʶÃû£¬²¢°ÑÓαê±êʶÃûºÍÒ»¸ö²éѯÓï¾ä¹ØÁªÆðÀ´¡£DECLAREÓï¾äÓÃÓÚÉùÃ÷Óα꣬Ëüͨ¹ýSELECT²éѯ¶¨ÒåÓαê´æ´¢µÄÊý¾Ý¼¯ºÏ¡£Óï¾ä¸ñʽΪ£º
DECLARE ÓαêÃû³Æ [INSENSITIVE] [SCROLL]
CURSOR FOR selectÓï¾ä
[FOR{READ ONLY|UPDATE[OF ÁÐÃû×Ö±í]}]
²ÎÊý˵Ã÷£º
INSENSITIVEÑ¡Ï ......
ÎÊ£ºÔõÑùÔÚÒ»¸öUPDATEÓï¾äÖÐʹÓñíBµÄÈý¸öÁиüбíAÖеÄÈý¸öÁУ¿
¡¡¡¡´ð£º¶ÔÕâ¸öÎÊÌ⣬Äú¿ÉÒÔʹÓÃÇ¿´óµÄ¹Øϵ´úÊý¡£±¾Ò³ÖеĴúÂë˵Ã÷ÁËÈçºÎ×éºÏʹÓÃfrom×Ó¾äºÍJOIN²Ù×÷£¬ÒÔ´ïµ½ÓÃÆäËû±íÖÐÊý¾Ý¸üÐÂÖ¸¶¨ÁеÄÄ¿µÄ¡£ÔÚÉè¼Æ¹Øϵ±í´ïʽʱ£¬ÄúÐèÒª¾ö¶¨ÊÇ·ñÐèÒªµ¥Ò»ÐÐÆ¥Åä¶à¸öÐУ¨Ò»¶Ô¶à¹Øϵ£©£¬»òÕßÐèÒª¶à¸öÐÐÆ¥Åä±»Áª½Ó±íÖеĵ¥Ò» ......
1. ¶ÔÓÚPHP magic_quotes_gpc=onµÄÇé¿ö£¬ ÎÒÃÇ¿ÉÒÔ²»¶ÔÊäÈëºÍÊä³öÊý¾Ý¿âµÄ×Ö·û´®Êý¾Ý×÷
addslashes()ºÍstripslashes()µÄ²Ù×÷,Êý¾ÝÒ²»áÕý³£ÏÔʾ¡£ Èç¹û´ËʱÄã¶ÔÊäÈëµÄÊý¾Ý×÷ÁËaddslashes()´¦Àí£¬
ÄÇôÔÚÊä³öµÄʱºò¾Í±ØÐëʹÓÃstripslashes()È¥µô¶àÓàµÄ·´Ð±¸Ü¡£ 2. ¶ÔÓÚPHP magic_quotes_gpc=off µÄÇé¿ö ±ØÐëÊ¹Ó ......
µ±SQLServerµÄϵͳÈÕÖ¾¹ý´ó£¬¾Í»áÒýÆðSQLServer·þÎñÆ÷ÎÞ·¨Æô¶¯µÈһϵÁÐÎÊÌâ¡£½ñÌìÎÒÓöµ½ÁËÕâ¸öÎÊÌ⣬ÔÚÍøÉÏËÑË÷ÁËһϣ¬½â¾ö·½·¨ÊÇɾ³ý¾Í¿ÉÒÔÁË£¬¿ÉÊǵ±Ç°µÄErrorLogÕýÔÚ±»SQLʹÓÃÎÞ·¨É¾³ý°¡£¬ÒªÉ¾³ýÖ»ÄÜÍ£Ö¹SQL·þÎñÆ÷£¬ÄѵÀ¾ÍûÓбðµÃ°ì·¨ÁËÂð£¿
»Ø´ðÊǿ϶¨µÄ£ºÊ¹ÓÃÒÔÏ´洢¹ý³Ì£º ......
Çå¿ÕÈÕÖ¾£º
dump transaction ¿âÃû with no_log
½Ø¶ÏÈÕÖ¾£º
backup log ¿âÃû with no_log
ѹËõÊý¾Ý¿â£º
dbcc shrinkdatabase (¿âÃû, Ä¿±ê±ÈÂÊ)
ѹËõÊý¾Ý¿âÎļþ£º
dbcc shrinkfile (ÎļþÃû»òID, Ä¿±ê´óС)
ÎļþÃû»òID¿ÉÒÔͨ¹ýϵͳ±ísysfiles²éÕÒ£¬Èç¹û²»Ö¸¶¨Ä¿±ê´óСSQL Server½«×î´óÏ޶ȵÄѹËõÊý¾Ý¿âÎļþ¡£
²é¿´Ñ¹ ......