the first method:
Select * from OpenDataSource ('sqloledb', 'data source = remote IP; user ID = sa; password = password'). Database name .dbo. Table name
Second method: First use the coupling server: exec sp_addlinkedserver 'alias', '', 'msdasql', null, null, 'driver = {SQL Server}; server = remote name; UID = user; PWD = password;' Exec Sp_addlinkedsrvlogin @ rmtsrvname = 'alias', @ useseelf = 'false', @ locallogin = 'sa', @ rmtuser = 'sa', @ rmtpassword = 'password' Go can then you can follow: select * from alias. library name. DBO. Table name INSERT library name .dbo. Table name Select * from alias. Table name .dbo. Table name Select * INTO library name. dbo. New table name from alias. Database name. dbo. Table name Go