EXEC master.dbo.sp_addlinkedserver @server = N'192.168.2.2', @srvproduct = N'sqlserver', @provider = N'MSDASQL', @provstr = N'DRIVER={SQL Server Native Client 10.0};SERVER=192.168.2.2;' EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'192.168.2.2',--連結伺服器名稱 @useself = N'FALSE', @locallogin = NULL, @rmtuser = N'sa', @rmtpassword = '123' GO EXEC sp_linkedservers; --EXEC sp_dropserver '192.168.2.2'