You can use the SQL-Server Enterprise Manager to create, pay attention to both RPC and RPC OUT, or use SQL statements to complete the definition, mainly involving three stored procedures sp_addlinkedServer, sp_serverOption and sp_addlinkedsrvlogin, the following is three stored procedures Syntax: sp_addlinkedServer
Create a link to allow it to allow distributed, targeted
OLE DB
The heterogeneous query of the data source is accessed. In use
sp_addlinkedServer
After creating a link server, this server can perform a distributed query. If the link server is defined as
Microsoft® SQL ServerTM
The remote stored procedure can be performed.
grammar
SP_ADDLINKEDSERVER [@server =] 'server' [, [@srvproduct =] 'product_name'] [, [@Provider =] 'provider_name'] [, [@datasrc =] 'data_source'] [, [@Location =] ' Location '] [, [@Provstr =]' proviker_string '] [, [@catalog =]' Catalog '], for example: sp_addlinkedServer' ServerName ',' ',' sqloledb ',' DBCONN ', NULL,' Driver = {SQL Server}; server = 192.168.1.181; UID = SA, PWD =; 'here ServerName is a custom name, DBCONN is generally used by the parameters defined by the ODBC data source as follows: @server "linked server" @SRVPRoduct "Product Name" @Provider "provider" @datasrc "data source" two, set the server option to use the sp_serveroption process, the parameters you want to use are as follows: @server "linked server" @optname "rpc" or "rpc out" @optvalue true or false 3, add Login uses the sp_addlinkedsrvlogin process, the parameters you want to use are as follows: @rmtsrvname "linked server" @useself true or false @ locallogin local login @ RMTuser remote user @rmtpassword remote user password