Changing the logical and physical file name during dacpac deployment

When deploying dacpac for the first time using SqlPackage.exe, how can I manage the logical and physical file names for the new database.

Standard SQL statement:

CREATE DATABASE Bar ON PRIMARY (NAME = 'Foo', FILENAME = '...\Foo\Foo.mdf') LOG ON (NAME = 'Foo_log', FILENAME = '...\Foo\Foo.ldf') 
+5
source share
1 answer

It seems to be impossible out of the box with current tools. The variables $(DefaultFilePath) and $(DefaultLogPath) control the location, but cannot be changed from the command line.

These values ​​can be changed using the special deployment tab , see Overriding the DefaultDataPath and DefaultLogPath Variables When Using SqlPackage to Publish dacpac .

+2
source

All Articles