I had wanted to use sp_addlinkedserver but it may be no authority, Quxianjiuguo with EXTERNAL TABLE.
step:
1,CREATE MASTER KEY ENCRYPTION BY PASSWORD = '123456';
2,CREATE DATABASE SCOPED CREDENTIAL DBQueryAbcd
WITH IDENTITY = 'abcde',
SECRET = '123456';
This user name and password for the remote server
3,CREATE EXTERNAL DATA SOURCE DBQueryAbcdDataSrc WITH
(TYPE = RDBMS,
LOCATION = 'abcdefg.database.chinacloudapi.cn',
DATABASE_NAME = 'usertable',
CREDENTIAL = DBQueryAbcd,
) ;
This is the remote address and name DB
4,CREATE EXTERNAL TABLE dbo.usertable
(
[id] [int] NOT NULL,
[usid] [nvarchar](256) NULL,
[user_name] [nvarchar](256) NULL
)
WITH
( DATA_SOURCE = DBQueryAbcdDataSrc)
This structure should be the same as the original table
End