0

I have SQL Server 2016 and I'm trying to create an external data source to another database on the same server. The documentation says that it applies to SQL Server 2016 but the following command fails with error

Incorrect syntax near 'EXTERNAL'

Code:

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
)
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
PedroC88
  • 3,708
  • 7
  • 43
  • 77
  • `LOCATION` requires an instance name for the SQL Server. See [the documentation](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-external-data-source-transact-sql?view=sql-server-2017) – Ken White Jun 27 '19 at 23:38
  • Even if it's the default? – PedroC88 Jun 27 '19 at 23:39
  • For future reference, based on the documentation it appears the instance name is optional, even so I tried specifying it but it didn't make a difference. – PedroC88 Jul 01 '19 at 15:24

0 Answers0