Insert Data From One Server To Another?

后端 未结 3 513
梦毁少年i
梦毁少年i 2020-12-06 07:20

If I want to run this sort of query in SQL Server, how can I do the same query from one server I am connected to to another?

I tried adding \"[ServerName1].\" before

3条回答
  •  庸人自扰
    2020-12-06 07:59

    The best way to do this would be to create a "linked server" between the two. You will need appropriate permissions to do this.

    Then it's just a matter of accessing the databases using your linkedserver name.

    Ex: [linkedserver].databasename.dbo.tablename

    To create a linkedserver, go to server objects->right click on linked servers->click on 'new linked server'.

提交回复
热议问题