Hi
I have created a DACPAC file (SQL2012 instance) by right clicking on a database, tasks, extract data tier aplication.
Saved the .DACPOAC file in c:\temp\test.dacpac.
Then tried to create a copy of the database by right clicking on databases (in SSMS) and Deploy Data tier application
I go through the wizard, but it fails with an error as per below
IT appears to be tring to create the database TESTBR2 with an invalid file path. The default path for files for new databases is m:\file.mdf but its missing the drive letter.
Thanks
Microsoft.SqlServer.Dac.DacServicesException: Could not deploy package. Error SQL72014: .Net SqlClient Data Provider: Msg 5105, Level 16, State 2, Line 1 A file activation error occurred. The physical file name '\TESTBR2_Primary.mdf' may be incorrect. Diagnose
and correct additional errors, and retry the operation. Error SQL72045: Script execution error. The executed script: CREATE DATABASE [$(DatabaseName)] ON PRIMARY(NAME = [$(DatabaseName)], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_Primary.mdf') LOG
ON (NAME = [$(DatabaseName)_log], FILENAME = N'$(DefaultLogPath)$(DefaultFilePrefix)_Primary.ldf') COLLATE Latin1_General_CI_AS Error SQL72014: .Net SqlClient Data Provider: Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names listed
could not be created. Check related errors. Error SQL72045: Script execution error. The executed script: CREATE DATABASE [$(DatabaseName)] ON PRIMARY(NAME = [$(DatabaseName)], FILENAME = N'$(DefaultDataPath)$(DefaultFilePrefix)_Primary.mdf') LOG ON (NAME =
[$(DatabaseName)_log], FILENAME = N'$(DefaultLogPath)$(DefaultFilePrefix)_Primary.ldf') COLLATE Latin1_General_CI_AS at Microsoft.SqlServer.Dac.DeployOperation.ThrowIfErrorManagerHasErrors() at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass10.<>c__DisplayClass12.<CreatePlanExecutionOperation>b__f()
at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action) at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass10.<CreatePlanExecutionOperation>b__e(Object operation, CancellationToken token) at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext
context) at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at
Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation
operation, DacLoggingContext loggingContext, CancellationToken cancellationToken) at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken,
DacLoggingContext loggingContext) at Microsoft.SqlServer.Dac.DacServices.Deploy(DacPackage package, String targetDatabaseName, Boolean upgradeExisting, DacDeployOptions options, Nullable`1 cancellationToken) at Microsoft.SqlServer.Management.Dac.DacWizard.DeployModel.Install()
at Microsoft.SqlServer.Management.Dac.DacWizard.DeployModel.RunAction() at Microsoft.SqlServer.Management.Dac.DacWizard.ExecuteDacPage.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs
e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)