Quantcast
Channel: Powershell Box of Tricks – SQL DBA with A Beard
Browsing all 40 articles
Browse latest View live

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.

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.

Showing and Killing SQL Server Processes with PowerShell

Another post in the PowerShell Box of Tricks series. There are much better ways of doing this I admit but as you can do it with PowerShell I created a function to do it. Create a Server Object and...

View Article


Image may be NSFW.
Clik here to view.

Displaying the Windows Event Log with PowerShell

The latest post in the  PowerShell Box of tricks series is here. I’ll start by saying this is a bit of a cheat. PowerShell has a perfectly good cmdlet called Get-EventLog and plenty of ways to use it I...

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.

The PowerShell Box Of Tricks GUI

When I started as a DBA at MyWork I faced a challenge. Many hundreds of databases, dozens of servers and no idea what was on where. It was remembering this situation when new team members were...

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.

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.

Showing and Killing SQL Server Processes with PowerShell

Another post in the PowerShell Box of Tricks series. There are much better ways of doing this I admit but as you can do it with PowerShell I created a function to do it. Create a Server Object and...

View Article


Image may be NSFW.
Clik here to view.

Displaying the Windows Event Log with PowerShell

The latest post in the  PowerShell Box of tricks series is here. I’ll start by saying this is a bit of a cheat. PowerShell has a perfectly good cmdlet called Get-EventLog and plenty of ways to use it I...

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.

The PowerShell Box Of Tricks GUI

When I started as a DBA at MyWork I faced a challenge. Many hundreds of databases, dozens of servers and no idea what was on where. It was remembering this situation when new team members were...

View Article
Browsing all 40 articles
Browse latest View live




Latest Images