SQLSERVER建立連線伺服器

RookieBoy666發表於2024-10-16
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' 

相關文章