DDT Question on Deployment

Author Message
 Posted 6/4/2014 2:44:59 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 4/6/2021 9:04:14 AM
Posts: 50, Visits: 183

If I have 7 tables, 2 views and some stored procedures and a few functions. Iwant to add these to an existing database with different table names,different view names and different procedure names, different function names. Will the DDT package leavethe existing tables, views and procedures not defined in the package alone in the existing database? Orwill it delete them? If the default is to delete them, how do I change the default?

Post #32612
Add to Twitter Add to Facebook
 Posted 6/4/2014 2:52:34 AM
StrataFrame Developer

StrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame Developer

Group: StrataFrame Developers
Last Login: 5/16/2018 3:20:37 AM
Posts: 2,982, Visits: 2,482
The tables will merge, but the views, sprocs, and functions will be overwritten.  The DDT puts an extended property on the sprocs, functions, and views that it deployed, so the DDT knows it can delete them.  If you remove the extended property (called "DDT_Priority"), then the DDT will leave the old objects alone, assuming that an end-user added them to the database.  However, when you go back to run the old DDT package, you'll need to swap over the DDT_Priority objects to the objects you want to overwrite.  It can be done, but there would be some scripting involved to mark/unmark the objects you want to replace.

To script the extended properties: Check out 1) sys.fn_listextendedproperty, the UDF that retrieves the properties 2) sys.sp_addextendedproperty, sproc that adds extended properties 3) sys.sp_updateextendedproperty, sproc that updates the value on an existing property, and 4) sys.sp_deleteextendedproperty, sproc that removes an extended property
Post #32613
Add to Twitter Add to Facebook


Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.