Tag Archives: free stuff

Presenting: Presentation Mode!

As a presenter at events I am constantly trying to improve the experience of showing information in slides and transitioning back and forth to demos.

ZoomIt: An OK solution for a bad problem?

The most jarring aspect of this is making sure that demo code is visible to the audience. The fantastic ZoomIt allows a presenter to (surprise, surprise) zoom into portions of the screen and highlight/annotate code or information to the audience:

ZoomIt

First of all, the act of zooming can be disorienting to the audience. There is a flurry of zoom and scrolling activity to get to where you want to on the screen. After this, the actual presentation of the zoomed content usually works nicely enough. However, the zoom out must occur before moving back into the PowerPoint slide deck to continue with the next portion of the presentation.

This has been the only way to give a consistent and clear overview to an audience, particularly when SSMS was being used for demos. The issue revolves around the fact that although the T-SQL code editor window can resize fonts, the remainder of the SSMS interface is set in a single font type and size.

Many of you may have noticed that Microsoft made a key change in their deployment strategy with regards to SSMS when SQL Server 2016 was released. SSMS was decoupled from the core engine components and follows a much shorter release cycle. Since SQL Server 2016 was released to market in September, there have been at least 6 versions of SSMS released. This is fantastic, we now no longer have to wait for the next release of SQL Server (whether a full version or a service pack) for SSMS to get bug-fixes or feature additions.

This is now extremely important when we look at the issue around font sizes and types. Microsoft has paid attention and with their current Release Candidate (RC) for SSMS 17 they included a very important release note entry…..

Presentation Mode!

If we read the release notes, we see that there are three new tasks available via Quick Launch inside SSMS.

  • PresentEdit – This allows the fonts for presentation mode to be set
  • PresentOn – This turns on presentation mode
  • RestoreDefaultFonts – Reverts SSMS back to the default fonts after activating presentation mode

All three tasks are pretty easy to understand, although the final task highlights that a task to specifically turn off the presentation mode is currently missing (this is an RC after all).

The “Quick Launch” field can be found in the top right corner of SSMS 17.0 RC3 and begins searching as soon as we start to type in it:

Present

By choosing “PresentEdit” an xml file is opened in a new tab in SSMS, showing us the options that we can change to make SSMS look different when presentation mode is activated.

PresentEdit

We are presented with the option to choose font family and font size for both the text editor and, more importantly, for the environment in general (menus, object explorer etc.). This is where we can play around an find the fonts that work best in our presentations.

Using the values in my screenshot and launching PresentOn made a huge difference in font readability inside SSMS. The image below shows SSMS on the left in “standard” mode and in presentation mode on the right.

PresentOnSize

The difference is quite clear, all environment fonts are much larger and easier to read on during presentation mode. This is great for demoing SSMS during a presentation!

However, the biggest improvement is when we are querying data. In previous versions of SSMS the grid results were tiny when projected onto a wall. The only way to see the results were to either return the results as text (which has the downside of running off the right-side of the screen for larger result sets), or using ZoomIt and people getting motion sickness.

Now, with presentation mode on, the results grid is included in the font resizing:

PresentOnGridResultsSize

Praise be to the spaghetti monster! No more motion sickness required and attendees can concentrate their contempt at all the bullet points in the slide deck instead.

So if you are a presenter, or want to have more control over the fonts in SSMS, your wait is almost over…… or is over now if you are brave enough to install the RC of SSMS 17 🙂

Happy font-changing

You didn’t know that?! But that’s so obvious!

Rant-mode activated

Today I noticed a tweet from Andrew Prewski (@DBAFromTheCold)

Loving all the passive aggressive comments about my article on SQL on linux, keep ’em coming!

Andrew’s tweet piqued my interest and I went to look at his blog-post “Killing databases in SQL Server on Linux“. In the post, Andrew investigates how files are handled inside Linux, in particular how database files are handled. Go and read it, it is really interesting and a possible eye-opener for anyone who has no experience with Linux.

