Linked Server In SQL Server Express

a 夏天 提交于 2019-12-12 08:38:51

问题


I am developing an app where i have a local database in SQL Server Express. During work in local database, we need to execute a query on another SQL Server / live server and its return a value and with this value we execute a query in local server.

It is OK when executing this query against 2 or 3 queries, but i have around 5000 records on which I need to execute same process. I have done with above style but its take too much time.

I've found that we can run a query on multiple servers.

Can i run a query on SQL Server Express and server at same time and and run my whole queries in this style?

I can run query from express to server only.


回答1:


Yes you can. Setup the LinkServer on the SQL Express then just pass your query in the four part name format

server . database . schema . object

example

select * from LinkServer.mydatabase.dbo.Table


来源:https://stackoverflow.com/questions/4162171/linked-server-in-sql-server-express

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!