I am successfully able to push changes to Azure DevOps for Azure SQL database with the help of below approach :
- create a solution and clone your existing Azure DevOps repo in Visual Studio
- Import the DB objects from solution explorer and push the solution to Azure DevOps.
- Create a pipeline includes steps as build solution/copy/publish artifact
- Create a new release pipeline and use "Azure SQL DacpacTask" task and link DACPAC file (which is generated from above step dynamically).
I can see all the Tables, Functions, Views, Stored Procedure promoted to Prod but the tables came out all blank.
Means, all tables came to prod environment but the data did not come with them. I am looking for all the tables with data in my prod env.
Is there any process I missed, looking for the solution on the above problem.
-Thank You!
You can check with the following things:
On the source server from where you import the database into the solution in Visual Studio, ensure the account you are using to import the database has the database level access so that you can view the data in all tables.
After importing the database into the solution, you can check the imported database to ensure the tables is not empty.
After building and generating the
bacpacfile in Visual Studio, you can try to uncompress thebacpacfile to see check whether all tables are existing or empty.bacpacfile from BACPAC (xxx.bacpac) to ZIP (xxx.zip).bacpacfile contains the data for that table.On the target Azure SQL server, ensure the account to publish/import the database has the server level or database level access so that it can write/push all the data into the new database.