Quantcast
Channel: automation – SQL DBA with A Beard
Browsing all 50 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Dropping SQL Users with PowerShell

As you may have noticed, I love PowerShell! I have developed a series of functions over time which save me time and effort whilst still enabling me to provide a good service to my customers. I keep...

View Article


Image may be NSFW.
Clik here to view.

Searching the SQL Error Log with PowerShell

Another post in the PowerShell Box of Tricks series. Here is another script which I use to save me time and effort during my daily workload enabling me to spend more time on more important (to me)...

View Article


Image may be NSFW.
Clik here to view.

Show The Last Backups On A Server with PowerShell

Another day another PowerShell Box of Tricks post Auditors, managers and bosses often want proof of following processes successfully so when they come knocking on my door(I don’t have a door, it’s...

View Article

Image may be NSFW.
Clik here to view.

Add User to SQL Server Database Role with PowerShell and Quickly Creating...

Having created Windows Users or SQL Users using the last two days posts, today we shall add them to a role on a database. As I discussed previously I believe that to follow good practice I try to...

View Article

Image may be NSFW.
Clik here to view.

Show Windows Updates Locally With PowerShell

I wanted to be able to quickly show the Windows Updates on a server. This came about during a discussion about auditing. Of course, there is no point in re-inventing the wheel so I had a quick Google...

View Article


Image may be NSFW.
Clik here to view.

Starting My Azure SQL Server VMs with PowerShell

  The last post about Launching Azure VMs with PowerShell made someone ask me to explain how I start my Azure VMs normally so here goes. When I decide to write a blog post or develop and test a script...

View Article

Image may be NSFW.
Clik here to view.

Dropping All Tables From A SQL Database with PowerShell

This post could also have been titled confusion with foreach or For-EachObject The scenario – Having created a blank database a number of users and permissions for an external consultant to create a...

View Article

Image may be NSFW.
Clik here to view.

How I Check Hundreds of SQL Agent Jobs in 60 Seconds with Powershell

Checking that your Agent Jobs have completed successfully is a vital part of any DBA’s responsibility. It is essential to ensure that all of the hard work you have put into setting up the jobs can be...

View Article


Image may be NSFW.
Clik here to view.

Refreshing A SQL Mirrored Database Using Powershell

  SQL mirroring is a means of providing high availability for your SQL database. It is available in Standard Edition and although the feature is deprecated it is still widely utilised. You can read...

View Article


Image may be NSFW.
Clik here to view.

Number of VLFs and Autogrowth Settings Colour Coded to Excel with PowerShell

So you have read up on VLFs No doubt you will have read this post by Kimberly Tripp and this one and maybe this one too and you want to identify the databases in your environment which have a large...

View Article

Image may be NSFW.
Clik here to view.

Emailing Disk Space Alerting With Powershell

  A DBA doesn’t want to run out of space on their servers, even in their labs! To avoid this happening I wrote a Powershell script to provide some alerts by email. This is the script and how I worked...

View Article

Image may be NSFW.
Clik here to view.

Changing Delay Between Responses for SQL Alerts with Powershell

So you have read that you should have alerts for severity levels 16 to 24 and 823,824 and 825 on SQLSkills.com or maybe you have used sp_blitz and received the Blitz Result: No SQL Server Agent Alerts...

View Article

Image may be NSFW.
Clik here to view.

Making a Change Log Easier With PowerShell

Having a Change Log is a good thing. A quick and simple place to find out what has changed on a server and when. This can be invaluable when troubleshooting, matching a change to a symptom especially...

View Article


Image may be NSFW.
Clik here to view.

Show AutoGrowth Events with Powershell to CSV

This week I was reading Pinal Daves post about Autogrowth Events http://blog.sqlauthority.com/2015/02/03/sql-server-script-whenwho-did-auto-grow-for-the-database/ as it happened I had a requirement to...

View Article

Image may be NSFW.
Clik here to view.

Triggering a System Center Configuration Manager deployment task

A slightly different topic today. Once you have built up knowledge, you become the person that people ask to solve things. This is something I really enjoy, taking a problem and solving it for people...

View Article


Image may be NSFW.
Clik here to view.

Scheduling Ola Hallengrens Maintenance Solution Default Jobs with Powershell

If you are a SQL Server DBA you should know about Ola Hallengren and will probably have investigated his Maintenance Solution. If you haven’t please start here https://ola.hallengren.com/ You can also...

View Article

Image may be NSFW.
Clik here to view.

Installing and upgrading default scripts automation – part one – Introduction

First I must say thank you to all of the wonderful people who have put time and effort into providing free tools and scripts to enable not only myself but all SQL DBAs to ease their work. For this...

View Article


Image may be NSFW.
Clik here to view.

Setting Up and Using Azure VM SQL Automated Backup (and Restore)

This weekend I was creating some Azure VMs to test and was required to use the GUI for some screenshots. I have always used my Powershell scripts described here to create my test systems and with a new...

View Article

Image may be NSFW.
Clik here to view.

Using Power Bi with my DBA Database

Every good DBA should have a DBA database. A place to store information about all of their instances and databases. I have an InstanceList table which looks like this CREATE TABLE [dbo].[InstanceList](...

View Article

Image may be NSFW.
Clik here to view.

Populating My DBA Database for Power Bi with PowerShell – Server Info

Following my last post about using Power Bi with my DBA Database I have been asked if I would share the PowerShell scripts which I use to populate my database. They are the secondary part to my...

View Article
Browsing all 50 articles
Browse latest View live


Latest Images