Bulk import error when deploying database using Use-DatabaseReleaseArtifact cmdlet
I have a project that needs to have certain static data seeded when deploying to a new database instance.
Following the guidance at https://documentation.red-gate.com/sca3/developing-databases-using-sql-change-automation/generating-scripts-to-capture-database-changes/data-population/seed-data , I have added a bulk insert migration script, along with a CSV file containing the data and marked it as "Copy Always".
When I attempt to deploy the package using Use-DatabaseReleaseArtifact, I get a File not Found error when the bulk import migration is executed.
I have verified that the CSV file is packaged into the build artifact, and also is included in the release artifact.
I added the -debug flag to the UseDatabaseReleaseArtifact call so that I could verify the temp data location (under %localappdata%\temp\DLM Automation). Once the temp folder was created, I verified that the CSV file is present in the root of the temp folder.
The odd thing is that the deployment folder's name does not match the folder reported in the error - for example, the deployment path is %localappdata%\Temp\DLM Automation\4fqzilj4.mg4\, but the error message shows that it's looking for the CSV file in %localappdata%\Temp\DLM Automation\o2jlg34q.bp3\, which does not exist.
Is there a reason for this discrepancy?
0 · Share on Twitter