• Grey Twitter Icon
  • Grey Facebook Icon
  • Grey LinkedIn Icon
  • Grey Google+ Icon

© 2016 - 2019 All rights reserved. PigeonSQL.com | Filip Holub

How to Change Recovery Model to Simple or Full for All Users databases?

December 20, 2016

You can find this article helpful, if you have ten or more databases in recovery model "Simple" and you want to change it to "Full", for example because of backuping Logs. My script exclude system databases and all user databases that have "Full" set in Recovery Model.

 

Here is Condition:

 

SELECT name  
FROM sys.databases WHERE database_id > 4 and recovery_model_desc = 'SIMPLE'

 

Cursor is working only with user databases in "Simple" mode.

 

You  can use my Cursor below!

 

 

¡Hasta la vista!

 

 

 

Please reload

RECENT POST
Please reload

  • Facebook Social Icon
  • Google+ Social Icon
  • LinkedIn Social Icon
  • Twitter Social Icon