Tag Archives: Powershell


SQL Remote Access Azure VM’s

SQL Remote Access Azure VM’s

Opening up SQL Server instances hosted on Azure VM’s is just one of those manual, repetitive and error-prone tasks. Given that I’m spinning up new VM’s in a daily basis, I’ve decided to automate the process using PowerShell and SQL Server Management Objects (SMO). This makes setting up SQL Remote Access on Azure a simple task.

Read More →

Scripting SQL Server installations

Scripting SQL Server installations

I was addressing performance issues onsite just a couple of weeks ago and while waiting for the right authorizations, access tokens and whatever you need nowadays to just run some scripts…, one of the developers approached me and asked for some insights on how to Scripting SQL Server installations.

Read More →

SQL Emergency maintenance PowerShell

SQL Emergency maintenance PowerShell

Moving SQL server data files just isn’t something I do very often. And I therefore tent to forget which actions are involved. To solve this, I’ve prepared a Powershell script to automate the steps

Read More →

Automatically deallocate Azure VM’s

Automatically deallocate Azure VMs

Last month I was surprised to see that my Azure bill went up quite a bit. Not knowing that I forgot to deallocate my Azure development VMs. Fortunately, this didn’t break the bank, but would like to avoid this in the future. So therefore I created a simple script to Deallocate Azure VM’s.

Read More →

SQL Server – Default to simple recovery model

SQL Server - Default to simple recovery model

SQL server’s recovery model is crucial for designing a backup and restore strategy. However, it can be a bit of a management chore when dealing with Development server.

If you don’t want to be bothered to look at databases where the log file is 100 times larger than the data files then the following might come in handy:

Read More →

SQL Database Integrity Reports

SQL Database Integrity Reports

Validating database integrity on a regular basis is a fundamental task that is often forgotten by the accidental DBA. Fortunately SQL Server database corruption issues aren’t very common, however finding out that you have been backing up a corrupt database for weeks might be somewhat hard to explain to the business.

Read More →

Move Azure VMs between datacenters

Move Azure VMs between datacenters

Recently I had to move a couple of Windows Azures Virtual Machines from West Europe to Southeast Asia. This wasn’t as easy as expected, so therefore i’m sharing the steps on how to move a Virtual Machine to a different data center.

Read More →