将记录从另一个SQL Server插入我的本地SQL Server. [英] Insert records from another SQL Server to my Local SQL Server.

查看:59
本文介绍了将记录从另一个SQL Server插入我的本地SQL Server.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[VMSERVER\MBWIN] is my remote Server.





[DEVELOPER04\MBWIN] is my Local Server





I had established connection with my Linked(remote) Server, run some validations and after finishing the requirements needed, i will then copy/insert records from table GLAC which is located in my Linked Server into my local table DLYGLACC which can be found in [DEVELOPER04\MBWIN].MBMIS..

Here''s my code in copying/inserting of records;

strDLY = my local server ([DEVELOPER04\MBWIN].mbmis..DlyGlAcc)
strGL  = remote server ([VMSERVER].PUSAN_KRW_PROD.dbo.GLAC)
Conn = is my local connection

strSQL = "Insert Into " & strDLY & " Select * From " & strGL
Dim dx As New SqlDataAdapter(strSQL, conn)
Dim sx As New DataSet
dx.Fill(sx, "rDlyGlacc")

This error appeared;
Named Pipes Provider: Could not open a connection to SQL Server [1265]?

推荐答案

选中此项可修复错误
Check this to fix the error
Named Pipes Provider, error: 40 - Could not open a connection to SQL Server[^]


我改为将数据集保存到本地服务器的文本文件中,并转换(导入)到我的Sql服务器表.
I instead save the dataset into a textfile to my local server and convert(import) said to my Sql server table.


这篇关于将记录从另一个SQL Server插入我的本地SQL Server.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