生活随笔
收集整理的這篇文章主要介紹了
Sql自动更新不同IP的数据库数据。(link Server)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
| if not exists(select??? *??? from??? master.dbo.sysservers??? where??? srvname='srv_lnk6' and datasource='19.127.57.227')?? begin??? ???? if exists(select??? *??? from??? master.dbo.sysservers??? where??? srvname='srv_lnk6')?? ????? begin--IP的改變時刪除注名 ?????????? exec sp_droplinkedsrvlogin 'srv_lnk6',null ?????????? exec sp_dropserver??? 'srv_lnk6' ????? end ????????? exec sp_addlinkedserver??? 'srv_lnk6','','SQLOLEDB','19.127.57.227' end ????? exec sp_addlinkedsrvlogin 'srv_lnk6','false',null,'sa','123456' exec('insert into srv_lnk6.trade.dbo.news(type,zllb,zt,zt_color,zt_b,nr)select ''3'',''2'',file_title,''#333333'',''1'',file_content from recfile where id={0}') ? 來自:http://hi.baidu.com/lintan7878/blog/item/5431a944c1babf4d510ffe22.html |
轉載于:https://www.cnblogs.com/hanwater/archive/2010/11/15/1877637.html
總結
以上是生活随笔為你收集整理的Sql自动更新不同IP的数据库数据。(link Server)的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。