Killing connections to a MS SQL database or change it to single user mode.

You want to take a database off line, delete it or just do something else that requires that no one else is using it.

This can be accomplished by putting the database into single user mode.

However, if that doesn’t work, you will need to find the PID of the user using the database then kill that. Be careful when you are doing this. It stands to reason that if something has a lock / an open connection, it has this for a reason. You could very likely cause data corruption by following these instructions.

  1. Open SQL Server Management Studio
  2. Log in with your domain credential. Try not to use SA. Please. SA is for emergencies.
  3. Open a query window. Press control n on the keyboard, or click the new button on the top left of the screen. There are a few things you should know about the query editor window.
    Commands should usually end with a “;”. Although this isn’t strictly necessary with MS SQL. But it’s a good habit.
    You can run / execute all lines on the screen by pressing F5.
    You can run / execute one specific line or several lines by highlighting those lines then press F5.
  4. Type SP_WHO2
    This shows you all the open connections. Look down through this list to see if there are any connections open to that database. Keep a note of the PID for each connection. Hopefully there will only be one.
  5. Now you’re ready to try to set the database to single user mode:
    ALTER DATABASE <DatabaseName> SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
    Use that command. Remember, highlight the line then press F5 when you’re ready. Of course, change the database name to the database you are working on.
  6. Now, before you go any further, bring the database out of single user mode. It’s served it’s purpose.
    ALTER DATABASE <DatabaseName> SET MULTI_USER;
  7. Press F5 of course.
  8. Watch the output window on the bottom to see if it’s worked.
  9. If you get a message saying the command can’t be completed because of locking, you might need to kill that user’s connection using a more blunt tool. Enter the Kill command. The error you might get is:
    ALTER DATABASE failed because a lock could not be placed on database
  10. Remember the PID that you kept in a safe place earlier? You want to use that now: Replace XXX with the PID.
    Kill XXX;
  11. That’s all there is too it. Be careful. with this kind of work, there’s a risk of corruption. Try to take backups.

I have a lot of updates to write here. It has been a crazy and wonderful few months. But this quick technical guide will get me back into the blogging frame of mind.

The new normal! Blended working! Hybrid working! Remote working! Nonsense? We’ll see.

I’m alternating between states of alarm, annoyance, frustration, amusement and disbelief at the various recommendations, roadmaps, guidelines, laws, media reports and expert opinions that I have read in the past few weeks.   It’s quite a simple question when considered by some people: That question is:  When do we resume working in offices?

There are a few reasons why this question is very important to me.

  1.  I hate commuting
  2. I have a lovely office at home
  3. I have used those extra hours in the morning and evening to achieve things I never would have achieved otherwise.
  4. I love being able to walk my children to school in the morning.  Currently my son comes back from school at 1:40pm so I even get to walk him back. I have relished this opportunity most of all.
  5. There’s no noise in my home office. I am consistently a lot more productive here than I am in an open plan office.

Of course, although in theory, I would love to work from home every day, I acknowledge that it’s important to go talk to colleagues in person.  It’s good to have a coffee with them in the mid-morning and to be able to speak to them about something other than work. So, for that practical reason, I’m okay with a blended or hybrid work balance where I work from home and work in Dublin.  Fortunately, it looks like this will be possible.  The reason I got thinking about this was an article I read that discusses the potential alternative work practises on TheRegister.com.

