SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 convert from FULL to SIMPLE multiple databases
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

meadsld
Starting Member

3 Posts

Posted - 06/26/2008 :  23:13:09  Show Profile  Reply with Quote
I have like 100 small databases on my MSSQL 2005 server, all were created in FULL recovery mode. I want to change them all to SIMPLE recovery modeā€¦ is there a simple way to do this all at once?

Thanks, Mike!

meadsld
Starting Member

3 Posts

Posted - 06/26/2008 :  23:20:56  Show Profile  Reply with Quote
and if I convert from FULL to SIMPLE recovery... is the transaction log used at all? can I just delete it after making this change?
Go to Top of Page

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 06/26/2008 :  23:23:02  Show Profile  Reply with Quote
Why are you changing all databases to Simple RM.You won't be able to recover point in time if you do that.
Go to Top of Page

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 06/26/2008 :  23:23:57  Show Profile  Reply with Quote
See about Recovery model in Books online.
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36615 Posts

Posted - 06/26/2008 :  23:58:45  Show Profile  Visit tkizer's Homepage  Reply with Quote
Yes the transaction log is used with simple recovery model. No you can not delete it after making the change.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2005 Posts

Posted - 06/27/2008 :  01:54:47  Show Profile  Visit jackv's Homepage  Reply with Quote
Changing from Full to Simple is not always bad , they might all be Development databases. You could easily write a script , that runs through and dynamically issues the - sql command

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page

meadsld
Starting Member

3 Posts

Posted - 06/27/2008 :  10:19:45  Show Profile  Reply with Quote
sodeep:Why are you changing all databases to Simple RM.You won't be able to recover point in time if you do that.

Yes, I know that. I don't need point in time recovery. I only need to be able to restore to the last previous full backup (performed nightly).

sodeep: See about Recovery model in Books online.

Well... gee, why have a forum then... I started in the books online, I didn't find my answer there... hence posting my question here.

tkizer: Thanks for answering that question!

jackv: yep! but it's that "writing the script that dynamically issues the sql command" piece I'm looking for help with! :)
Go to Top of Page

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 06/27/2008 :  10:40:26  Show Profile  Reply with Quote

Try this :

SELECT 'ALTER DATABASE ' + name + ' SET RECOVERY SIMPLE'
FROM sys.databases
WHERE name NOT IN('master','tempdb','msdb','model')
Go to Top of Page

AndrewMurphy
Flowing Fount of Yak Knowledge

Ireland
2916 Posts

Posted - 06/27/2008 :  11:28:53  Show Profile  Reply with Quote
and then execute the output from the previous post. (don't just look and admire it )
Remember to trim/remove any database that are not to go to "Simple"
Go to Top of Page

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 06/27/2008 :  12:39:01  Show Profile  Reply with Quote
Thanks Andrew. I forgot to mention that.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000