Red Gate forums :: View topic - Bespoke Database Script deployment
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

Bespoke Database Script deployment

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
hschmied



Joined: 16 Jul 2013
Posts: 1
Location: England

PostPosted: Tue Jul 16, 2013 10:34 am    Post subject: Bespoke Database Script deployment Reply with quote

We currently use a custom build process that already packages up all our SQL object changes into four separate scripts, one for each of the four databases it needs to be run against. Each of these scripts could contain SPs, views, table changes, update/creation scripts etc.

Without completely changing the way we work what would be the best way to get these four scripts deployed using Deployment Manager?

Do I have to nuget package them using RgPublish and/or sqlCl.exe or can I just add a post deployment step?

Any pointers would be greatly appreciated.
Back to top
View user's profile Send private message
lee5i3



Joined: 16 Jul 2010
Posts: 38

PostPosted: Tue Jul 16, 2013 2:44 pm    Post subject: Reply with quote

I believe they must be nuget packages... but you can also write a PreDeploy.ps1, Deploy.ps1 or PostDeploy.ps1 powershell script to execute whatever you need done.

You can just use RgPublish to package the entire folder and depending which step you need done, the powershell script can run what you need custom done

I'm not positive where the powershell is required to go, but I put it in the root and it runs there.
Back to top
View user's profile Send private message
david.conlin



Joined: 04 May 2012
Posts: 49

PostPosted: Wed Jul 17, 2013 11:36 am    Post subject: Reply with quote

Yes, you can do this by packaging up your scripts together with a deploy.ps1 file using RGPublish

The documentation on adding powershell behaviour to your package is here

http://documentation.red-gate.com/display/DM2/PowerShell+scripts

while information about creating packages with RGPublish is here

http://documentation.red-gate.com/display/DM2/Creating+and+publishing+application+packages

If you're updating four different databases, however, I'd recommend setting them up as four separate "steps" in the same project. That way you'll be able to see the logging and status of each database separately, while ensuring that all four get deployed together.
_________________
David Conlin
Software Developer
Deployment Manager
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group