Welcome to Powergui.org - an open source community for Windows Powershell

PowerGUI.org PowerGUI.org and blogs

Forums » Request a Script

Thread: SQL database backup and restore

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 2 - Pages: 1 - Last Post: Apr 26, 2010 10:10 PM by: velaskec Threads: [ Previous | Next ]
MikeWozawski

Posts: 6
Registered: 5/17/09
SQL database backup and restore
Posted: Feb 2, 2010 6:13 PM
 
  Click to reply to this thread Reply

I have to manually backup production databases and use *.bak files to restore to testing databases so that testing dbs have latest production data for testing... any ideas on how to simplify my life with powershell?
Message was edited by: MikeWozawski


SQLvariant

Posts: 3
Registered: 2/17/10
Re: SQL database backup and restore
Posted: Apr 26, 2010 3:42 PM   in response to: MikeWozawski
 
  Click to reply to this thread Reply

Are you using any third party software products to do the backups or are they just native SQL backups?

null


velaskec


Posts: 14
Registered: 4/15/10
Re: SQL database backup and restore
Posted: Apr 26, 2010 10:10 PM   in response to: MikeWozawski
 
  Click to reply to this thread Reply

I reccomend you to use Invoke-Sqlcmd cmdlet from the SQL 2008 PowerShell SnapIn
http://technet.microsoft.com/en-us/library/cc281720.aspx
it can be install anywhere and used against SQL 2K, 2K5, 2K8.


Legend
MVP: 2501 + pts
Guru: 2001 - 2500 pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums