Remote SQL link

xiaoxiao2021-03-06  79

- 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' Go

- Query example Select * from srv_lnk. Database name .dbo. Table name

- Import example selection * INTO table from srv_lnk. Database name. Dbo. Table name

Go - to remove the link server exec sp_dropserver 'srv_lnk', 'DrOPLogins'

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

New Post(0)