Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经设置了 2 个链接的服务器。从我的本地服务器,我正在执行一个将在远程服务器上运行的 SP。
脚本的下一部分要求我将通过远程服务器上的 SP 所做的更改插入到本地服务器中的数据。
因此我的问题是,这个过程是异步的还是同步的?
如果您不指定其他内容,则全部是同步的。
这就是您从 C# 异步调用 sps 的方式(注意 -->
new SqlConnection(connectionstring + "async=true;");
)。
这是从 T-SQL 异步调用 sps 的一种方法。
以上所有内容只是为了表明,如果您只是调用sps,那么它都是同步的(调用者等待被调用者返回)。