See you in Charlotte!

Well it is that time of year again where the results of the PASS Summit 2013 session selections become public. This year was of course a very difficult one to get selected since (I believe) a record number of submissions were received -but thankfully I still managed to knock one session (out of four) into the back of the net. I would also like to take this opportunity to congratulate all the other selected Speakers (especially if this is your first time at the Summit) and commiserations to all those who were not successful on this occasion. I know the usual inquests and finger pointing will naturally ensue by a small handful of people who feel personally aggrieved that they weren’t successful, but believe me when I say that the process is as fair as I could expect, but not without room for improvement (more on this very soon in a follow up post).

Essentially you should take heart in the fact that whilst the selected schedule *might* have been better by your inclusion (yes we know you are awesome and have written a gazillion books and are a respected MVP/ MCM and Certified Guru), but at least someone else will get the opportunity to shine (and hopefully be awesome too). Ultimately (in my opinion) the Summit is about a team effort so we should be nothing but pleased for them and take our failures in good grace.

speakersuccess

The Summit 2013 marks my third year at the biggest SQL Server Conference in the World as a speaker in any capacity, my second appearance giving a regular session and is the third regular session in total that I will have presented there (I gave two last year). It will also be my fourth as an attendee. I have been very grateful to have presented two lightning talks in total at the last two Conferences and I am always very humbled to get chosen in any capacity and grateful to the people who make this happen. I would also like to give a very quick shout out to my good friend Niko Neugebauer who I was hoping to co-present a Personal Development session with. Unfortunately this session was not chosen which is a big loss for the Summit in my humble opinion since (for me at least) Niko oozes #awesomesauce and I think our session would have ROCKED! Still perhaps another time and I keep my fingers eternally crossed that Niko (blog|twitter) is successful at next years Summit if not sooner. If anyone deserves payback for all his HARD community efforts and major recognition for his abilities, he is your man!

I shall be presenting on one of my favorite subjects -SQL Server Concurrency. Those of you who follow me a little closer than is healthy :) will already be aware, last year I presented a session titled “READPAST & Furious: Transactions, Locking, and Isolation (DBA-309)” which focussed on some of SQL Server’s crazy behaviors and concurrency basics. My session this year is called “Lock, Block and Two Smoking Barrels – SQL Server Concurrency” and will follow along similar lines looking at even more SQL Server crazy behaviors but focus in a little bit more depth on transactional processing theory and contrast SQL Server’s Pessimistic and Optimistic isolation levels and how they may help/ hinder/ make no difference to the concurrency of your environment. The “Two Smoking Barrels” referred to in the title is of course a direct reference to SNAPSHOT Isolation Level and READ COMMITTED Snapshot Isolation -the optimistic implementation of READ COMMITTED Isolation Level. Yes we are sure to focus more on these two optimistic bad boys. I hope you can manage to come to my session, I think we will have a blast!

If you are interested, the following is the session abstract:-

SQL Server is a high performance relational engine and provides a highly scalable database platform but due to its complexity and bad programming practices can be prone to serious concurrency problems, unexpected behaviors, lost updates and much more!
In SQL Server 2005, two optimistic concurrency mechanisms were introduced and touted as the solution to all our problems. Now in SQL Server 2012 (and beyond) even more have followed, but many challenges and problems still remain.

Let’s take a long look into the world of SQL Server concurrency and investigate Pessimistic and Optimistic isolation understanding how they work, when you should use them, and more importantly when they can go very wrong.

Don’t be staring down the wrong end of SQL Server’s two Smoking Barrels and join me for this revealing and thought provoking presentation.

Posted in Concurrency, networking, personaldevelopment, publicspeaking, sql, sqlpass, SQLServerPedia Syndication, summit | Leave a comment

T-SQL Tuesday #41 – I ♥ SQLBits

TSQL2sDay150x150It’s been a long time since I last wrote a T-SQL Tuesday post but the combination of a great topic along with a spare 5 minutes of downtime has resulted in my contribution to the mix this month.

This time around T-SQL Tuesday is hosted by Bob Pusateri (blog|twitter) and his chosen topic is “how did you come to love presenting?”. So here goes…