Now, the reason for this rant is the comments that came through from people who do have experience with Linux/Unix (go and read those too). Many of them boil down to basically scoffing at how Andrew didn’t know that Linux handles files differently to Windows and has done for years/decades. The tone of these comments were aimed to belittle Andrew for not knowing about this behaviour.

This pisses me off!

Maybe I’m just having a bad day or something, but it seems wrong to me that someone who is trying to learn should be made to feel in any way stupid for exploring something. It seems even wronger for this sort of behaviour to come from an area of the IT world which generally prides itself with the idea of “hacking”. The whole premise of taking a technology that you don’t understand and prodding, poking, dissembling and rebuilding – that is the “way of the hacker”, or at least how I have always understood it.

I for one hope that Andrew won’t be deterred by this shitty behaviour and also would hope that anyone reading this would think twice about how they respond to a similar situation. Everyone starts out at zero, not even Linus Torvalds was born being able to code.

Please remember: Don’t be condescending. Offer tips, advice or references to help, not ridicule.

Database objects can DIE in SQL 2016 without using the KILL command

When developing database code for SQL Server one issue that has got in the way of smooth deployment has been a simple check for the existence of an object before creation.

The issue being, whenever an object should be created, we need to be sure that there isn’t an object already in the database that has the same name. If there is, we need to do something beforehand otherwise the CREATE command is going to fail like this:

Msg 2714, Level 16, State 6, Line 16
There is already an object named {objectname} in the database.

DIE Database Object, DIE!

Up until SQL Server 2016 the only way of making sure an object wasn’t already present was by adding a snippet of code directly before the CREATE statement. This could be achieved in multiple ways, but essentially all solutions just checked for an object with the name provided.

Something along the lines of this:

IF OBJECT_ID('MyTable') IS NOT NULL
DROP TABLE MyTable

While that is a very short piece of code, it is still code that needs to be typed and checked and tested. Of special note is the fact that the object name needs to be correctly typed twice. Let us also not forget, because there are multiple ways of achieving this existence check a new developer may not immediately understand what this code is doing.

You may notice in the paragraph above the code example, I wrote “Up until SQL Server 2016….”. That is because with the release of SQL Server 2016, Microsoft has made our lives a little bit easier in this respect. It is now possible to do the existence check and the drop in one command rather than two.

The long-winded and more error prone example above simply becomes:

DROP TABLE IF EXISTS MyTable

Wow! Drop Table If Exists, or DIE for short. Super-short (only one chance of mistyping the object name) and super easy for anyone to understand, right?

But wait! There’s more!

This existence check is not limited to tables. It covers many more objects, as outlined on the SQL Server Database Engine Blog.

But wait! There’s even more!

If you wanted to be really efficient and only want to write the (not really) verbose DROP TABLE IF EXISTS once for all the tables that you want to drop, you can!

This code will work flawlessly:

DROP TABLE IF EXISTS MyTable, MyOtherTable, YetAnotherTable

The elegance of DROP TABLE IF EXISTS is that if any (or all) of the three tables above exist, they will be deleted. If none of them exist, then nothing will happen.

And here is the catch

Unfortunately, the pluralised usage of DROP TABLE IF EXISTS doesn’t seem to work for all object types. I tried to do the same thing with database users:

DROP USER IF EXISTS User1, User2

This would end in a syntax error.

So there we have it. Objects can now DIE inside SQL Server, without the KILL command 🙂

 

At the time of writing I have not checked all of the supported objects of DIE, but will update this post once I have found the time to do so.

Growing a community is not easy……

…… But it is a lot of fun!

