osbornm / AZtoGH

0 stars 0 forks source link

SQL Install Packages - Remove old SQL install packages from QA and Prod. #443

Open osbornm opened 11 years ago

osbornm commented 11 years ago

SQL Install Packages - Remove old SQL install packages from QA and Prod. Replace with uber SQL install that duffy wrote. I have imported this into QA already under the Tier3 account as a Public package

http://control.tier3qa.com/Blueprints/Packages/Details?uuid=7286d4ea-1c83-11e2-b279-e02d6288709b&classification=Software&type=AccountLibrary

Here is the query to soft delete:

--SELECT * FROM [dbo].[TemplateTask] UPDATE [dbo].[TemplateTask] SET IsDeleted = 1, DateModified = GETUTCDATE(), ModifiedBy = 'brent.heinz@tier3.com' WHERE UUID in ('F368A7A8-74D8-4699-AFA9-680DFF066E4E','9A8281FF-4B22-48B1-82CA-FD7520E4020D', 'DB5CF5E0-3506-40BA-9171-385C3D3AAA03')

Here is the query to update/select the affected packages SELECT et.[AccountAlias], l.AliasID, et.[Name], et.[Description], v.[Description] as [Visibility], et.[CreatedBy], et.[DateApproved], et.UUID --UPDATE [dbo].[EnvironmentalTemplate] SET StatusID = 3, DateModified = GETUTCDATE(), ModifiedBy = 'brent.heinz@tier3.com' FROM [dbo].[EnvironmentalTemplate] et JOIN [dbo].[Visibility] v ON v.ID = et.VisibilityID LEFT JOIN [dbo].[Account] a ON a.AliasID = et.AccountAlias LEFT JOIN [dbo].[Location] l ON l.ID = a.PrimaryDCLocationID WHERE [StatusID] IN (1,2,4) AND [XmlDefinition].exist('//InstallSQL[fn:upper-case(@UUID)="F368A7A8-74D8-4699-AFA9-680DFF066E4E" or fn:upper-case(@UUID)="9A8281FF-4B22-48B1-82CA-FD7520E4020D" or fn:upper-case(@UUID)="DB5CF5E0-3506-40BA-9171-385C3D3AAA03"]') != 0 ORDER BY [AccountAlias], [Name]

Created From: https://agilezen.com/project/48813/story/180

osbornm commented 11 years ago

Brent Heinz (12/7/2012) : Script run in QA1, values replicated to QA2/QA3.

osbornm commented 11 years ago

Brent Heinz (12/7/2012) : Need to build a script to determine all the blueprints that are possibly affected. If T3, delete them, if non-T3 need to notify customers.

osbornm commented 11 years ago

Brent Heinz (12/10/2012) : Emailed BT to let the customers know the packages are deprecated.

In the mean time, they have been marked as private.

Need to follow up and get these marked deleted.

osbornm commented 11 years ago

Luke Bakken (12/13/2012) : Just be sure to not delete the one named "Installs SQL 2008 R2 Standard for Web Fabric"

osbornm commented 11 years ago

Brent Heinz (12/14/2012) : Verified these packages are no longer visible in production.

osbornm commented 11 years ago

Brent Heinz (1/28/2013) : We need to write an update script to mark these old ones deleted now that these have been private for a while.