In 2010 I had traveled to my very first conference as a presenter. So there I was, stood on the stage in front of a motley collection of SQL professionals, realizing the enormity of what was about to happen.

For many years I had been one of the guys in the crowd of a sea of attendees who had come to listen to awesome presentations from awesome professionals. From time to time I would wonder what it must be like talking in front of all those people -and more importantly whether I could be capable of such a feat. Did I have anything to say? Yes absolutely, but these guys were (of course) in a different league from me, and a league in which I could never hope to emulate. Ever. Then a funny thing happened one day… I decided to submit a presentation to SQLBits 7 really out of curiosity more than anything.

Oh Flip!

Oh Flip!

Months later, oh joy of joys… I got selected!

Finally when the euphoria faded, the reality set in. OH MY GOD… I’VE BEEN SELECTED!!! WHAT AM I GOING TO DO!!! This presentation was going to be my first ever presentation to my first ever audience anywhere ever and I knew it wasn’t going to be a walk in the park. There was also an extra element of excitement/ fear in that SQLBits always recorded their presentations, hosted them publicly for free on the internet, and (if that wasn’t enough) used picture in picture recordings of the presenter in sync with the slidedeck.

Yes people, even back then SQLBits was a very slick conference, and if you are going to fail at presenting, it is perhaps not the place to start :) .

And let’s not forget the leap of faith that the SQLBits committee had shown by selecting me for this event. Whilst I was not entirely unknown from a social media perspective (I had been a active blogger and twitter user for several years by then) the fact remains that as a presenter I was (shall we say) a little inexperienced!

So moving back to stage where I was delivering my first ever session…

I remember looking at the audience quite early on around 5 minutes into the presentation and I clearly remember thinking I AM ACTUALLY DOING THIS!!! After composing myself, I continued the session and think it went quite well. Not only was it one of the most frightening, exhilarating, scary and rewarding experiences that I have ever had, the months and months of preparation leading up to the event improved my technical skills exponentially from where they had been before.

Now with every presentation I deliver, I always learn hugely from each experience.

After SQLBits 7 I decided that I wanted more and have gone on to present at every SQLBits since (to date). I have also delivered sessions to many major SQL conferences and community events around the world, seen places I would have never seen, have met people I would have never met and embraced the SQL Community in ways that I had never realized possible.

So to the SQLBits Committee who made it all this possible and started my enormously rewarding journey, I would like to say a special thank you!

SQLBits I think I ♥ you!

Posted in learning, personaldevelopment, publicspeaking, sql, sqlbits, SQLServerPedia Syndication, t-sql tuesday | Tagged | 1 Comment

How to run SQL Server 2012 on the Kindle Fire HD

Warning! Please do not attempt to perform any of the following steps on production systems. This information is provided purely for reference and any attempt to replicate these actions on your own hardware will be purely at your own risk!

One of the biggest benefits to the latest release of SQL Server (and reasons to upgrade) is that Windows Server Core is now a supported option. For those of you who are not yet familiar with Server Core, it could be best described as a reduced GUI version of Microsoft Windows. In other words, if you like the command line then you are in for a very big treat! Regular visitors to these pages will most likely be very aware of my passion for Windows Server Core and more to the point running SQL Server on it.

I digress slightly, but the point is that because SQL Server can now run on within a reduced graphical interface environment, one large beneficial side effect to this is the portability of the database engine. More specifically we can “hack” SQL Server to run on more and more types of hardware and software. The following is a closely guarded secret by Microsoft, but with with a few simple hacks, re-compilations and know how, we can spoof SQL Server to run on several other Operating Systems.

Let's get to this!!!

Let’s get to this!!!

Now is probably a good time to stress that whilst I will reveal some of the magic involved in fooling SQL to run elsewhere other than Windows, I am currently bound into a Non-Disclosure Agreement with Microsoft and will therefore be careful not to break it. Therefore any information that I have compiled within these pages are public domain and can be found from various sources elsewhere. It is also important to stress that as of this time of writing, only the SQL Server features supported by Windows Server Core can be “ported” across to other environments -so if you are wanting to use Master Data Services elsewhere other than “full-fat” Windows, then unfortunately you are out of luck.
For a list of all the SQL Server features currently supported on Server Core you should visit “Install SQL Server 2012 on Server Core“.

