SQL Server Linked Server ·ÃÎÊÔ¶³ÌÊý¾Ý¿â
ÔÚʹÓÃSQL ServerÊý¾Ý¿âʱ, Èç¹ûÐèÒª·ÃÎÊÔ¶³ÌµÄÁíÍâÒ»¸öÊý¾Ý¿â, ÄÇô¿ÉÒÔʹÓÃLinked ServerÀ´ÊµÏÖÕâ¸ö¹¦ÄÜ, ºÜ·½±ã. ±¾ÎÄ×ܽáÁË×Ô¼ºÔÚʹÓÃLinked Server¹¦ÄÜʱÓöµ½µÄ¼¸¸öÎÊÌâ, Èç¹ûÉÔ²»×¢Òâ,ºÜ¿ÉÄܳöÏÖ¸÷ÖÖ´íÎó.
1)´´½¨ÁËÒ»¸öеÄLinked Serverºó, ÐèÒªÊ×ÏÈÉèÖÃlogin ÕË»§, ÓÒ¼ü->ÊôÐÔ->Security, Èçͼ
Ïà¹ØÎĵµ£º
¹þÏ£Áª½ÓÊǵÚÈýÖÖÎïÀíÁª½ÓÔËËã·û£¬µ±Ëµµ½¹þÏ£Áª½Óʱ£¬ËüÊÇÈýÖÖÁª½ÓÔËËãÖÐÐÔÄÜ×îºÃµÄ£®Ç¶Ì×Ñ»·Áª½ÓÊÊÓÃÓÚÏà¶Ô½ÏСµÄÊý¾Ý¼¯£¬¶øºÏ²¢Áª½ÓÊÊÓÃÓÚÖеȹæÄ£µÄÊý¾Ý¼¯£¬¶ø¹þÏ£Áª½ÓÔòÊÊÓÃÓÚ´ó¹æÄ£Áª½ÓµÄÊý¾Ý¼¯£®
¹þÏ£Áª½ÓËã·¨²ÉÓ㢹¹½¨£¢ºÍ£¢Ì½²â£¢Á½²½À´Ö´ÐУ®ÔÚ£¢¹¹½¨£¢½×¶Î£¬ËüÊ×ÏÈ´ÓµÚÒ»¸öÊäÈëÖжÁÈ¡ËùÓÐÐУ¨³£½Ð×ö×ó»ò¹¹½¨Ê ......
×ֺţº ´ó´ó ÖÐÖРСС
Ëø¶¨Êý¾Ý¿âµÄÒ»¸ö±í
SELECT * from table WITH (HOLDLOCK)
×¢Òâ: Ëø¶¨Êý¾Ý¿âµÄÒ»¸ö±íµÄÇø±ð
SELECT * from table WITH (HOLDLOCK)
ÆäËûÊÂÎñ¿ÉÒÔ¶ÁÈ¡±í£¬µ«²»ÄܸüÐÂɾ³ý
SELECT * from table WITH (TABLOCKX)
ÆäËûÊÂÎñ²»ÄܶÁÈ¡±í,¸üкÍɾ³ý
SELECT Óï¾äÖГ¼ÓË ......
³£¼û²¢·¢²¢·¢Ò»ÖÂÐÔÎÊÌâ°üÀ¨£º¶ªÊ§µÄÐ޸ġ¢²»¿ÉÖظ´¶Á¡¢¶ÁÔàÊý¾Ý¡¢»ÃÓ°¶Á£¨»ÃÓ°¶ÁÔÚһЩ×ÊÁÏÖÐÍùÍùÓë²»¿ÉÖظ´¶Á¹éΪһÀࣩ¡£
2.2.1.1 ¶ªÊ§ÐÞ¸Ä
ÏÂÃæÎÒÃÇÏÈÀ´¿´Ò»¸öÀý×Ó£¬ËµÃ÷²¢·¢²Ù×÷´øÀ´µÄÊý¾ÝµÄ²»Ò»ÖÂÐÔÎÊÌâ¡£
¿¼ÂÇ·É»ú¶©Æ±ÏµÍ³ÖеÄÒ»¸ö»î¶¯ÐòÁÐ:
¼×ÊÛƱµã£¨¼×ÊÂÎñ£©¶Á³öijº½°àµÄ»úƱÓà¶îA,ÉèA=16.
ÒÒÊÛƱµã£¨ÒÒÊÂÎñ ......
SQL Server 2005 (MSSQLSERVER) ·þÎñ²»ÄÜÆô¶¯
ÔÒò:VIAÐÒ锸øÆôÓÃÁË£¬Í£ÓÓVIAÐÒé”ÎÊÌâ½â¾ö¡£
"VIAÐÒé"Í£Ó÷½·¨£º¿ªÊ¼->³ÌÐò->Microsoft SQL Server 2005->ÅäÖù¤¾ß->SQL Server Configuration Manager ->´ò¿ªºóÕÒµ½"SQL Server 2005 ÍøÂçÅäÖÃ"->MSSQLSERVER ÊôÐÔµÄÐÒé &nb ......