Use the link server to perform the stored procedure on the remote database

xiaoxiao2021-03-06  45

Excerpted from 9CBS ------------------------------------ ------------- Create a link server EXEC SP_ADDLINKEDSERVER 'SRV_LNK', '', 'SQLOLEDB', 'Remote Server Name or IP Address' Exec Sp_addlinkedsrvlogin' SRV_LNK ',' FALSE ', NULL,' User name ',' password 'exec sp_serverOption' srv_lnk ',' RPC out ',' True '- This allows the stored procedure to call the link server

Declare @ID INTEXEC SRV_LNK.QSoft2.dbo.ins' people, 'Mobile', '13598136858', @ id = @ ID OUTPUT

转载请注明原文地址:https://www.9cbs.com/read-86390.html

New Post(0)