Closed

Powershell SQL Log Shrink Script

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.

Skills: Powershell, Microsoft SQL Server, Shell Script, Software Architecture, SQL

See more: sql server truncate log, sql server shrink data file release unused space, dbcc shrinkfile, sql clear log file, truncate log file powershell, script to truncate logs in sql server, powershell script to truncate sql table, powershell shrink sql log file, i have an existing php/mysql script that i need customized with additional functions, i have an existing phpmysql script that i need customized with additional functions, i have started a new job as a tour guide and i need some audio transcribing from a colleagues tour of oxford stratford upon avon, i need 3 new, i need a african american writer forn new york, i need a christmas and new year ecard for my prague czech republic based travel business the text needs to be editable i will ne, i need a company log, i need a design done for the name of a new flashlight, i need a design for my new business logo australia, i need a local independent sales rep for my new business, i need new website cakephp, i need new leads for my business

About the Employer:
( 9 reviews ) Belfast, United Kingdom

Project ID: #20123751

29 freelancers are bidding on average £138 for this job

sumon355

Hello, As an expert in ms sql server, i am very much interested to do this project. I am not expert in PowerShell scripting, so if you don't have any problem, i would develop a simple tool using C#. Please let me know More

£110 GBP in 3 days
(296 Reviews)
7.6
sergioeliot3

Hi there Thanks for using freelancer com. My name is Sergio and I am a software developer dedicated 100% here in the markpetlace. I am super experienced both with PowerShell and SQL Server. Most of my PowerShell ex More

£124 GBP in 4 days
(79 Reviews)
6.5
dvfabia

Hi, I am interested in your project. It is possible for a PowerShell script to connect to a SQL Server database. I will utilize the .Net SQL Client framework to perform the connection, query, and those administrative More

£100 GBP in 5 days
(229 Reviews)
6.1
mascotindia123

Hi, We produce quality and cost-effective solution for our domestic and international clients. We have reviewed your job and find us experience in working with similar kind of job. We provide the complete solution wher More

£135 GBP in 7 days
(29 Reviews)
6.0
pilica

Hi, I have over six years experience automating tasks with powershell, I can do this job. Please see my work history for relevant feedback.

£150 GBP in 3 days
(37 Reviews)
5.3
Splaszczyk

I can prepare this script for you however i have no smtp server on my machine so to finally test Send-MailMessage cmdlet part of the script i may need access to your environment. Other part of the script i could pre More

£175 GBP in 10 days
(4 Reviews)
4.8
AhmadSameer

Hey there, I'm a System Engineer with coding skills. I had developed tons of scripts using PowerShell. I can help. Regards.

£250 GBP in 7 days
(22 Reviews)
4.9
talhamq

I have experience in deploying and maintaining of: Cloud Computing Platforms: AWS Amazon Web Services,Microsoft AZURE, Google Cloud (GCP). Server Operating Systems: Windows Server 2003-to-2012R2, Windows Server 20 More

£100 GBP in 1 day
(27 Reviews)
4.7
khanicha

Here for the script direction: 1. For enumerating local database with its name, recovery type, and size $srv = New-Object ('[login to view URL]') $Server $Return = $[login to view URL]| Select Name, More

£111 GBP in 1 day
(19 Reviews)
5.5
goodwork20k

I am good in powershell, sql along with development and automation, please let me know if you are good to award this project to me

£188 GBP in 4 days
(11 Reviews)
4.4
sreenivas2903

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

£200 GBP in 5 days
(17 Reviews)
4.3
IntrinsecoTImx

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

£250 GBP in 7 days
(2 Reviews)
3.8
romainlopes92

Hey, I'm Romain, a french Microsoft certified guy I can do it for you Please contact me for more informations Best regards Romain

£180 GBP in 1 day
(8 Reviews)
3.8
nikhiluk

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.

£122 GBP in 1 day
(1 Review)
1.7
adricabrelles

Hi, I'm a DBA with a lot experience in SQL Server, Oracle, .... also with shell porgramming. I can help you. Regards.

£140 GBP in 2 days
(2 Reviews)
1.4
anjalshah96

dentifies 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 - More

£135 GBP in 7 days
(0 Reviews)
0.0
GaneshPolisetti

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

£111 GBP in 3 days
(0 Reviews)
0.0
RomJacoby99

Hello there! I am Rom, a DevOps Engineer, former DBA and System Admin. I manage SQL servers on a regular basis as part of my job, and great at powershell scripting too, hence you can trust me in completing the job fast More

£60 GBP in 2 days
(0 Reviews)
0.0
£222 GBP in 8 days
(0 Reviews)
0.0
£111 GBP in 3 days
(0 Reviews)
0.0