Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically change recovery model
Message
General information
Forum:
Microsoft SQL Server
Category:
Recovery
Title:
Programmatically change recovery model
Miscellaneous
Thread ID:
00851456
Message ID:
00851456
Views:
75
Is there a way to programmatically change the recovery model from Full to Simple? I believe this is possible with DMO, but is it possible using a stored procedure or a SQL Server function?

Reasoning:
The production database has Full Recovery model set. Every so often a copy of the production database is put into a Test environment. Once in the Test environment, there are a few tables that can be truncated and the recovery model can be set to Simple. This is done so that space can be freed up on the test server. This ends up saving quite a bit of space. We would like to able to automate this process with a simple script so we don't have to manually change the recovery model every time the database is put in the Test environment.

Thanks,

Vic
Next
Reply
Map
View

Click here to load this message in the networking platform