But let’s get back to the question and take a closer look at it:  When do we resume working in offices?  There are a few considerations that need to be addressed first:

  1.  For people who have settled into remote working, is there a policy to enable them to keep doing this?  In an unmentioned twist, the Irish government and almost all companies are talking about a policy as if it’s written into law. But that’s not the case.  They talk about the new normal, but they haven’t decided how that will look yet.  Instead, they want the work force to return to offices and then after some time, public and private employees will legislate and create policies that may or may not enable / permit officially have sanctioned remote working.  There’s a very clear example of this misinformation from recent news reports in January.  This article from the Journal  and this article from the Irish times talk about law as if it was already in legislation that would enforce the right to switch off.  But it also spoke about the right to ask to work remotely.  An Irish Blogger called HeadRambles wrote about the right to ask for this a few days ago. He makes a good point.  We have always had the right to ask.  Just as the employer always and continues to have the right to say no.  But my understanding of this is that the right to ask still isn’t actually law.
  2. From what I gather, because it’s not very clearly written anywhere, the Irish government have issued two statements concurrently that both appear valid.  They want us all to work from home where possible but also prepare for a return to offices in July.  But how can people who are very likely not vaccinated return to offices in July? Also, on the Citizens Information site, it’s said that RAD (Rapid Antigen Testing) policies along with an opt out policy is required first.  Do you know of any employer that has such a policy?  I certainly don’t and I don’t hear any talk of it either.
  3. There’s also the problem of social distancing.   Some employers were hoping that some magic would happen that would reduce the requirement for social distancing from 2 metres to 1 metre.  This hasn’t changed in 15 months so why they anticipate it was going to change now, I have no idea.  Let me assure you, on ever site I checked Here, here, here and here the requirement for 2 metres social distancing is crystal clear.  So, given that desks are usually spaced so that there is not 2 metres distance between people, this is undoubtedly going to result in a reduction of usable desks. 
  4. There’s a lot of work required to implement proper social distancing guidelines in offices.  So much needs to be considered!  This article is very comprehensive but I’ll provide a quick summary:
    1.  Flow of foot traffic, 2. Touch surfaces such as door handles, 3.  Potentially high use areas that could become congested such as printers, 4.  Routes between desks that could lead to dead ends, 5.  One-way systems to discourage passing in confined spaces and finally 6.  2 metres or 6 feet distance between each desk

So, if you were to believe everything that you’re told, here’s the summary:

  •  Prepare to go back to the office in July
  • If you’re not vaccinated, it’s likely you won’t be going back
  • There’s an international climate crisis but it’s risky to use public transport.  Still, drive if you can and keep the windows open if you’re with someone else.   Imagine that going down the M1? 
  • There’s going to be a new normal with hybrid / blended working, new rights to ask questions that you could ask already and a safer more equitable society overall. But that hasn’t bee legislated for yet.  But just go back to work anyway.  They will get around to that eventually.  No seriously! They promised! 
  • Stay home, stay safe, don’t socialize, don’t travel, be responsible.  Until 80% of the entire population is fully vaccinated (remember this includes young children) we are all still at risk and a fourth wave is very possible.  But hey, come back to work. Sitting in an office with air conditioning all day is going to be absolutely fine.

I have one little foot note to add to this rant. No. I actually have two.

Firstly, I have been very conscious of something amazing that has happened in Ireland.  Drogheda, my hometown is heaving! People are out enjoying coffee shops, restaurants and pubs as if it was the boom all over again. People are stopping to talk on the streets and there’s a general giddiness on the streets.  Drogheda is a commuter town. But these commuters have more time than ever before to live, work and play in Drogheda. That first word live?  That’s an important one.  They aren’t just passing through each day to sleep while they spend most of their productive hours in Dublin. There’s a buzz and an energy in my town that I have never encountered before.  In stark contrast, I have recently travelled to a few other towns that would have relied much more heavily on tourism and commuters.  These are dead.  Soleless husks with depressed locals and decimated businesses.  I’m delighted for Drogheda, but I fear for the financial stability and the mental wellbeing of those areas.  They will bounce back.  Because they are jewels in Ireland’s crown. But if the right policies and laws aren’t implemented before this new normal appears, that new normal, I fear will favour the people at the top with money. Drogheda and commuter towns like it will ease back into being an empty town with empty streets and tired residents burned out by constant commuting.

My other footnote is an opinion that’s less commonly held. I need to bullet point this though for clarity:

  •  I will get vaccinated.  But only now that I know that the vaccinations seem to be effective against variants.
  • I wear a mask.  Not for myself.  But for others. 
  • I never believe the media and only sometimes believe the government.  The medical professionals are the source of information that I prefer.
  • I do not believe everything I read from anyone in relation to Covid-19. I have a healthy mistrust of the entire situation.  Do I believe it’s dangerous?  Yes.  Do I believe it has killed people? Yes.  But I also believe that there’s a massive amount of money changing hands. And where there’s money, there’s greed.   And where there’s greed, there’s corruption. There’s now talks about winter vaccination boosters. This is concerning me.  Not enough yet to make a decision. But it concerns me enough to want to do more research. Because at the end of the day, it’s private companies who are getting this money from states all over the world.  That just seems dodgy to me.
  • Do I believe the so called anti-vaccers? No.  I’m not about to go out and buy a tin foil hat.  But I appreciate the decentres.  The people who ask questions and who dig for the truth are the people I want to hear from.  I don’t believe that the media have done this enough.
  • But the most important thing I need to say is it doesn’t matter what I believe.  It only matters that I take a risk-based approach to this.  I don’t know exactly what is real and what isn’t. So, I take the approach that what the government say is true and as a result, I want to protect those in my circle of family and friends that may be vulnerable.  So, I wear the mask. I wash my hands very regularly. I don’t visit people that are particularly vulnerable unless I have been away from potential risks of infection for at least two weeks.  In my view, this is the most responsible action to take.

