Red Gate forums :: View topic - Database packaging and Powershell scripts
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

Database packaging and Powershell scripts

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
jtucker@inflexxion.com



Joined: 27 Jun 2013
Posts: 12
Location: Boston

PostPosted: Thu Jun 27, 2013 10:41 pm    Post subject: Database packaging and Powershell scripts Reply with quote

The new SSMS add-in with DM 2.0 allows me to generate a quick database pkg for a chosen database, but how am I to add in any powershell scripts? What am i missing?
Back to top
View user's profile Send private message MSN Messenger
justin.caldicott



Joined: 20 Apr 2011
Posts: 55

PostPosted: Fri Jun 28, 2013 1:07 pm    Post subject: Reply with quote

Hi Jeff,

What actions are you looking to perform with the PowerShell, over the built-in deployment logic? Do they need access to the extracted database scripts?

If not, then you can package up some custom PowerShell using RgPublish, and add that as a step, that can be reused as needed.

If they do need access to the database scripts, then this would need to be done using the sqlCI command line tool / build scripts, that are part of the automation pack we mentioned:
http://www.red-gate.com/products/sql-development/sql-automation-pack/

Using custom PowerShell that has access to the database scripts is not possible from the SSMS add-in yet. It's something on our list to address. How big of an issue is this for you?

Thanks,

Justin
_________________
Justin Caldicott
Product Manager - Deployment Manager
Red Gate
Back to top
View user's profile Send private message
jtucker@inflexxion.com



Joined: 27 Jun 2013
Posts: 12
Location: Boston

PostPosted: Wed Jul 03, 2013 1:31 pm    Post subject: RgPublish and powershell with database packaging Reply with quote

I won't need access to the sql scripts for database deployment. However, since database deployment is done first, I'd still need to do safety tasks like backing up some databases, turning off the application, and so on. What is the best way here? I was thinking I could create my own package with just powershell scripts to do the database backups, and turn off the app, call it "preliminaries" before any other step runs...

I don't see a way to add my powershell to the database pkg. Not sure it would help.
Back to top
View user's profile Send private message MSN Messenger
james.billings



Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Thu Jul 04, 2013 9:31 am    Post subject: Reply with quote

You could create a Deploy.ps1 in a folder of it's own that would perform any extra steps you need, use RGPublish to package that up, then add it to your release as a step before the database deployment step?
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