Quantcast
Channel: automate – 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.

List Databases (and Properties) on SQL Server 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.

Reading Todays SQL Error Log With PowerShell

Todays post from my PowerShell Box of Tricks series is about the SQL Error Log. DBAs need to read the error log for many reasons and there are different ways to do it. sp_readerrorlog, xp_readerrorlog,...

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.

Checking For A Database Backup with PowerShell

Todays PowerShell Box of Tricks Post is about backups I highly recommend you go and read bookmark and come straight back Stuart Moore’s series on Backups with Powershell The link takes you to the...

View Article


Image may be NSFW.
Clik here to view.

Creating a Windows User and adding to a SQL Server Role with PowerShell

Another post in the PowerShell Box of Tricks series. In a previous post Checking SQL Server User Role Membership we showed how to check which roles users were added to. This function allows you to add...

View Article

Image may be NSFW.
Clik here to view.

Creating SQL User and adding to Server Role with PowerShell

Another post in the PowerShell Box of Tricks series. In yesterdays post Creating a Windows User and Adding to SQL Role we created a Windows User, today it’s a SQL User. Again it is nice and simple and...

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.

Searching for Installed Windows Update With PowerShell

Yesterdays Post Show-WindowsUpdatesLocal does enable you to search for an installed update as follows Show-WindowsUpdatesLocal|Where-Object {$_.HotFixID -eq ‘KB2855336′} |Select Date, HotfixID,...

View Article


Image may be NSFW.
Clik here to view.

Launching Azure VM After Starting With PowerShell

So this morning I decided I was going to run through this blog post on understanding query plans http://sqlmag.com/t-sql/understanding-query-plans. I logged into my Azure Portal to check my balance and...

View Article

Image may be NSFW.
Clik here to view.

Rationalisation of Database with Powershell and T-SQL part one

I have recently been involved in a project to rationalise databases. It is easy in a large organisation for database numbers to rapidly increase and sometimes the DBA may not be aware of or be able to...

View Article

Image may be NSFW.
Clik here to view.

Rationalisation of Database with Powershell and T-SQL part two

In the previous post I showed the script to create an Excel Workbook, colour coded showing the last used date for all of the databases on servers in my sqlservers.txt file. After gathering that...

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 Availability Group Database with PowerShell

Following last weeks post on Refreshing A Mirrored Database with PowerShell I thought I would write the script to refresh an Availability Group Database. An availability group supports a failover...

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.

PowerShelling SQL Saturday Sessions to the Guidebook app

Following on from my previous post about parsing XML where I used the information from Steve Jones blog post to get information from the SQL Saturday web site I thought that this information and script...

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
Browsing all 50 articles
Browse latest View live




Latest Images