This is a discussion on Setting recover model with TSQL within the SQL Server forums, part of the Microsoft SQL Server category; --> I have a TSQL script that restores a production database to my local development machine. Every time I do ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have a TSQL script that restores a production database to my local development machine. Every time I do a restore, I have to go into Enterprise Manager and set the recover model to simple to prevent Windows XP Backup from having shadow copy problems (that is a rant in and of itself). I would like to just add a statement at the bottom of the script to do this, but have yet to find the proper commands documented. It seems that the instructions that come with the server only mention enterprise manager. Thanks in advance for any help. |
| |||
| rsyring@gmail.com (rsyring@gmail.com) writes: > I have a TSQL script that restores a production database to my local > development machine. Every time I do a restore, I have to go into > Enterprise Manager and set the recover model to simple to prevent > Windows XP Backup from having shadow copy problems (that is a rant in > and of itself). I would like to just add a statement at the bottom of > the script to do this, but have yet to find the proper commands > documented. It seems that the instructions that come with the server > only mention enterprise manager. ALTER DATABASE db SET RECOVERY SIMPLE -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pro...ads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinf...ons/books.mspx |
| ||||
| On Jan 27, 3:53 pm, Erland Sommarskog <esq...@sommarskog.se> wrote: >ALTER DATABASE db SET RECOVERY SIMPLE > > -- > Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se > > Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books... > Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx Many Thanks! |