CREATE DATABASE D1 AS COPY OF D0 (SERVICE_OBJECTIVE = 'HS_GEN5_8')
Unfortunately, it is not parsed:
Error: Incorrect syntax near SERVICE_OBJECTIVE
At first glance, the ScriptDom grammar seems to permit either a service objective to be specified, or an AS COPY OF specification to be supplied - but not both at the same time. This is one possible reason for this issue but may be other considerations.
As an extension to the above core issue, consider the following valid SQL:
CREATE DATABASE D1 AS COPY OF D0 (SERVICE_OBJECTIVE = ELASTIC_POOL (NAME = [hsep] )) should also be supported (provided of course #23 is fixed first).
This is valid syntax for Azure SQL DB:
CREATE DATABASE D1 AS COPY OF D0 (SERVICE_OBJECTIVE = 'HS_GEN5_8')
Unfortunately, it is not parsed:
Error: Incorrect syntax near SERVICE_OBJECTIVE
At first glance, the ScriptDom grammar seems to permit either a service objective to be specified, or an AS COPY OF specification to be supplied - but not both at the same time. This is one possible reason for this issue but may be other considerations.
As an extension to the above core issue, consider the following valid SQL:
CREATE DATABASE D1 AS COPY OF D0 (SERVICE_OBJECTIVE = ELASTIC_POOL (NAME = [hsep] ))
should also be supported (provided of course #23 is fixed first).