Bulk import error when deploying database using Use-DatabaseReleaseArtifact cmdlet
CopperStarSystems
Posts: 10 New member
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?
Tagged:
Best Answer
-
Sergio R Posts: 610 Rose Gold 5It looks like this thread is a duplicate of https://forum.red-gate.com/discussion/83856/bulk-import-error-when-deploying-database-using-use-databasereleaseartifact-cmdlet
Any future updates will be posted on the other thread onlySergio
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Answers
I will update you when we have more details.
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools