I'm looking at using Sql Server Database projects. It appears to import schema and stored procedures from a database, but there's no mechanism to import actual data. As part of our build process, we usually import both schema and data.
Can this be done from Sql Server Database projects?
In SQL Server Management Studio, enter details, click Connect, right-click the database, and click Import Data. To import, select Import Data > Next > Excel > Browse, open the file, and follow the steps to import data from the file.
On the View menu, select Other Windows > Data Sources. In the Data Sources window, click Add New Data Source. The Data Source Configuration Wizard opens. Select Database on the Choose a Data Source Type page, and then select Next.
The current solution is to place reference data use a post-deployment script. The script must be written to be idempotent as it has no knowledge of the state of the target. This is described in detail here:
Including Data in a SQL Server Database Project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With