Wednesday, June 19, 2019

Reference Architecture - Windows Failover Cluster - Two Nodes Multi-Site


Introduction

A two node multi-site Windows failover cluster is typically used in non-production environments. The key benefits of such an approach include providing a “cut down” replica of a standard four-node failover cluster used in production and facilitating simplified failover of services to disaster recovery sites.
In this architecture we are deploying a single Windows server in both the primary and secondary sites. These are clustered using Windows failover clustering. A quorum file server is deployed (if one does not already exist) in the primary site to provide a third “tie-breaker” node when it comes to voting on the primary node in the cluster.

 

Monday, January 19, 2015

Encrypting Data In SQL Server

This article covers the use of Transparent Database Encryption (TDE) in SQL Server. First we need to create a database master key. This is a symmetric key created at the database level and used to encrypt certificates within the database.

Friday, December 26, 2014

Using The Command Line To Upgrade Windows Edition

There may come a time when you need to upgrade the edition of Microsoft Windows you are using. Typically you need to do do this to access more memory, say greater than 32GB of Ram, or access advanced Enterprise features of the operating system. In the past you would need to do a full re-install of the operating system. Thankfully things have changed and it's now as easy as running an command to upgrade the edition of Windows.

Thursday, October 23, 2014

Windows Server 2012 Deduplication - Powershell Reference

Some key background points on deduplication on Windows Server 2012:

  • There is a scheduler which runs one deduplication job / operation at any point in time
  • Powershell and windows commands add jobs to the scheduler queue - only one job may run at a given point in time
  • Types of deduplication operations:
    • Optimization - deduplicates files on the filesystem. 
    • Scrubbing - performs an integrity check of the deduplication store
    • GarbageCollection - files deleted from the filesystem do not automatically free up space on the disk. A garbage collection must be run to clean up the dedupe store
  • You can configure the minimum age of files to deduplicate. Typically this should be set to a value greater than one day to ensure active files are not deduplicated.


Here are some handy powershell commands for managing deduplication on Windows Server 2012:


# Enqueue  Full integrity check of the dedup store
Start-DedupJob -Type Scrubbing -Full -Priority High -Volume D:

# Enqueue Garbage Collection of dedup store - deleted files won't reclaim space until GC is done
​Start-DedupJob -Type GarbageCollection -Full -Priority High -Volume D:

​# ​Get running / queued dedup jobs
get-dedupjob

# Get dedup summary status
get-dedupstatus

​# Enqueue the optimization job
​Start-DedupJob -Type Optimization -Full -Priority High -Volume D:


Thursday, May 29, 2014

Renew A Windows Server Group Membership Without Rebooting

A Windows computer account will determine it's group membership when the computer is started. If the computer account is added to another group the group membership will not take affect automatically. This is painful in some situations such as modifying group policy based on group memberships. These settings will not take affect until the computer is restarted. To work around this you can perform the following steps:

Friday, March 21, 2014

Setup SNMP On A Linux Host

This article will cover the basic setup of SNMP on a Linux host. Typically I enable this service to monitor the performance of a Linux host using Cacti.

Wednesday, February 26, 2014

Deploying A SQL 2012 AlwaysOn Cluster

This document will cover the design and deployment of a SQL Server 2012 AlwaysOn cluster. SQL Server 2012 AlwaysOn clusters are a high availability technology. They build mirrored database instances across a Windows cluster. This provides the benefits of both technologies with clustering providing a single point of access and the mirroring providing redundant copies of the databases.

Friday, February 21, 2014

Building A Windows Cluster Using Windows Server 2008 R2

Building a windows cluster is the first stage in deploying a high availability SQL Server 2012 Always On cluster. This document covers the design, installation, and configuration of a Windows Cluster on which a SQL Server 2012 HA Cluster can be deployed.

Saturday, February 1, 2014

Upgrading Powershell on Windows Server 2008 R2


The latest version of Powershell, version 4, has been released by Microsoft in late October 2013. It brings a lot of additional functionality and performance improvements to the table. This document covers how to upgrade Powershell from your current version to Powershell 4.0.

Tuesday, August 6, 2013

SQL Server Filestream Of Limited Use For Publicly Accessible Websites?

We have a new feature being developed for our publicly accessible websites that enables users to upload files into “the system”. At first glance the SQL Server Filestream feature looks perfect for this type of scenario however there are several limitations that cripple it’s usefulness in publicly accessible environments.

The SQL Server Filestream feature has two modes of operation. In the first mode all file access is performed through transact SQL. Even though the file is stored on the SQL Server’s filesystem it is access via T-SQL and is returned as a blob (varbinary(max)). This is essentially the same as storing the file in the database as a blob.

In the second mode, the application queries the filestream enabled table to get the handle of the file. It then “streams” the file using a SMB connection to the SQL Server. This is by far more efficient that accessing the file via T-SQL. It’s more efficient because SQL Server is doing what it does best, returning data sets, and Windows Server is doing what it does best, file serving.

For maximum performance we want to use the second mode however there are a few problems using the streaming feature.

  1. The fileshare is located on the SQL Server itself. For a webserver in the DMZ to use the streaming feature it needs SMB access to the SQL Server. This is generally a port that we’d rather not open up.
  2. Often the DMZ servers are not on the same domain as internal servers. This causes issues with authentication to the fileshare. There may be ways around this such as passing credentials from the application to the fileshare but even so this may be a cludgy approach.

After reviewing the filestream feature we’re still using it, however we’re using it in T-SQL mode. It looks as though the streaming mode is probably best used on internal applications where security isn’t a major factor. Typical examples that come to mind are intranets, document management systems, Customer Relationship Management systems etc.

Monday, July 29, 2013

Problems Booting Centos Guest In A Virtual Machine

Problem

Booting into a fresh Centos installation inside a virtual machine results in a black screen. The Centos login screen does not appear. This problem has been replicated in VMWare Workstation 9, VMWare ESX 4.0, and Virtual Box.

Resolution

This problem occurs when the Centos ISO is still attached to the virtual guest. Disconnect the Centos ISO and reboot the virtual machine.