Several months ago I came into possession of a lovely new Kindle Fire HD and as you may know, this tablet runs a customized version of Google’s Android Operating System. Having had some recent (but limited) success with running SQL Server on some other Android based Hardware I decided to try my luck on this nice bit of kit, and the following is how I did it.

Install Server Core

Probably one of the most time consuming parts of this whole exercise is the installation of the Server Core Operating System. This can be especially bewildering if you have never done so before, but a very good source of information is the MSDN article ”Install and Deploy Windows Server 2012“. One reason I chose Windows 2012 as opposed to Windows 2008R2 was simply to eliminate any possible backwards compatibility issues with Android when we come to port SQL Server. For instance there is a well known bug in Android 1.6 Donut where a port of SQL Server from Windows 2008 will cause erratic buffer pool memory corruption.

Install SQL Server onto Server Core

Installation of SQL Server onto Server Core is relatively straight forward (see the previous link provided) as long as you are comfortable with performing a command line installation -either through using a configuration file or a full  set of command line options. Unfortunately (and perhaps understandibly) GUI based installation will not work, however I did identify a “bug” which allows a workaround which I detailed in the following post “Using the SQL Server Installation Wizard on Server Core!“.

Dump the SQL Server Process to disk

There are lots of ways to dump a process working set (the memory a process is consuming) to disk. On Server Core, it is no more difficult to do so since the Task Manager is (partially) supported and works as you would expect. You simply need to locate the SQL Server Service process, right click it and select the Create Dump File option.

dump_process

Once this is successful you will see a message telling you where the dump file has been created. One very important consideration for you is to make sure that you have set a fairly low maximum memory cap for SQL Server’s buffer pool otherwise it the dump file will be much larger (and take longer to output) in addition it will make your ported SQL Server application to run faster.

dumped process

Rename the dump file to .src

A fairly simple but necessary step to perform is the renaming of the dump file that we have just created. The reason for doing so is so that we can recompile the assembly in the next step and target our assembly for Operating System of choice. Simply right click the dump file and rename its extension to .src.

Recompile the source file using the .NET Native Image Generator

The Native Image Generator tool (ngen.exe) is an often overlooked and ignored utility for the .NET Framework but is very useful for improving the performance of our .NET applications and avoiding JIT compilation. There are several undocumented options for ngen and we shall use them to port our application. Since SQL Server is not a full .NET application and only uses parts of the .NET Framework (for optimization reasons) we can use the undocumented “/partial” switch which will recompile all necessary IL code sections of the dump file and will translate all other machine code sections into one complete assembly. Since we are also moving to a different Operating System we must also use the undocumented “/architecture:ux64″ switch to target a 64 bit Android environment.

ngen

Once we have created our native Android image of SQL Server there are only a few final steps remaining!

Install FSExplorer on your Kindle

In order to copy our SQL Server Assembly across to our Kindle Fire HD, navigate to the root and create a new folder we need a decent file explorer application. Probably the best I have come across on the Android Operating System is a nice little free app called FSExplorer. Open the Kindle App Store, search for and install FSExplorer.

Move the SQL Server image to your Kindle

Using FSExplorer, navigate to the file system root and create a folder called SQLSrvr where you will stored the Android SQL Server assembly. Copy the recompiled SQL Server image to your Kindle under this folder.

Set SQL Server to auto-load

In order to auto-load SQL Server as a daemon process you should first create an auto loader file under the root calling it startp (if one does not already exist). Make sure the file has the execute permission assigned and within it enter one simple line start /SQLSrvr/sqlsrvr.d.

Don't forget to edit the startp file and copy the SQL assembly!

Don’t forget to edit the startp file and copy the SQL assembly!

After you have made this last change, reboot your Kindle Fire HD and SQL Server should launch successfully.

Enjoy!

Posted in android, humour, linux, sql, SQLServerPedia Syndication | 3 Comments