SQL statement inserts data from the local server into the extranet server

Source: Internet
Author: User

--import data from a table in a local database into a 180 database--This is going to run exec sp_addlinkedserver on the local database.'Srv_lnk',"','SQLOLEDB','xxx.xxx.xxx'--IP exec sp_addlinkedsrvlogin of the server to be imported'Srv_lnk','false',NULL,'Account name','account Password'--account name and password of the server to be imported Go--data import INSERT into Srv_lnk.qu.dbo.AAE_InsuranceProduct (insurecompany,ccoverage,productno,productname)--Server database,SelectInsurecompany,ccoverage,productno,productname fromqu.dbo.aae_insuranceproduct--to a local database,--close connection exec sp_dropserver'Srv_lnk','droplogins' 

The connection must be closed after import, or an error will occur

SQL statement inserts data from the local server into the extranet server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.