I need a powershell script which:
- Identifies all SQL databases on the local instance which have logfiles larger than 50MB, for any that do:
- Gets the current recovery type. If it is simple, leaves it as simple, if it is Full:
- Sets the DB to simple
- Shrinks the log
- Sets the DB back to full recovery
- If it is already simple, shrinks the log
- Sends an email to a specified address confirming which db logs were shrunk, and their new log size.
29 freelancer đang chào giá trung bình £138 cho công việc này
Hi. Iam expertise in maintains the sql server i could work to finish ur requirment if u are interested and can elobarate more in the specs so taht i will finish with exact requirements
Hello colleague! I have strong knowledge on powershell together woth my team. Please let us help you with this request. Ping me for more details about this. Thanks! Regards! Hugo
Hello, Myself NikhilSenior SQL DBA having 8 years experience. Your approach on this solution is not 100% recommended. Instead of changing recovery model, you could go for log back up and shrink file.
I have similar type of powershell script ready to deploy.. if you are interested I will make changes as per your requirement and will explain how to implement in your environment.. Thanks and regards