Friday Reading 2017-04-07

As this is being published I’m on my way up to Dublin airport to head on over to the UK for SQLBits. I’ve never been before and it’s always being mentioned as people’s favourite SQL event so I’m really looking forward to it.

Anyway, this week I’ve been reading…

How to Talk Yourself out of your New Year’s Blogging Resolution… One Day At A Time
Tongue in cheek article about getting started blogging. There’s one great line… “One of the best ways to learn more is to risk being accidentally stupid on the internet.”

Among Giants
Monica Rathbun talks about how she became an MVP and what you can do for someone you think deserves to be awarded.

Is this database being used?
Nice post on the various different ways to see if a database is being used

Inside the Hunt for Russia’s Most Notorious Hacker
Wired’s article on the investigation into a notorious hacker group. Very interesting.

Have a good weekend and if you’re at SQLBits, I’m presenting on Saturday morning in Dome 8 @ 09:30, come and say hello! 🙂

Connecting a powershell session to a container

One of the questions that I was asked at SQL Saturday Iceland was “how can I view the filesystem within a container?”.

This is a great question as one of the things that people find off-putting about containers is their opaqueness. It’s not obvious where everything lives within the container or how we can view the files within it.

Thankfully there’s a simple docker command that allows us to open a powershell session within a container, that command is docker exec.

Let’s run through an example. Firstly I’m going to spin up a new container running an instance of SQL Server: –

docker run -d -p 15777:1433 --env ACCEPT_EULA=Y --env sa_password=Testing11@@ --name testcontainer microsoft/mssql-server-windows

Then verify that the container is running: –

docker ps

Now, to open up the powershell session inside run: –

docker exec -it testcontainer powershell

N.B. – the -i flag keeps the powershell session open, otherwise it will immediately exit. The -t flag creates a pseudo terminal, you don’t have to include it tbh but the examples I’ve seen online always include it.

Ok, we know have a powershell session within the container and we can execute commands as normal, for example: –

get-psdrive

This will allow us to explore what the filesystem is within the container and run powershell commands as needed. In the screenshot above it’s interesting to see the space available/used on the C: drive. Have a dig around within your containers and let me know if you find anything interesting 🙂

Thanks for reading!

Monday Coffee 2017-04-03

Last week Pass announced changes to how speakers are going to be selected for their annual conference (you can read the announcement here.

There’s been a bit of a debate about the changes but as far as I can tell, these seem to be for the better (right?).

Inviting speakers with a proven track record of delivering high-quality presentations can only be a good thing and guaranteeing that a (albeit) small number of new speakers will be there will hopefully prevent presenting at Pass Summit becoming only available to a certain circle of people.

I’ve only been to the event once and I have to say, I found quite a few of the sessions there to be below-par. Don’t get me wrong, I also saw a few great sessions but if these changes improve the overall quality then I say that they are a good thing. Of course, it’s all about the execution so only time will tell if these make the expected improvements but I think Pass are doing this right.

They’ve asked for feedback here and have organised two online meetings so that we, as the community, have the chance to speak directly to them and voice any concerns that we may have.

Have a good week.