<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQL Server Archives - WardNet</title>
	<atom:link href="https://www.wardnet.co.uk/category/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wardnet.co.uk/category/sql-server/</link>
	<description>Infrastructure, ERP and General Technology Blog</description>
	<lastBuildDate>Tue, 16 Feb 2021 12:56:49 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2026/01/wp-1767387074640.jpg?fit=32%2C32&#038;ssl=1</url>
	<title>SQL Server Archives - WardNet</title>
	<link>https://www.wardnet.co.uk/category/sql-server/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">63479081</site>	<item>
		<title>SQL/Server Health Checks</title>
		<link>https://www.wardnet.co.uk/sql-server-health-checks/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 02 Jul 2018 08:30:01 +0000</pubDate>
				<category><![CDATA[Epicor]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[ERP]]></category>
		<category><![CDATA[health check]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[t-sql]]></category>
		<guid isPermaLink="false">https://www.wardnet.co.uk/?p=541</guid>

					<description><![CDATA[<p>Recently I&#8217;ve been asked to develop a set of scripts, plans and reports packaged up as a general server health</p>
<p><a href="https://www.wardnet.co.uk/sql-server-health-checks/">SQL/Server Health Checks</a></p>
]]></description>
										<content:encoded><![CDATA[<p>Recently I&#8217;ve been asked to develop a set of scripts, plans and reports packaged up as a general server health check, but also with a specific focus on ERP servers, by which we&#8217;re interpreting as the Application and Database servers (Microsoft SQL in this case).</p>
<p>The thing is, if you Google &#8220;Server Healthcheck&#8221; or &#8220;SQL Performance Analysis&#8221; and everything in between, you will find a large array of sites out there specifically designed for these purposes. Therefore, I am now interperting my task as &#8220;analyse the tools already available and package up a selection of the best to add value to our customers&#8221;.</p>
<p>As thie self proclaimed king of scripting I have already started my work on a selection of scripts to analyse and build reports on various areas of systems, from the OS level all the way through to the DB contents where required. As always I welcome feedback on things I could be using on this project.</p>
<p>To begin with I&#8217;m focussing on the SQL analysis, T-SQL is still fairly new to me, so I&#8217;d rather reuse what&#8217;s already out there for example Brent Ozar&#8217;s SQL Health Check (<a href="https://www.brentozar.com/archive/2017/10/free-sql-server-health-check/" target="_blank" rel="noopener noreferrer">https://www.brentozar.com/archive/2017/10/free-sql-server-health-check/</a>). I will use the intial out of the box analysis, running it across a variety of systems to see where the standard baselines need adjusting (paramaterization and parallelism anyone?) and then build my own rules and descriptions to better benefit our specific needs. Sounds fun right?</p>
<p>Watch this space as I develop the scripts and reports, the eventual end game would be to run 1 executable/script with a set of predefined constants (server names, user credentials etc) and have a close to complete report out the end of it. If you do know of any sites or tools out there that can help me complete this then please do get in touch <a href="https://twitter.com/jaward916" target="_blank" rel="noopener noreferrer">@jaward916</a></p>
<p>&nbsp;</p>
<p><a href="https://www.wardnet.co.uk/sql-server-health-checks/">SQL/Server Health Checks</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">541</post-id>	</item>
		<item>
		<title>Virtual Home Server Part 2</title>
		<link>https://www.wardnet.co.uk/virtual-home-server-part-2/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 30 Apr 2018 08:30:02 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[ERP]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualisation]]></category>
		<category><![CDATA[VMWare]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">https://www.wardnet.co.uk/?p=517</guid>

					<description><![CDATA[<p>Back in November last year, I posted to this blog with the initial setup of my &#8220;home&#8221; server (https://www.wardnet.co.uk/virtual-home-server/) which</p>
<p><a href="https://www.wardnet.co.uk/virtual-home-server-part-2/">Virtual Home Server Part 2</a></p>
]]></description>
										<content:encoded><![CDATA[<p>Back in November last year, I posted to this blog with the initial setup of my &#8220;home&#8221; server (<a href="https://www.wardnet.co.uk/virtual-home-server/">https://www.wardnet.co.uk/virtual-home-server/</a>) which in its former life was a Veeam backup server for an SME. This previous life means that it is a very high spec for its age and it may have a few TB of storage to boot! &#8211; Storage is an interesting point here as whilst there is around 8TB total (after RAID) it is not SSD or even high end SAS, therefore this space is at the cost of performance. The good thing here, is that performance is not critical to what I am using the servers for, there&#8217;s more than enough capacity and performance to deliver media via Plex for local and remote users and deliver reasonable DB performance for testing of installation processes &#8211; which currently relates to my day job. Below I have included an image of the VMWare ESXi Dashboard from today, not too much difference to the one I posted back in November other than the number of VMs has increased from 8 to 13 and therefore available storage has gone down by just around half a terabyte:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2018/04/042918_1626_VirtualHome1.png?w=810&#038;ssl=1" alt=""></p>
<p>But that&#8217;s boring… what about the VM setup, anything exciting there?</p>
<p>Well let&#8217;s take a look:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2018/04/042918_1626_VirtualHome2.png?w=810&#038;ssl=1" alt=""></p>
<p>Therefore, I have a lab domain setup now (wardnet.local) which I am using for testing out various ERP install/config scenarios, including down to the client layer with the last one in the list being a Windows 10 VM.</p>
<p>Four ERP servers I hear you scream, well, yes, rather… ERP2 is now solely an SQL server delivering the DBs for ERP3 and ERP4, with ERP1 being a self-contained SQL and App for the latest and greatest versions. APPS is actually a SharePoint 2013 Foundation server (DB is on ERP2) which is acting as document storage currently for the ERP servers.</p>
<p>I am also utilising my DC as a mail server with hMail and a .Net based webmail service (with mySQL backend) so I do not need a mail client anywhere! &#8211; My hMail implementation will be an extra post on here in the not too distant future I hope.</p>
<p>Extrasphere will be a blog post of its own TBC but it is a free cloning utility for ESXi implementations and works quite nicely.</p>
<p>In Summary, this server has allowed me to get my geek on with virtualisation, networking, server hardware and operating systems deployment from an infrastructure point of view, but also it has allowed me to delve back into the Sysadmin side of things, Domain creation, GPO deployments (Windows Updates, Shared Folders, BGInfo and more), mail server management, SharePoint admin etc. In addition, it has strengthened my expertise in the more recent transition into the application side of things, with many ERP deployment scenarios now tested (and scripted), as well as some real world simulations into config and usage of the ERP systems themselves. So now, I have a platform for testing anything, from Hardware tweaks through to Accounts Receivable invoicing!</p>
<p><a href="https://www.wardnet.co.uk/virtual-home-server-part-2/">Virtual Home Server Part 2</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">517</post-id>	</item>
		<item>
		<title>Few things to cover&#8230;</title>
		<link>https://www.wardnet.co.uk/few-things-to-cover/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 19 Feb 2018 09:30:14 +0000</pubDate>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Career]]></category>
		<category><![CDATA[Epicor]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[SSRS]]></category>
		<category><![CDATA[Twitter]]></category>
		<guid isPermaLink="false">https://www.wardnet.co.uk/?p=505</guid>

					<description><![CDATA[<p>Firstly, thank you for stopping by, taking time to view my blog, read my posts and hopefully take something away</p>
<p><a href="https://www.wardnet.co.uk/few-things-to-cover/">Few things to cover&#8230;</a></p>
]]></description>
										<content:encoded><![CDATA[<p>Firstly, thank you for stopping by, taking time to view my blog, read my posts and hopefully take something away from them.</p>
<p>If you do happen to like the posts on here, then please do say so; retweet, Facebook share, LinkedIn, whatever, it would be great to get more of my content out there, and more of you on here!</p>
<p>Also If you have any post requests or tech questions, please send those over too, Twitter is possibly the best for that <a href="http://twitter.com/jaward916">@jaward916</a></p>
<p>Secondly, apologies for the lack of posts during February. Over the Christmas break I had some good ideas which I made lots of notes for then came up with the 4 posts during Januray, however the ideas have dried up (already) and family related things have meant less free weekends. The weekday&#8217;s are taken up with the job, typically Sundays are when I get &#8220;me&#8221; time to do some techy stuff for my benfit rather than for customers!</p>
<p>Finally&#8230;</p>
<p>Whilst I don&#8217;t have a nice full topic to write up for this week (I promise there are some ideas bouncing around in my head) what I do have is a snippet of 2018 so far in my world of tech/code/software etc.</p>
<p>During January I spent many hours getting to grips with a new major release of the software I work with, as I&#8217;m a little bit of a nerd, a lot of those hours were spent in my own time, drilling down into things, working scenarios out, deplyoment strategies etc. What I ended up with by last week was a full test scenario, remeniscient of a real world deployment. Effectivley emulating what a customer would have. The really cool thing is this allows me to very quickly test out scenarios, when a customer reports something &#8220;not working&#8221; I can run it through my servers and give them an answer same day along the lines of (usually) &#8220;try this, I think you&#8217;ve done X in the wrong place&#8221;. This is in no way a bypass to my wonderful colleagues in Support, but more of a way to assist the customer with getting their deployment up and running. I don&#8217;t generally delve into the applications, I&#8217;m not that kind of consultant. What I do is design deployments and implement them, I get the back end of a system up and running. The latest version included quite a few new technical enhancements, so getting experienced with them is an essential part of me being able to do my job!</p>
<p>February hasseen a few more interesting engagements for me, site visits all over the place (on top of delivering 2 training courses during January), with some more lined up, possibly even abroad.</p>
<p>What I am being asked to do now is anlyse, review, and in some cases redesign or reimplement deployments. Not because what they have was done wrong to start with, far from it, but more to help them become future-proof, employ best practices and become more agile as the world around us is changing, and the software adjusts to match. There&#8217;s no wheel reinvention, just a set of new tyres here and a bit of air there.</p>
<p>I write on here a lot about SQL Server as it is the underlying DB server platform for all systems I support. Another area of SQL that has always interested me is SSRS (SQL Server Reporting Services), basically a very smart, sometimes fiddly report generation toolset. What I have been able to do over the last few weeks is take some reports, rip them apart, analyse a few minor but irritating issues and develop solutoins to those problems. The strange thing is that I&#8217;ve not been trained in SSRS, or had the change do do anything with it prior ot this. I just saw an issue, delved straight into the SSRS builder and worked it out, for myself. I forgot I had those abillites and it&#8217;s been refreshing to remember how good I used to be solving new problems.</p>
<p>I&#8217;m thinking some SSRS tips in a post may be some decent content in the future, think I&#8217;ll build the scrapbook up on those!</p>
<p>&nbsp;</p>
<p>That&#8217;s it for an update, I&#8217;ve also updated the About page on this site to reflect the last 2 years!</p>
<p>&nbsp;</p>
<p><a href="https://www.wardnet.co.uk/few-things-to-cover/">Few things to cover&#8230;</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">505</post-id>	</item>
		<item>
		<title>Tip of the Week 2 &#8211; SQL Versions &#038; EOL</title>
		<link>https://www.wardnet.co.uk/tip-of-the-week-2-sql-versions-eol/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 15 Jan 2018 09:30:31 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[GA]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[lifecycle]]></category>
		<category><![CDATA[MS]]></category>
		<category><![CDATA[SQL2016]]></category>
		<guid isPermaLink="false">https://www.wardnet.co.uk/?p=483</guid>

					<description><![CDATA[<p>Have you ever wondered whether you&#8217;re definitely on the latest patch of SQL? I found a site a few years</p>
<p><a href="https://www.wardnet.co.uk/tip-of-the-week-2-sql-versions-eol/">Tip of the Week 2 &#8211; SQL Versions &#038; EOL</a></p>
]]></description>
										<content:encoded><![CDATA[<p>Have you ever wondered whether you&#8217;re definitely on the latest patch of SQL?</p>
<p>I found a site a few years ago which I use at least once a week, every week.</p>
<p>In SSMS when you view a server&#8217;s properties you will see a version number e.g. 11.0.5058.0 which to most of us doesn&#8217;t mean a lot. On the face of it you can tell its v11 of the software, and you suspect it&#8217;s not the GA release due to the 5058 part, but in reality how does this translate to the year and service pack?</p>
<p>The answer is: <a href="http://sqlserverbuilds.blogspot.co.uk/">http://sqlserverbuilds.blogspot.co.uk/</a> which provides a nice little table as below.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2018/01/011418_1139_TipoftheWee1.png?w=810&#038;ssl=1" alt=""></p>
<p>The best thing is that this site seems to be kept up to date all the time and further down the page you will see all sub-versions/ Cumulative updates and release dates, with hyperlinks to release notes.</p>
<p>I find this info very useful when debugging performance issues, especially with 2008R2/2012 so I can check the customer is on the latest patch of the version they have. Also with Microsoft&#8217;s changes to extended life of these products over the last few years, some patches are supported and others aren&#8217;t. To check what is/isn&#8217;t supported it&#8217;s worth browsing (and bookmarking) this link: <a href="https://support.microsoft.com/en-us/lifecycle/search/">https://support.microsoft.com/en-us/lifecycle/search/</a></p>
<p>The Product Lifecycle page at Microsoft is fully searchable for all MS products, and will tell you which patches are supported and which ones may already be out of support. e.g. for SQL Server 2012 you&#8217;re fine if on SP4, for SP3 you only have 8 months left, SP2 down is already out of support:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2018/01/011418_1139_TipoftheWee2.png?w=810&#038;ssl=1" alt=""></p>
<p>If you ask me we should all be on SQL 2016, but I fully understand the reasons we hold back, whether due to licensing costs, downtime issues, 3rd party support or other issues.</p>
<p><a href="https://www.wardnet.co.uk/tip-of-the-week-2-sql-versions-eol/">Tip of the Week 2 &#8211; SQL Versions &#038; EOL</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">483</post-id>	</item>
		<item>
		<title>SQL Server Tip of the Week &#8211; Winter Break</title>
		<link>https://www.wardnet.co.uk/sql-server-tip-of-the-week-winter-break/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 11 Dec 2017 09:30:29 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[Premier League]]></category>
		<category><![CDATA[weather]]></category>
		<guid isPermaLink="false">https://www.wardnet.co.uk/?p=467</guid>

					<description><![CDATA[<p>Unlike the Premier League, I will take a winter break from the SQL Tips, Most likely I will use the</p>
<p><a href="https://www.wardnet.co.uk/sql-server-tip-of-the-week-winter-break/">SQL Server Tip of the Week &#8211; Winter Break</a></p>
]]></description>
										<content:encoded><![CDATA[<p>Unlike the Premier League, I will take a winter break from the SQL Tips,</p>
<p>Most likely I will use the break to build up the quality and quantity of content for an awesome 2018.</p>
<p>On that note I&#8217;ll leave you with this link to get your systems ready for the weather&#8230;&nbsp;</p>
<p>https://wateroxconsulting.com/archives/prepare-for-winter/&nbsp;</p>
<p>&nbsp;</p>
<p>Thanks for visiting!</p>
<p><a href="https://www.wardnet.co.uk/sql-server-tip-of-the-week-winter-break/">SQL Server Tip of the Week &#8211; Winter Break</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">467</post-id>	</item>
		<item>
		<title>SQL Server Tip of the Week &#8211; Avoiding restore errors</title>
		<link>https://www.wardnet.co.uk/sql-server-tip-of-the-week-avoiding-restore-errors/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 04 Dec 2017 09:30:33 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Live Production]]></category>
		<category><![CDATA[Object Explorer]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Test Development]]></category>
		<guid isPermaLink="false">https://www.wardnet.co.uk/?p=463</guid>

					<description><![CDATA[<p>Quick tip for this week as I have not been home much to contemplate writing something epic, although I have</p>
<p><a href="https://www.wardnet.co.uk/sql-server-tip-of-the-week-avoiding-restore-errors/">SQL Server Tip of the Week &#8211; Avoiding restore errors</a></p>
]]></description>
										<content:encoded><![CDATA[<p>Quick tip for this week as I have not been home much to contemplate writing something epic, although I have a couple lined up for future…</p>
<p>This week, my quick tip is for avoiding errors when restoring over an existing database.</p>
<p>It is common practice for many enterprise applications to have the concept of a Live/Production environment and a Test/Development environment. Some products will see you have around five or six different ones, especially during implementations of new systems or upgrades. Typically, I work in a world where you have three environments with your data and one with sample/demo data.</p>
<p>I will be writing a more in depth backup/restore guide, but I wanted to cover some generics to start with.</p>
<p>One common task is to take a copy of live data and restore it into a test or development area so that you can try things out without risking critical data. Some companies may even have policies where they do this weekly or monthly to have a &#8220;pristine&#8221; copy of their data. When this is, a repetitive task it&#8217;s sometimes best to script it out, especially where the process is identical each time, the problem with this though is ensuring the destination database is in a state where the restore can happen. And whilst we can script in the Single-User mode and various other options, we cannot 100% safely validate and kill existing sessions, what if a session to that database is from a business critical system you forgot to switch off before the process began?</p>
<p>Therefore, my recommendation is to use the SQL Server Activity Monitor. This tool is also a starting point for identifying performance issues such as long running queries or table locks.</p>
<ol>
<li>
<div>To access the Activity Monitor load up SQL Server Management Studio, log in, and then right click the Server node (top) in the Object Explorer, under the menu you will see Activity Monitor:</div>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2017/12/120317_1949_SQLServerTi1.png?w=810&#038;ssl=1" alt=""></li>
<li>
<div>To find whether your destination Database has any connections to it you need to expand the processes section, in there you will see a list of every database connection.</div>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2017/12/120317_1949_SQLServerTi2.png?w=810&#038;ssl=1" alt=""></li>
<li>
<div>A quick way to see if your database has any connections is whether or not it appears in the database column, you can click on the header to filter on DB name, if yours is not there then it doesn&#8217;t have any connections, if it is then filter on it so you can see what connections you have:</div>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.wardnet.co.uk/wp-content/uploads/2017/12/120317_1949_SQLServerTi3.png?w=810&#038;ssl=1" alt=""></li>
<li>If there is only 1 or 2 lingering connections you could right click on them row by row and kill the connection, however if, like above, there are many, I would suggest looking at the Hostname column and seeing what is running on that machine (as the user listed in Login column) to try to identify what you forgot to switch off before attempting the db overwrite.</li>
</ol>
<p>This tip has saved me many times, it give you a quick view of access to a database, and is the first port of call should you get any &#8220;can&#8217;t overwrite, file in use&#8221; style errors.</p>
<p><a href="https://www.wardnet.co.uk/sql-server-tip-of-the-week-avoiding-restore-errors/">SQL Server Tip of the Week &#8211; Avoiding restore errors</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">463</post-id>	</item>
		<item>
		<title>SQL Server Tip of the Week &#8211; AlwaysOn Introduction</title>
		<link>https://www.wardnet.co.uk/sql-server-tip-of-the-week-alwayson-introduction/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 09:30:15 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[AlwaysOn]]></category>
		<category><![CDATA[Availability Group]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[Clustering]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[SQL]]></category>
		<guid isPermaLink="false">https://www.wardnet.co.uk/?p=451</guid>

					<description><![CDATA[<p>Here&#8217;s some notes I recently wrote to help explain the basics of AlwaysOn Clustering in SQl &#8211; originally written for</p>
<p><a href="https://www.wardnet.co.uk/sql-server-tip-of-the-week-alwayson-introduction/">SQL Server Tip of the Week &#8211; AlwaysOn Introduction</a></p>
]]></description>
										<content:encoded><![CDATA[
<p>Here&#8217;s some notes I recently wrote to help explain the basics of AlwaysOn Clustering in SQl &#8211; originally written for fairly technical people, i/e/ they know how to install SQL and use SSMS!</p>



<p>&nbsp;<br><strong>What is Always On?</strong><br>SQL&#8217;s new (from 2012) failover clustering solution, built in to SQL that allows automatic failover of SQL servers without interruption to the applications using a database.</p>



<p><strong>What is required?</strong><br>2 fully licensed SQL servers at the same version with replication module installed<br>Windows Failover Clustering role installed<br>IP addresses for cluster (1 for cluster, min. 1 per node)<br>Windows Domain &#8211; cluster is a domain object</p>



<p><strong>How to install/configure</strong><br>Microsoft documentation/Brent Ozar is best source.<br>e.g. <a href="https://www.brentozar.com/archive/2015/06/how-to-set-up-standard-edition-alwayson-availability-groups-in-sql-server-2016/">https://www.brentozar.com/archive/2015/06/how-to-set-up-standard-edition-alwayson-availability-groups-in-sql-server-2016/</a> for 2016<br>For installing Failover clustering you could add the role via PowerShell e.g.</p>



<pre class="wp-block-code"><code lang="powershell" class="language-powershell line-numbers">Install-WindowsFeature FailoverClustering,RSAT-Clustering-Mgmt,RSAT-Clustering-PowerShell</code></pre>



<p><strong><br>What to know in advance</strong><br>For an installer there are a number of things you need to know in advance:<br>• What type of synchronization is to be used?<br>• Synchronous or Asynchronous &#8211; <a href="https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/availability-modes-always-on-availability-groups">https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/availability-modes-always-on-availability-groups</a><br>• Cluster Name &#8211; this is the name above all servers in a cluster and therefore where Epicor applications point<br>• Cluster IP address &#8211; ideally decided in advance so can be reserved/static , it’s the IP for the cluster not the server<br>• Node IP address &#8211; each server in the cluster will have a secondary IP used purely for clustering, this is not the IP address used for management of that server<br>• Secondary Node IP address &#8211; only if the servers exist in different subnets they need a node IP address in each range<br>• Witness Server file location &#8211; this is another server available to all SQL servers where a witness file is stored to maintain quorum, example \\FILESERVER\SQLWitness</p>



<p><strong>Things to Note</strong></p>



<p>• Asynchronous synchronization can mean a data loss, review the link above for more info, it is also not an automated failover. &#8211; designed for offsite replication over a large distance.<br>• Synchronous is a more accurate (live replica) sync, but &#8220;could&#8221; be a source of lag SQL side. i.e. increased overhead<br>• In 2016 Standard SQL you can only have 1 DB in each availability group, therefore from a config side it&#8217;s worth considering which DBs need to be available should the system failover.<br>• When restoring a database in an availability group (overwriting) you must take it out of the availability group first, and example of doing this with existing restore scripts is (with additions highlighted):</p>



<pre class="wp-block-code"><code lang="sql" class="language-sql line-numbers">--Backup Source DB Code Goes Here
--Safety Backup of Destination DB Code Goes Here
USE [master]
ALTER AVAILABILITY GROUP MyDatabase_AG REMOVE DATABASE MyDatabase; 
--Restore Script GOes here, i.e. grab back of source and overwrite destination...
ALTER AVAILABILITY GROUP MyDatabase_AG ADD DATABASE MyDatabase
GO</code></pre>
<p><a href="https://www.wardnet.co.uk/sql-server-tip-of-the-week-alwayson-introduction/">SQL Server Tip of the Week &#8211; AlwaysOn Introduction</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">451</post-id>	</item>
		<item>
		<title>SQL Server Tip of the Week &#8211; Domain Migration</title>
		<link>https://www.wardnet.co.uk/sql-server-tip-of-the-week-domain-migration/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Mon, 20 Nov 2017 09:30:11 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Domain Migration]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[SA]]></category>
		<guid isPermaLink="false">https://www.wardnet.co.uk/?p=443</guid>

					<description><![CDATA[<p>I thought I would try a new feature, and hopefully get a schedule of tips I want to share with</p>
<p><a href="https://www.wardnet.co.uk/sql-server-tip-of-the-week-domain-migration/">SQL Server Tip of the Week &#8211; Domain Migration</a></p>
]]></description>
										<content:encoded><![CDATA[<p>I thought I would try a new feature, and hopefully get a schedule of tips I want to share with the world.</p>
<p>In the last week or so the subject of Domain Migration has come up for the millionth time in my career so far (slight exaggeration)</p>
<p>Switching domains is easy, log in on one domain, go to the system settings in Windows and change to the other domain, with a reboot committing the change fully. This is great, but what about the applications?</p>
<p>SQL is possibly the most popular DB platform out there, and up until the last couple of months has been restricted to the MS Windows platform. As a Microsoft product it ties in heavily to the operating system and Active Directory. Typically most DBAs will configure there SQL installation with dual authentication, Windows for binding Windows Accounts and SQL Authentication for local based security. The majority of applications these days will utilise Windows Authentication as this make the management of security policies such as password expiration and removal of users a little simpler, and generally management is from one place, i.e Active Directory. The only issue here is if you&#8217;re doing a manual Domain Migration (i.e no ADMT style tools) then as soon as you change the domain the SQL server sits on, the applications will no longer work and the users will not be able to connect. This is where the SA user is god, as it is local to the SQL installation not the domain/Windows element.</p>
<p>My advice for a manual SQL Server domain migration is simple:</p>
<ol>
<li>Ensure you have dual auth enabled</li>
<li>Ensure you know your SA password (if not, create a new SA style user and note the password you use)</li>
<li>Change SQL to use builtin service accounts (not a domain service account) before the move &#8211; can be changed afterwards to domain users under new domain.</li>
<li>Change ownership of all DBs to SA</li>
<li>Change ownership of all Task Agent jobs to SA</li>
</ol>
<p>These should be done before switching domain!</p>
<p>For steps 4 and 5 I have the following scripts which I have used a few times now, and they do exactly as described, changing the ownership:</p>
<p><strong>Change DBs ownership to sa:</strong></p>
<pre><code class="language-sql">EXEC sp_MSforeachdb 'EXEC [?]..sp_changedbowner ''sa'''</code></pre>
<p><strong>Change Job ownership to sa:</strong></p>
<pre><code class="language-sql">DECLARE @name_holder VARCHAR(1000)

DECLARE My_Cursor CURSOR

FOR

SELECT [name]&nbsp; FROM msdb..sysjobs

OPEN My_Cursor

FETCH NEXT FROM My_Cursor INTO @name_holder

WHILE (@@FETCH_STATUS &lt;&gt; -1)

BEGIN

exec msdb..sp_update_job

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @job_name = @name_holder,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @owner_login_name = 'sa'

FETCH NEXT FROM My_Cursor INTO @name_holder

END

CLOSE My_Cursor

DEALLOCATE My_Cursor</code></pre>
<p>&nbsp;</p>
<p>One additional step once the migration is done and the server is back up on the new domain, would be to login as sa, and add in the security groups/users from the new domain that need access to the server. I typically add the Domain Admins as SQL sysadmin users. To achieve this for the current domain you can run:</p>
<pre><code class="language-sql">USE [master]
GO
declare @DomainName nvarchar(32)
set @DomainName = (SELECT DEFAULT_DOMAIN()[DomainName])
declare @DomainAdmin nvarchar(64)
set @DomainAdmin = @DomainName + '\Domain Admins'
print @DomainAdmin
EXEC master..sp_addsrvrolemember @loginame = N'NT AUTHORITY\SYSTEM', @rolename = N'sysadmin'
EXEC master..sp_addsrvrolemember @loginame = N'NT AUTHORITY\NETWORK SERVICE', @rolename = N'sysadmin'
EXEC master..sp_addsrvrolemember @loginame = @DomainAdmin, @rolename = N'sysadmin'
print @DomainAdmin + ' Has been Added as sysadmin'
GO</code></pre>
<p>Incidentally this was one of my early attempts at writing SQL scripts without googling around! &#8211; not this also adds SYSTEM and NETWORK SERVICE (local builtin users) as sysadmins.</p>
<p><a href="https://www.wardnet.co.uk/sql-server-tip-of-the-week-domain-migration/">SQL Server Tip of the Week &#8211; Domain Migration</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">443</post-id>	</item>
		<item>
		<title>2016 Update</title>
		<link>https://www.wardnet.co.uk/2016-update/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Sun, 27 Nov 2016 17:53:16 +0000</pubDate>
				<category><![CDATA[Career]]></category>
		<category><![CDATA[Epicor]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Enterprise Search]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[Remote Desktop Services]]></category>
		<guid isPermaLink="false">http://wardnet.co.uk/?p=377</guid>

					<description><![CDATA[<p>If you have seen my other (more personal) blog you will have come across the post I did recently regarding</p>
<p><a href="https://www.wardnet.co.uk/2016-update/">2016 Update</a></p>
]]></description>
										<content:encoded><![CDATA[<p>If you have seen my other (more personal) blog you will have come across the post I did recently regarding how 2016 has flown by and so many things have changed career wise. If you&#8217;ve not read that feel free to jump on over here:&nbsp;<a href="http://johnnyward.me.uk/newblog/a-year-of-two-halves/">http://johnnyward.me.uk/newblog/a-year-of-two-halves/</a></p>
<p>As this is my technology blog I though I&#8217;d share a quick update on skills and technologies that have advanced through this year, the most noticeable are:</p>
<ul>
<li><strong>SQL Skills</strong> &#8211; yes I know more than just installing now, I can troubleshoot performance issues and tweak setups to ensure a nice smooth running system.. Maintenance of SQL is also one of my most common tasks across many customers.</li>
<li><strong>ERP</strong> &#8211; a broad subject, but I will break down a little. Firstly I am more than capable of a &#8220;vanilla&#8221; install of Epicor ERP 10/10.1, I&#8217;m also capable of updating/upgrading those platforms. On top of that I can also talk tech with IT/ERP managers across all industries to help spec, and install/deploy the Epicor ERP platforms. This also includes a number of additional installs (such as web, Enterprise Search, education tools etc.) and enhancements, such as those for document management and CRM.</li>
<li><strong>Hyper-V</strong> &#8211; not something I&#8217;d had the opportunity to play with much before, however I am now capable of installation, deployment, management and maintenance of Hyper-V 2012+ platforms, and I have to say, what a great platform it is.</li>
<li><strong>VMware ESX</strong> &#8211; my knowledge in VMware has also jumped this year, having had the opportunity to manage 2x ESX 6 environments in recent months and upgrade a couple of 5s to 5.5 I am once again familiar with the VMWare suite and as always find it an exciting challenge.</li>
<li><strong>Remote Desktop Services</strong> &#8211; sure we all know a little Terminal Services from back in the day, but having now deployed around 5 of these 2012R2 beauties this year, i am exceptionally impressed. Easy to install and configure, and just as easy to troubleshoot and fix, provided you have the time and mental space in order to do so!</li>
</ul>
<p>Coming up in 2017&#8230;</p>
<p>So it seems there may be a few changes ahead, ones that will potentially make my career, and about time too!</p>
<p>The biggest 2017 challenges seem to be:</p>
<ul>
<li><strong>Cloud</strong> &#8211; funnily enough the UK hasn&#8217;t quite taken to it fully yet&#8230;</li>
<li><strong>Solutions</strong> &#8211; how can a product be further enhanced to meet a customer&#8217;s longer term goals&#8230;</li>
<li><strong>Tools &#8211; </strong>might need a course in C# and a few late nights</li>
</ul>
<p>Watch this space&#8230;</p>
<p><a href="https://www.wardnet.co.uk/2016-update/">2016 Update</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">377</post-id>	</item>
		<item>
		<title>Tech Update</title>
		<link>https://www.wardnet.co.uk/tech-update/</link>
		
		<dc:creator><![CDATA[Jonathan Ward]]></dc:creator>
		<pubDate>Sun, 15 Nov 2015 15:39:04 +0000</pubDate>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Cisco Wireless Networking]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[updates]]></category>
		<guid isPermaLink="false">http://wardnet.co.uk/?p=357</guid>

					<description><![CDATA[<p>It has been a while since I posted an update of all the technologies I&#8217;ve been working with, projects I&#8217;ve</p>
<p><a href="https://www.wardnet.co.uk/tech-update/">Tech Update</a></p>
]]></description>
										<content:encoded><![CDATA[<p>It has been a while since I posted an update of all the technologies I&#8217;ve been working with, projects I&#8217;ve worked on and general IT related things that have affected me in recent times, so here&#8217;s a brief update of my world of tech!</p>
<p>&nbsp;</p>
<p><strong>Latest Technologies used</strong></p>
<ul>
<li><em>VMWare vSphere, vMotion, ESX 5.5 etc.</em> &#8211; underlying technology of the infrastructure in my current role, love the live server migrations between hosts, and the performance monitoring is very good.</li>
<li><em>Windows Server 2012 R2</em> &#8211; finally have the opportunity to work with Microsoft&#8217;s latest stable enterprise OS, and I have gradually started to like/ understand the new interface. Some of the updates to certain roles are also very impressive including WSUS (Updates), WFCS (clustering), ADDS (Activce Directory), some very nice improvements over Windows 2008 R2 which is the last main release I am familiar with.</li>
<li><em>WhatsUp Gold</em> &#8211; systems monitoring software from Ipswitch, what a fantastic product this is. I can monitor all servers, virtual machines, network components, even WLANs (which is one of the most used features). I have heavily customised the environment to have dashboards for all sorts, most notably the SQL performance (most important system) I can now see real-time memory usage/ system statuses, even in-depth transactional performance!</li>
<li><em>SQL (2008 R2) </em>&#8211; Something I&#8217;ve had to get to grips with very quickly as it runs the 2 most important systems for my current role. I am fairly confident with performance monitoring, understanding heavy queries, bottlenecks, even a grasp of lazy writes and paging! SQL is usually administered by a professional, qualified DBA, but we cope just fine!</li>
<li><em>SQL (2014)</em> &#8211; only within a test scenario but I am very proud of my virtualised SQL 2014 Always-On testing cluster, it has given me an opportunity to better understand SQL installs, Windows Failover Clusters, SQL High Availability and basic database maintenance.</li>
<li><em>Cisco Wireless Networking</em> &#8211; heavily used within large organisations across the globe, I now have a fantastic understanding and hands on experience with a network capable of almost 100% wireless coverage within an huge site! I also have great experience with security on these networks and have implemented whitelists (MAC filtering) etc. I&#8217;ve also been able to ensure the wireless network is 100% monitored across all nodes and devices, with historical data available to help resolve any issues.</li>
<li><em>Windows 10</em> &#8211; I&#8217;m a pure techie, so when the latest version of something is out, I have to try it! I was sceptical of the whole Windows 10 thing, even after trialling the pre-release versions around 12 months ago. So when the opportunity came to try at work I though yes that&#8217;s safer than at home! &#8211; so 2 months in; every device I have is now Windows 10 where possible. Being an IT admin naturally I&#8217;ve butchered it as much as possible to better understand its workings, and to be fair so far I am impressed!</li>
</ul>
<p><strong>Project Work</strong></p>
<p>Whilst the current role hasn&#8217;t really thrown any specific projects my way yet, I am actively involved with a domain migration project initiated by the buying out of our division by another company. That is something that will be happening very soon, and will probably consume a lot of my working hours up to Christmas.</p>
<p>I&#8217;ve also been spearheading work to implement a standard way of displaying data across site, this has been done using Raspberry Pi with Screenly OSE which allows scheduling of web content, images and videos for display on HD screens. This again is a recent thing that so far is working very well (no reboots/crashed in 3 weeks)</p>
<p>At home I have also been playing with a Raspberry Pi, and have plans to implement a media server to stream content such as from the home CCTV system and family photos etc. Hopefully this will be done before the year is out once I have a screen in the kitchen!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://www.wardnet.co.uk/tech-update/">Tech Update</a></p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">357</post-id>	</item>
	</channel>
</rss>
