我有SQL Server 2016,正在尝试为同一服务器上的另一个数据库创建外部数据源。 documentation说它适用于SQL Server 2016,但以下命令失败,并显示错误
“ EXTERNAL”附近的语法不正确
代码:
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'master_key';
CREATE DATABASE SCOPED CREDENTIAL cred
WITH
IDENTITY = 'test_user'
, SECRET = 'test_password'
;
CREATE EXTERNAL DATA SOURCE TEST
WITH
(
LOCATION = 'sqlserver://same_sql_server'
, CREDENTIAL = cred
)