Last Friday I put on a small community event in my home town (#SQLGrillen). It was no SQLSaturday, with just four sessions and only 2 months preparation time, but it was a lot of fun!

Why would you do this? Why for free?!

I’ve heard those two questions a lot recently in the run up to the event itself, but also over the last year since founding the Emsland SQL Server User Group.

It seems to confuse people greatly that I would want to spend my private/personal time on “work”. I have wondered if this is a regional bias (I live in a quite rural part of Germany), or maybe a cultural one (many people I have met in Germany strictly separate work from private life). If the cultural reasoning holds true, then it would explain some of the difficulties of getting attendees for the user group. Either way, I don’t consider it to be “work”. Of course there is an overlap, it is a SQL Server user group and I work with SQL Server. However, I find the social aspect of a user group/event to be almost as important as the technical side. I probably enjoy exchanging ideas/war stories with fellow data professionals more than the technical content – somehow, even though I’m an awkward geek, the human interaction is the source of greater fulfillment.

Why would I do this for free? Why do people run marathons? Why do they join various other clubs in their spare time? Do they get paid to do this volunteer work? I think this goes back to the work/private life separation thing and people not understanding how I can mix the two.

Why would I not do this?

I have made some great friends and had some fantastic experiences as part of the community and hope to “infect” other people with the community virus. I also gained a lot in my career through the things I have learned (that I would never have been able to see in my normal work day) and have gained so many connections that I now don’t need to really look for new opportunities. If I wanted to swap jobs, I just need to explore the ones that get sent my way on a daily basis.

I am not that good that people want to hire me all the time, but being out there in the community makes me visible to companies/recruiters like nothing else.

We want you!

I realise that I am preaching to the choir when writing here (if you are reading a blog on SQL Server, you are already investing time that 99% of others don’t), but I’d still like to suggest that you get yourself involved in the community somehow. There are a wide range of tasks that User Groups, Events or Associations have that need doing and are too much for their current members/helpers to achieve. Even if you don’t want to speak, there is plenty of opportunity to get involved in another way.

So please, for the altruistic side of you, or for the “get ahead in my career” side of you; get in touch with your local User Group or Association and see if you can help out in some way. You will not regret it, I assure you.

P.S. Thanks to Rob Sewell ( b | t ) for the reminder: A few places for you to start would be finding your local PASS Chapter, or if there isn’t one where you are, there are also the Virtual Chapters.

1 Year Emsland SQL User Group

Moin Moin!

Unser User Group feiert 1 Jahr mit einem Sondertreffen:

Am 04.09.2015 ab 15:00 Uhr finden insgesamt 4 Sessions statt. Es sind 4 Auswärtssprecher am Start die zu unterschiedlichen Themen vortragen werden.

Die Sessions werden gerade festgelegt, aber der Termin steht schon fest. Schaut euch die Details an und meldet euch mit dem unten stehenden Button an!

Eventbrite - Emsland SQL Server User Group: SQLGrillen

Wir freuen uns auf euch!!

P.S. Gebt das bitte weiter, wir wollen so viele Leute da haben wie möglich, danke!

 

SQLHangout #28: From DBA To Consultant

As usual, work/life got in the way, so I’m a little late blogging about this, but:

I recently had the pleasure of re-joining Boris Hristov (b | t) for one of his SQLHangouts together with Matan Yungman (b | t). We spoke for about half an hour on our experiences in moving from DBA work to Consulting.

All three of us made the move to consulting in the last year and we had a great time comparing notes on how our daily work has changed. There are some topics that surprised us all and some that we are seeing from the other side of the table.

Take a look at our episode and also check out the other Hangouts that Boris has hosted, there are some really interesting topics from a wide range of SQL Server professionals.

Speaking at SQLSaturday 356 Slovenia

SQLSat Slovenia

I have been selected to speak at one of my favourite SQLSaturdays – in Ljubljana. I will be presenting my session “Replication: What, How, Why” which I have presented before at a few other events.

As I understand it, the event is actually full up. This means two things:

  1. You are registered and will be attending: Yay for you, please make sure you do attend. If you can’t attend, please make sure to de-register so that other people may have the chance to attend instead.
  2. You are not registered and would like to come: Put your name on the waiting list and hope that you can attend.

I’m really looking forward to coming to Ljubljana again, it is one of my favourite cities and is especially beautiful in the winter.

If you can make it to SQLSaturday Slovenia, come and say “Hi”. I’ll only be on a flying visit, landing in Slovenia on Saturday and leaving again on Sunday, but I intend to enjoy myself for the brief time I’m there.

See you in 9 days!