February 5, 2024 at 4:20 pm
Hi,
I'm trying to put the initial object definition into Azure Devops. My sql servers are on prem 2016. How can I script all the objects definition( table, views, stored procs, function) with if exists drop on the top in to their own individual file so that I can push them to Azure devops. This is for initial import for source control purpose. Going through SSMS and generate scripts for all the objects is time consuming. Any insight on this will be greatly appreciated.
February 5, 2024 at 4:23 pm
You could create a database project in VS and then import the database structure into that. Doing so will create the individual files you need (though not with IF EXISTS ... DROP, because that is not needed).
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
February 5, 2024 at 4:36 pm
SSMS - Right click db - tasks - generate scripts.
Follow the wizard, ensure you set the right scripting options you need etc.
But yeah if in devops, should be a DB project as Phil said and all done via visual studio
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply