¡¡ ÉϵãÓÒ¼ü¡¡£¬ÔÚ³öÏֵIJ˵¥Öе㡡н¨Êý¾Ý¿âÁ´½Ó¡¡£¬È»ºó»áµ¯³öÒ»¸ö½çÃ棬ÐèÒªÎÒÃÇÌîдµÄÓУºÁ´½Ó·þÎñÆ÷£¨ÕâÊÇÒ»¸öÃû×Ö£¬×Ô¼º¸ù¾ÝÇé¿ö×ÔÐж¨Ò壬ÒÔºó¾ÍҪͨ¹ýËû½øÐÐÔ¶³Ì·ÃÎÊÁË£©£¬Ìṩ³ÌÐòÃû³Æ£¨Õâ¸ö¾ÍÊÇÑ¡ÔñÊý¾ÝÇý¶¯£¬¸ù¾ÝÊý¾Ý¿âÀàÐÍÀ´Ñ¡Ôñ£¬²»ÄÜÂÒÑ¡£¬·ñÔòÁ´½Ó²»Éϵģ©£¬Êý¾ÝÔ´£¨¶ÔÓÚsqlserver¾ÍÊÇÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µÄÖ÷»úÃû»òÕßIP,¶ÔÓÚ oracle¡¡¾ÍÊÇÔÚ oracle net config ÖÐÅäÖõıðÃû£©£¬°²È«ÉÏÏÂÎÄÓû§ºÍ¿ÚÁҲ¾ÍÊÇÔ¶³Ì·þÎñÆ÷µÄÓû§ºÍ¿ÚÁ¡£
µÚ¶þÖÖ£ºÀûÓÃϵͳ´æ´¢¹ý³Ì
´´½¨Ò»¸ösqlserver¶ÔsqlserverµÄÊý¾Ý¿âÁ´½Ó£º
exec sp_addlinkedserver 'link_northsnow','',
'SQLOLEDB','Ô¶³Ì·þÎñÆ÷Ö÷»úÃû»òÓòÃû»òipµØÖ·'
exec sp_addlinkedsrvlogin 'link_northsnow','
false',null,'Óû§Ãû','Óû§¿ÚÁî'
´´½¨Ò»¸ösqlserver¶ÔOracleµÄÊý¾Ý¿âÁ´½Ó£º
exec sp_addlinkedserver 'link_ora', 'Oracle',
'MSDAORA', 'oracleÊý¾Ý¿â·þÎñÆ÷±ðÃû'
exec sp_addlinkedsrvlogin 'link_ora',
false, 'sa', 'Óû§Ãû', 'Óû§¿ÚÁî'
ÓÐÁËÊý¾Ý¿âÁ´½ÓÎÒÃǾͿÉÒÔʹÓÃÁË¡£¶ÔÓÚsqlserverºÍoracleÖеÄʹÓ÷½·¨ÊÇÓÐÇø±ðµÄ¡£
¶ÔÓÚsqlserver£º
create view v_lhsy_user as select * from link_northsnow.lhsy.dbo.sys_user
select * from v_lhsy_user
ÆäÖÐlhsyΪԶ³ÌµÄÊý¾Ý¿âÃû
sys_userΪ±íÃû
¶ÔÓÚoracle£º
create view vvv as select * from
link_ora..NORTHSNOW.SYS_USER
select * from vvv;
ÆäÖÐnorthsnowΪԶ³ÌoracleÊý¾Ý¿â·þÎñÆ÷µÄÒ»¸öÓû§Ãû£¬SYS_USERΪ¸ÃÓû§Ôڸ÷þÎñÆ÷ÉϵÄÒ»¸ö±í£¬Òª·Ç³£×¢ÒâµÄÊÇ£ºÊý¾Ý¿âÁ´½Ó£¨link_ora£©ºóÃæÓÐÁ½¸öµã£¨..£©£¬ÔÙÍùºóÃæ±ØÐëÈ«²¿´óд£¬²éѯµÄ¶ÔÏóÒ»°ãΪ±í¸ñ»òÕßÊÓͼ£¬²»ÄܲéѯͬÒå´Ê¡£
ÒªÏëɾ³ýÊý¾Ý¿âÁ´½Ó£¬Ò²ÓÐÁ½ÖÖ·½·¨£¬
Ò»ÖÖ·½·¨ÊÇÔÚÆóÒµ¹ÜÀíÆ÷ÖвÙ×÷¡£
ÁíÒ»ÖÖÊÇÓÃϵͳ´æ´¢¹ý³Ì£º
exec sp_dropserver
Êý¾Ý¿âÁ´½ÓÃû³Æ,'droplogins' ¡£