Comparason between Shure MV88+, MAudio Uber mic and Neumann TLM 102 microphones

I haven’t edited these sound samples at all. I have also left each microphone flat. Without any EQ or editing. You can hear two computers in the background sometimes. I also haven’t done anything with the volumes. I could probably have nudged the desk a little higher. But to be honest, I just couldn’t be bothered re-recording that sample again.
Each sample has a test phrase spoken by me, then a quick line of a song sung by my daughter Méabh. I included her as it is a contrasting voice and it shows the clarity and brightness of some of the microphones.
I won’t say what microphone I think is better here. That’s open to your own determination.
What I can say is I was less than happy with the extra background noise in the Shure MV88+ but I love it’s well rounded sound. The Neuman TLM 102 is crystal clear. The MAudioUber mic blew me away though. Very little background noise, maybe it’s not as well rounded as the other two but very very crisp.

I don’t know if it needs to be said, but of course, all three microphones have their place. The Shure MV88+ is portable and is perfect for video recording or recording live music when out and about. The Neuman TLM 102 is a studio microphone that requires a cannon connection to a mixing desk. The MAudio Uber mic is a studio microphone perfect for podcasting. It has an advantage in that it doesn’t require a mixer. Still, the comparison was fun.

BoseS1 Pro – Can not update firmware

I have had a Bose S1 since they came out around 2018. I have used this in small gigs very regularly. But it has always just worked. So there was no need to ever update the Firmware. However, because it’s looking like gigs will be out doors for the foreseeable future and the Sonos S1 Pro has a 6 hour battery, I decided that two speakers were better than one. Off I went to my local stockest and purchased another. However, I quickly found that it wasn’t possible to link them both using Bluetooth as the old speaker had never received a firmware update. Connecting the speaker to the computer was fruitless. No connection was detected. Connecting the new speaker worked so I knew that there was obvilusly something wrong with the old speaker. A quick search online showed me that there were indeed defects in the 2018 early models. The overwelming responses recommended that the speaker was sent back to Bose for repair.

I called Bose, explained the problem and they booked it in for a repair. First though, they tried to charge me 150 Euro because the speaker was three years old. I firmly told them that this wasn’t going to be acceptable as I had forum posts prooving that this was a known problem. After escalating my demand they finally agreed. That was just 3 weeks ago.

I sent the speaker away and was informed that it would be at least 6 to 8 weeks before I would get it back. But three weeks later, here it is. Working perfectly.

I love the Bose products. I have the S1 Pro, the L1, the QC30 and the QC 65’s. But now I can also say that I’m quite impressed by their support as well.

Of course, I just had to test the stereo sound in my home office earlier.

Shows the two Bose S1 Pro speakers on floor stands in front of a wall.

Uilleann pipes with a top class brass band.

Back in 2019 when the world was a little more normal, I was honored to be asked to perform with the multi-award-winning Drogheda Brass Band. So a few months ago when their musical directory John Carpender asked me to record some music with them, I jumped at the chance. Here it is. The Parting Glass. Arranged for uilleann pipipes and brass band.

Getting out in the air

The weather is finally starting to become a little more mild. The evenings are stretching out a little and the mornings are finally losing their bitterness.

I’ll tell you now that I’m not staying within 5km. But I’m using common sense. I’m traveling to areas where there aren’t many people and at times where it’s less likely to meet any kind of gathering.

There are a few reasons for this but they all boil down to a simple fact. I sit at a desk for way too many hours each day. Even before and during Christmas, we didn’t relax our precautions even when the rest of the country were settling in for a slightly more relaxed Christmas. But this has been taking a toll. Very simply, my head needs open spaces, air and sun. I have walked the dog for between 6 and 8km almost every day for the past seven months. But trapping along the same old streets in circuits that always lead back to the start of the route is just not providing enough stimulous.

