Bored Geek
Computers, Software development, etc. Stuff when I am bored
Tuesday, January 13, 2015
Change recovery model to Simple for all databases
Import-Module SQLServer
Get-SqlDatabase -sqlserver . | ? {$_.RecoveryModel -eq [Microsoft.SqlServer.Management.Smo.RecoveryModel]::Full } | % { $_.RecoveryModel = [Microsoft.SqlServer.Management.Smo.RecoveryModel]::Simple ; $_.Alter() }
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment