-
Notifications
You must be signed in to change notification settings - Fork 25
Description
- SqlPackage or DacFx Version:
16.0.6161.0
- .NET Framework : 4.7.1Steps to Reproduce:
- Have a database with memory optimized table in SSDT.
- Create a dacpac file via build.
- Spin up a new container (any version of SQL)
- Try and deploy with DacFx library
Error SQL72014: Framework Microsoft SqlClient Data Provider: Msg 5121, Level 16, State 2, Line 1 The path specified by "USS_Settings_FileGroupMemoryOptimized_203A1A4F.mdf" is not in a valid directory.
Error SQL72045: Script execution error. The executed script:
ALTER DATABASE [$(DatabaseName)]
ADD FILE (NAME = [FileGroupMemoryOptimized_203A1A4F], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_FileGroupMemoryOptimized_203A1A4F.mdf') TO FILEGROUP [FileGroupMemoryOptimized];
Error SQL72014: Framework Microsoft SqlClient Data Provider: Msg 5009, Level 16, State 14, Line 1 One or more files listed in the statement could not be found or could not be initialized.
Error SQL72045: Script execution error. The executed script:
ALTER DATABASE [$(DatabaseName)]
ADD FILE (NAME = [FileGroupMemoryOptimized_203A1A4F], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_FileGroupMemoryOptimized_203A1A4F.mdf') TO FILEGROUP [FileGroupMemoryOptimized
The error is because the generate script have the following variables set to empty
:setvar DbEnvironment "Development"
:setvar DefaultDataPath ""
:setvar DefaultLogPath ""
Even when setting them, they are not pulled into the script.
dacDeployOptions.SqlCommandVariableValues.Add("DbEnvironment", "Development");
dacDeployOptions.SqlCommandVariableValues.Add("DefaultDataPath", "/var/opt/mssql/data/");
dacDeployOptions.SqlCommandVariableValues.Add("DefaultLogPath", "/var/opt/mssql/log/");
**Did this occur in prior versions? Yes
DacFx