So. Let me treat you to a few pictures taken over the past few weeks when we ventured a little outside the 5km corden.

Looking out to sea from the head at Clogher head.
It was still very mucky and clambering up to these heights was hard. But we really enjoyed it.
Yet another very mucky walk. This time across from Old Bridge. In Townly hall.

Create an encrypted backup from your NAS directly to a cloud based file store. Such as Google drive, Onedrive, Amazon S3 or Dropbox.

I have a lot of files. Not compared to some people. There’s only about 5tb actually. But they are almost all valuable. They have pictures of the children, family members, various guide dogs, holidays etc. I also have priceless audio recordings and videos that I really don’t want to lose. Of course, I back everything up to the NAS regularly and the NAS is in a RAID configuration so that if a disk fails, I can get the data back. I even have a few disks lying around with full backups that have been taken over the years. However, I wanted something a lot more reliable than this. I don’t consider myself to be a tin foil wearing member of the paranoid club but I don’t necessarily fully trust companies to keep my data safe and private either. So I have never backed up all of my treasured files to the cloud because I didn’t want them to be available to someone in the event of a breach on that platform.

A friend was talking about RClone last week. He surprised me by saying that he could even mount the encrypted backups and browse through them to recover specific files. More interestingly, the files didn’t need to be archived before copying them off the local NAS. He was using it through NextCloud however so I assumed wrongly that it was either going to be difficult to set up or it wouldn’t do what I expected. I’m really glad that I’m wrong here.

Getting it up and running is very easy. Install it, create a new mount for your cloud provider then create a second mount for the encryption.

You will then copy files to the encryption mount and it will in turn send the files over to your cloud provider.

If I was to write all the instructions out, I would be doing nothing more than replicating the work of people who know a lot more about RClone than I. So instead, please visit the following fantastic resources.

Google drive (rclone.org)

Tutorial for making an encrypted backup on cloud storage using rclone. · GitHub

Crypt (rclone.org)

If you are trying this out and you need a hand, give me a shout.

Maintaining personal security online. Passwords must go.

Like everyone, I have multiple accounts. Probably hundreds of accounts online. However, unlike everyone, online, I have a slightly higher than average level of exposure. Search for DigitalDarragh or Darragh Ó Héiligh and you will find that I’m involved in quite a few things. So my personal security or PerSec online must be at a higher than normal standard.

I use multi factor authentication for every online application I can. I also mix the types of multi factor that I use. I have some that use the Lastpass multi factor app, some that use Google and some that use Microsoft’s offering. I also have more than a few that use DUO and for the most crucial accounts, I have a third factor of security in the form of a physical key or token that I must have in my posession before I can log in.

The front line of defence of course is my passwords. I’m therefore using two password management applications. Both with the highest level of enterprise quality protection. My passwords are usually between 36 and 50 characters long.

I hear you cry out. That’s overkill! And yes. For some services, you’re absolutely right. It is. But I nearly got caught in the past. It made it very clear to me that the level of risk I hold is particularly high. If someone got access to one of my core accounts associated with my identity, they could possibly use that to gain access to other accounts through social engineering or even vulnerabilities that have yet to be exploited. My life is online. I rely on the Internet for more than most people. So locking up my online identity is as important as ensuring there’s a good lock on the doors and windows of a house.

But this is getting absolutely rediculous. I spent about half an hour every two months resetting passwords and updating those passwords on various applications that I have running on desktops, laptops, phones and tablets that I use almost every day. When password-less really becomes a viability for commonly used applications, I’ll be first in line.

Even with the risks I’ve just briefly written about, I feel frustrated and that my time is being wasted several times a day when I open an accounts package, or my Email and even though I was just using that device a moment ago, that application in it’s own sandbox must validate my identity using face ID. Yes. I’m reasonably confident with the lengths I’ve gone to with the aim of improving my personal security online. But how much more can we do? Microsoft, Google, Facebook, Twitter, Apple, Red Hat, IBM, all of these companies need to get serious about the next evolution in security. Perhaps it will be Fido3. This burden can’t be held by the end-user. I’m an unusual case. But I can see this kind of weight being placed on end-users in the next ten years if passwords remain the front line.