Click here to Skip to main content
15,916,835 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
Hi there,

I am working on one click publish thing in visual studio. In that I want to include Publish SQL as well. This is for deploying changes of schema without droping and creating tables and procedures again to save the data on production server.Auto script schema in Package/Publish SQL tab supports only initial deployment when you want to create everything from the scratch . To deploy changes to the schema I need to create a custom script.

Visual studio has got comparision tool in which we can compare two databases and export the script . Is there any way so that it will automatic refresh the schema comparison and changes the script which I can use in Package/Publish SQL tab.

Or if anyone knows a better way to create a custom schema comparison script automatically.

Any help would be appriciated. I need to develop this urgently.

Thanks

What I have tried:

.
Posted
Updated 16-Feb-18 22:27pm
v2
Comments
Graeme_Grant 17-Feb-18 3:21am    
Please don't post the same question 3 times. Duplicates need to be deleted.

1 solution

Here is a script to compare database schema's: [ApexSQL]
This might be of interest too: Copy Table Schema and Data From One Database to Another Database in SQL Server[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900