RSS

Problem Solved: Lync Reporting issues


Awhile back we had a pretty significant series of issues with our Lync implementation that took some time to resolve. Now that it is, I thought I’d write up something for one of them to help others that have run into the same problem so that it can be fixed up once and for all.

Note: these notes come from my own personal experience with a dash of a case we had open with MSFT at the time.

Lync, for those of you who aren’t familiar with it, is Microsoft’s corporate instant messenger suite – which brings voice, (both individual and conferencing), sharing, and IM into one package. If there was ever any program I’ve ever used that’s changed how I work, this is it.  Calls, conferences, desktop sharing, all from the same app.  Truly well done.

That’s on the front end.

On the backend, however, it gets a little more involved – and for those running the app, there’s a lot of reporting that will allow you to monitor things like call quality, what the system is doing, and if there is trouble in paradise, as it were, you can use this reporting to start narrowing down the issues you’re running into, and that will help you both troubleshoot and resolve them.

And that’s the part that was giving us trouble.

It’d work for a bit, then give us weird errors, and the folks trying to troubleshoot global call/connection issues were completely blocked. So they were frustrated, and we needed to figure out how to fix it – not just this once, but fix it period.

The problem:

Lync reporting, when we got to the Monitoring Dashboard report, would often render an error like this:

What you'll get if the stored procedures haven't been run

What you’ll get if the stored procedures haven’t been run

If you can’t read the image, there are two error messages:

“Report processing stopped because too many rows in summary tables are missing in the call detail recording (CDR) database.  To resolve this issue, run dbo.RtcGenerateSummaryTables on the LcsCDR database.”

“Report processing stopped because too many rows in summary tables are missing in the Quality of Experience (QoE) database.  To resolve this issue, run dbo.RtcGenerateSummaryTables on the QoEMetrics database.”

You can find that I’m not the only one that ran into this error by just using your favorite search engine – Google, Bing, DuckDuckGo, whatever. (the results are pretty similar)

Bottom line – the error is the same: Some level of activity that’s been happening on the server is not reflected in the troubleshooting reports you want – and the error message has both good and bad parts to it.

The good: As far as error messages go, this one is surprisingly clear. Basically do what it says, and, depending on how much it has to summarize, it takes a few minutes and sums up a bunch of information that is amazingly useful in the reports our Lync team needs.

The bad: It exposes names of objects that someone might not actually want to have exposed, though people who see this are often the people who need to, so it’s a bit of a two edged sword.  The other thing is that there’s nothing to give us any indication of how often what’s mentioned in the message needs to run. I figured (as did many of the others who’ve run into this) there was some process that called this set of stored procedures at some defined period, but from what I saw in my research and what I experienced myself, that was not happening for the folks who were running into this. On a hunch, while was on a call with MSFT on a related issue, I discovered that the stored procedure referenced in the above screenshot needs to be run at least daily.

Well that’s not hard…

So my suggestions below are based on the following assumptions:

That you’ve got SQL installed on your server with SQL Agent running – this was something that seemed to be the culprit in a lot of the issues in the links above.

We depend on SQL Agent to run our automation, so it was running but the process/job/scheduler to run the needed code wasn’t there at all.  The below instructions fix that.

So I created a SQL job, and scheduled it to run once daily. Since the stored procedures are in different databases, I just wrote the execution commands (below) fully qualified, so you could do the same.

I also created some output files on the jobs just to be sure I could monitor what the jobs were doing for the first little bit, and guess what?

It worked.

Problem solved.

So – if you’re experiencing the issues described above and don’t have a job scheduled on your Lync SQL Server, do this:

  1. Create a SQL job on the SQL server that has your QoEMetrics and LcsCDR databases on it.
  2. Give the job a name that makes sense and fits your job naming conventions..
    1. I named mine: Lync Reporting Monitoring Dashboard Summary Numbers
    2. Put something like the below in the description field so that once the braincells you’re now using to solve this problem have been overwritten, you’ll still have a clue as to why you did this:
      1. LYNC – Error appears in reporting when tables haven’t been populated frequently enough. This code was missing and it is confirmed that it needed to be run daily with MSFT. It is scheduled as such. Questions? Contact <you or your SQL operations team>
    3. Click on ‘steps’
    4. Click’new’
    5. Add one step – you’ll have to name it… I named mine: RTC Generate Summary Tables – because that’s what it does.
    6. I leave the database set to master and paste the following code in.

–this code should be run daily per MSFT

EXEC      QoEMetrics.dbo.RtcGenerateSummaryTables

GO

EXEC      LcsCDR.dbo.RtcGenerateSummaryTables

GO

  1. If you want an output file, find your log drive and paste this in there (editing the <drivepath> below as appropriate):
    1. <drivepath>\MSSQL\Log\LyncPopulateSummaryTables_$(ESCAPE_SQUOTE(JOBID))_$(ESCAPE_SQUOTE(STEPID))_$(ESCAPE_SQUOTE(STRTDT))_$(ESCAPE_SQUOTE(STRTTM)).txt (that’s a little snippet from some of the best code I’ve seen at http://ola.hallengren.com)
  2. I scheduled mine to run at some hour when I’m asleep – and it now takes about 12 seconds to run daily.  You may want to adjust the schedule as needed for your environment
  3. Do that, and you should be able to forget about that report, and your Lync team should be able to know that it’s there every day – whenever they need it.

Take care – and good luck.

Tom

 
Leave a comment

Posted by on September 15, 2014 in Uncategorized

 

Tags: , , , , , , ,

Communication, Snapshots, and Chickens (no, really)


I saw a little note the other day about “snapshots” – which reminded me of a situation we had at work awhile back.

It seems that one of the things that’s really helpful at work is being on the same page as your colleagues/coworkers.

And the way you do that is by communicating and understanding each other – and the fact that we often use different words to mean the same thing – or sometimes, we use the same words to mean different things, can present a problem.

Allow me to explain – and of course, I’ll do it with a very non-technical story…

A number of years ago, my mom was at a church social event where they had this icebreaker kind of activity, and one of the things they were supposed to do in this one was to form groups, and they were all handed cards with the name of a farm animal on it, and they had to make the sounds of these animals, and all of the like ‘animals’ were supposed to find each other, and gather together in groups.

Mom’s group was chickens.

Chickens are chickens, right?

Because chickens – or – roosters anyway, go cock-a-doodle-doo, right?

Well… If you grew up in America, roosters go cock-a-doodle-doo.

So there were a bunch of middle aged ladies, walking around this room, flapping their arms and sounding just like a barnyard. (okay, I just checked with her – they weren’t flapping their arms, but that image is too fun to let go… so with apologies to mom, I’ll let that burn in for a moment… J )

There were cows, horses, pigs – and chickens, well, roosters.

There were cock-a-doodle-doo roosters, and then there was this one gickerigeek rooster, and –

Waitaminute…

What the heck was a gickerigeek rooster?

Well, it turns out that if you’re a chicken (well, rooster) in Germany, you go ‘gickerigeek’.

You don’t go ‘cock-a-doodle-doo’.

And because of that, all of the animals who were looking for each other, found each other.

Except this one little forlorn German chicken (well, rooster), running around the room, flapping her arms (okay, not really), making the most plaintive ‘gickerigeek’ you’ve ever heard.  Come to think of it, it’s likely the only ‘gickerigeek’ you’ve ever heard.  But the thing was, as accurate as this sound was in describing a rooster’s sound, it was a sound that no one recognized.

Eventually this got someone’s attention – and suddenly there was this entire barnyard full of little old ladies interrogating a very accurate, very fun loving, and yet, very stubborn little old lady (my mom).

They asked her what was up with this whole gickerigeek thing, and the truth came out.  It became clear to them that there are different words to mean the same thing, it just depends on where you come from, and from there on out, they knew that the sound that a rooster made in the morning was heard as ‘gickerigeek’ by some, and as ‘cock-a-doodle-doo’ by others.

I ran into something like this at work the other day, where the same word was being used to mean two radically different things.  There was this rather heavy duty discussion about snapshot backups and databases – and my take was that they were absolutely not a valid backup solution… I’m thinking of it from a SQL perspective.

The fellow I was talking to was the guy who runs our SAN – and he was thinking of the word ‘snapshot’ from a totally different perspective, that of the SAN itself. Used that way, the way he was doing it, it was indeed a valid backup solution.  Not what I would have liked, but valid nonetheless.

Problem was, we were both hearing the same sound, but those working on the hardware end of things were essentially talking English, and thinking ‘cock-a-doodle-doo, while I, working in SQL, was hearing it in German, thinking that sound only meant ‘gickerigeek’.

Interestingly, it turns out that we were both right, but it took the digital equivalent of me running around the room, flapping my arms going ‘gickerigeek’ for quite some time before we were able to clear it up.

The end result was that everyone learned why, when we were doing our hourly full snapshot backups through the SAN, and while everything else looked right, the transaction log kept getting full.  The thought was that the log file shouldn’t grow, but it did, to the point of filling up a good percentage of the drive.  Some config changes, a lot of learning and understanding, and we were ready to go, problem solved.

Moral of the story? Well, just like the rooster my mom was hearing, it was so important to discover and understand that the “rooster” we were hearing really didn’t sound the same to everyone.  All the technical smarts in the world won’t solve your problems if you can’t get on the same page, and eventually we did. It was good to have it cleared up, and it saved us hundreds of gigs of drive space as a result.

H/T to David Klee (T|B) for the spark to write this, which included a link to the technical explanation in more detail.

 
2 Comments

Posted by on January 9, 2014 in Uncategorized

 

Tags: , ,

Error 42d, SQL, and which kind of “Software”?


The other day we had a clustered server freak out on us.  On a four node cluster, one instance appeared to be randomly failing over constantly, never staying in one spot long enough to really do anything.  It was maddening, it was frustrating, and it was really hard to even catch up to it before it moved to another node. It also housed the database for a fairly important application.

Eventually I got the instance locked down long enough to get it to just sit still, and was able to look at the logs.

The weird thing was, while I was intently looking at the logs, I also found my mind wandering off in directions that I wouldn’t have expected – at least at that time in the morning, and with the pressure on so much – I mean, the server was just plain down and wouldn’t start.  Something was really weird, there was more than a little urgency to get things fixed, and yet my mind was wandering into places it just shouldn’t have been going right then.

Okay, Focus…

Let’s see what happen – and there again… I’m looking at problems software is causing, and ironically, it was – oh, how to put this delicately – another kind of ‘software’ that had my mind wandering.

And then I saw it – and I saw what my subconscious mind was trying to tell me… That the strange error I was seeing was a 42d.

Hmm… SQL would start, appear to run, I’d see a few lines in the errorlog – then boom, it’d failover, the one constant was that whole distracting 42d thing…

Hmm… I did some checking, and found that 42d is the hex equivalent of a logon failure.

What, so SQL can’t log on to the network itself?

No, wait, the Service Account can’t log on.

That’s a network account – and on a hunch I checked to see if for some reason that account was locked out – and sure enough, it was.

My colleagues over in AD land unlocked the account, I fired up SQL, and all was happy.

So…

Obviously, your mileage may vary, you might be facing a totally different issue, but if you find yourself thinking about software that has nothing to do with computers, or a double barreled slingshot about the time you’re trying to troubleshoot a server down, take a look at the SQL errorlog and check with your friends over in AD (that would be ‘Active Directory’) land  to see if that service account is locked out.

If it is, either unlock it or have your AD people unlock it, and you should be all set.

So remember, 42d can apply to two different types of software… It’ll be up to you to know which one to use where.

 
2 Comments

Posted by on March 20, 2013 in Uncategorized

 

Tags: , , , , , ,

Big Data, Tank Engines, and Digital Junk Drawers


The other day I had to do a backup of my computer – we’d had a power spike that took out the surge protectors, my backup drive, my son’s power supply, and his main hard drive.  In 20 years, we’d never had power go out, so this was a first, and had us wanting to make sure we didn’t have to go through that again.

It was a “not fun” few days of buying new hardware, rebuilding one machine, buying UPS’s – and fixing the backup drive, but we did it, and as is often the case with these things – it got me thinking.  My computer is like a digital attic – stuff gets stored there and sometimes referenced, but honestly, often forgotten.

I thought a little more about that – and remember in one place we lived as I was growing up – there was a garage full of stuff…

I remember thinking of it as a garage full of treasures.  An old army barracks my dad owned for a while came chock full of old radios, tools, black electric fans with wire cages, a huge pile of boards that had made up the side of a couple of Northern Pacific Railways boxcars that had last carried a load of 40,000 pounds of bananas in 1929 (a little piece of paper to that effect was still tacked to one of the boards when we found it).  That ended up being two walls of my room when I was growing up,

My grampa, on the other hand, had not just a garage full, but an entire barn full of treasures – one of which was an olive drab, unused, hunk of metal, that when you looked more closely at it and did some research, was a flathead V-8 engine made by Cadillac for small tanks in World War II. (like this one).  I’m sure it was plentiful in its time – but today? It was rare, but rare doesn’t necessarily mean valuable, and being in a barn, you had to go through a lot of crap to find the treasures.  And the thing was – he’d collected so much stuff – treasures in their own time – that some of it, while still functional and serviceable, had gone completely out of date and become obsolete while it was being stored in that barn waiting to be used again.

For years after Grampa passed on, my uncle tried to get rid of that tank engine – and people kept saying how valuable it must be, but no one would take it.   Finally, he said to one interested looking fellow,

“How much will you give me for it?”

“Well, um, I don’t know….”

“$50.00?”

“What? It’s got to be worth more than that.”

“Okay, but will you pay me $50.00 for it?”

And the guy tried to back out a bit.

“A dollar? Would you pay a dollar for it?”

And of course, the fellow wouldn’t – so this extremely rare Cadillac Tank Engine wasn’t worth a dollar, because really, something is only worth as much as someone will pay for it, right?

Some time later, I remember my dad and I looking at a cluttered attic with totally different eyes.  Again, I saw treasures, relics of a bygone era, while he was sizing up how long it would take to clean the place out.  He pondered a bit, took a deep breath, and reminisced a little bit, remembering that as a kid, he’d visited an old man who had an attic like this, full of “treasures” – and the old man said to dad, “Son, it’s just stuff…”

All I saw was treasures, at the time, but he was right.

It was just stuff.

Going back to my uncle for a moment – He and I had talked about kind of a lifecycle of “stuff” – where at first  you’re willing to trade something you consider valuable for it, and initially, this “stuff” gives to you… It could be something that saves you time, or makes you money, or brings you happiness or comfort, but it gives and you get something because you have it.

Eventually it just becomes part of your life, and it’s pretty much been there as long as you can remember, but at some point, it stops giving, and the balance shifts, ever so slightly, and this what has given you so much over its lifetime begins to take.  This goes for stuff and for things, and sometimes people and relationships in your life, and it’s a signal that it’s time to move on, or let go.  Eventually, the shift is more pronounced, and just the simple act of keeping “the stuff” starts costing more money, more time, more energy, than you get out of it.  But you’re used to having it, so you hold onto it.

And it costs more.

And I kept thinking…

In fact, I took a step back, mentally, and realized as I was sitting there configuring the UPS’s I’d bought for my computers, backing up tens of thousands of photos, and I realized that in some ways, the shift, like the photography I’d learned years ago, was making the transition from analog to digital, that my computer was full of ones and zeroes, and it was costing money to keep them.

As data professionals, we talk about how important it is to keep our data safe, and the fact is, it is important, but are we keeping too much? Just like I wondered sometimes whether it was really important for my grampa to be keeping some of the things in his barn, Is it important to keep every digital picture I ever took?  If I keep them, I have to manage them, I have to make sure they’re usable, right?

Here, let me throw a digital monkey wrench into the mix.  You’ve all got digital cameras out there now, right? How do you handle it when you have upgrades of image processing software?

The reason I ask is that a number of years ago, Microsoft made a product called ‘Picture It’ – which, for its time, was pretty good, but the problem is, none of the software that came afterwards would open the files created by this product.  So now, because I have upgraded the computer and the operating system and Picture It won’t run on the new one, I have hundreds of pictures with a .mix extension that I can’t open at all unless I find a copy of Picture it 5.0.

And, apparently, our old Windows 95 box. (it’s in the basement somewhere)

That would cost me time.

Hmmm…

A number of years ago I bought a family tree program and put a bunch of pictures in it – with all sorts of metadata in the pictures – where they were taken, and so on.  Understand these were slides and prints that had been scanned, there was no GPS data embedded in the images at all.  I couldn’t upgrade to the next version, and found that all the work I’d put into researching and getting information about the pictures that are part of my family tree – simple metadata about the pictures – was now useless – I couldn’t transfer it anywhere unless I bought the next version of the software.

Hmmm…

That would cost me money.

And now – it brought me full circle, as I was sitting there, computers hooked into the UPS systems, backup drive slowly being filled up by backed up ones and zeroes.

It had cost me both time and money.

It had me asking a lot of questions, like, “When is it important to let something go?”  As I was sitting there – looking around, I not only realized that I had thousands of images, some of which I hadn’t seen in years, that that needed to be backed up, but also realized that my computer had turned into a digital junk drawer.

I know I keep lots of email far longer than I need to.  I have piles of CD’s I’ve forgotten about.  Heck, I have piles of floppies even – and I don’t have a machine that has a floppy drive in it anymore…

Sigh.

How many of you out there could raise your hand to that one?

Dragging myself away from piles of floppies, CD’s, and the two Pentium boxes I finally got rid of the other day, I find myself thinking about the stuff we do at work.

We have stuff that we have to keep for legal reasons, which means boxes have to run in isolation on outdated software, but we have to keep them that way, we can’t upgrade them.  At least that way the data is readable, and accessible. There have been situations where people got rid of tapes of very important data only to discover that they had racks and racks of tapes they couldn’t read anymore.  We keep gathering data, we keep making more databases.  They keep growing.  I know poor database design makes some of the databases I administer and manage daily get bigger – the growth chart of one of them looks like the flight path of a homesick angel, and it is seriously causing us some trouble.

At the moment, that particular app is under discussion, but the thought of wanting to keep all the data we get, in case we need it someday (words I heard growing up many times) – is a little overwhelming.

But how do we know when that someday is?

I know digital storage, like real storage, initially, is cheap – but does it count the machines that need to handle the backups? The people to maintain them? The backups themselves? The offsite storage? How much will it cost us to manage what we had, at the expense of what we have?

I don’t have all the answers yet, in fact, I’m still struggling with a lot of it myself, but this whole concept of “Big data” – it makes me wonder when, eventually, someone’s going to have the arduous task cleaning out the digital attic…

 
4 Comments

Posted by on January 9, 2013 in Uncategorized

 

Tags: , ,

Coffee Grinders, Wisdom, and PASS


I’ve been at the SQL Pass Summit in Seattle this week, and I can honestly feel my head expanding from all the incredible information and knowledge being shoved in there by so many people who have worked so hard to put their presentations together, to share their experiences, their knowledge, and their mistakes.

And the other morning, as I was idly waiting for the hot water dripping through the coffee maker to become something useful, it got me thinking, about how often that has happened in my life, someone sharing hard earned wisdom that saved me from having to learn from my own mistakes.

I kept watching the coffee maker for a bit, then started to see the pieces come together.

See, not only is the PASS Summit in Seattle, I live in Seattle.  Coffee is more than just a ritual here, it is one of the basic food groups.  It is as necessary as, say, air, and that morning, I was about to clean out the coffee grinder when I heard my Oma (German for Grandma) stop me.

The thing is, she’s been gone from this earth, to live on in our memories, for over 30 years.  Why would she be stopping me? –

And then I remembered.

When I was little, she had a very similar coffee grinder (a Braun 220 volt one that you could wrap the cord around), and she ground the coffee the same way I do.  Fill the grinder about halfway with coffee beans, put the lid on, mash down on the button, wait until the rattle turns into a hiss, and you’re done.  Then – if it was her, she’d unplug the coffee grinder, then spoon out a measured amount of coffee into the coffee pot, if it’s me I just dump it into the filter I’ve put into the coffee maker.

But it’s what she said, in that southern German Swabian dialect I grew up hearing, as she unplugged it that stopped me.  “Also domme Leut’ däen d’r draht in d’r Steckdose bleiba lassa.” (roughly translated: „Dumb people leave it plugged in.”) – and I just took it to be a bit of gray haired wisdom that I didn’t quite understand until years later.

See, that wisdom was pretty simple: Don’t do stupid things.

In fact, it seems that her advice could have been used about 40 years later… See, it seems that a small coffee company here in Seattle had a coffee grinder made that really wasn’t too different from the one Oma had way back when.  It turns out that several people (some of them smart in some ways) managed to actually injure themselves by getting (or putting) their fingers into this little machine.  One that’s designed to take small things and make them into much smaller things.  Apparently the coffee grinders turned on while they were trying to clean them, and that advice about unplugging… a machine… that’s (let me repeat this) designed to take small objects and make them smaller… to keep it from turning on could have been quite useful. But my Oma wasn’t around to give that kind of advice, and as a result, the advice wasn’t heeded, and the company recalled over half a million of the things.

And that wouldn’t have happened if they’d been unplugged.

After I’d thought about Oma, (having unplugged the coffee grinder and put it away) I had another thought, this time about something that happened with Opa (German for Grampa) a few weeks later, having nothing at all to do with coffee.

See, growing up in Germany when I did, the towns and cities still had more than just a touch of a medieval feel to them, what with the cobblestone streets, and some towns still snug inside the walls that were designed to keep the inhabitants in, and any attackers out.  It had been this way for centuries. People were inside the walls, all the agriculture was on the outside, and one day, I went with Opa to one of the gardens that had been in the family for generations, where there were plum trees and potatoes, cabbage and cauliflower, beans and broccoli.

But to get to the garden, we had to walk through a long, narrow orchard, and the only thing Opa had to cut the grass that grew there among the trees with was a scythe, so it didn’t get cut often, and was about waist high on me.  I didn’t really care, and was having fun running through it when I noticed Opa was gone.  He was short but not that short, so I hunted a bit and found he’d crossed over the fence into the neighbor’s orchard, which, as I recall, had horses on it occasionally, and the grass there was much shorter as a result.  It really surprised me, as it was some work to get over the fence and he was over 80 years old at the time, so it was counterintuitive to even think of him going over the fence to walk down along the fence only to have to come back, and I was young and didn’t care about doing something as simple as walking efficiently (on the other side, where experience had told Opa that it was easier).  I just cared about doing it, even if it wasn’t efficient.  In fact, I asked him why he was over there, and he invited me to come over and join him, saying, in that Swabian dialect, “S’isch leichter zom laufa auf dära seite.”  (“It’s easier to walk on this side.”)

I didn’t go over there, being full of spit and vinegar (or the German equivalent) , as it were, and he didn’t push it and let me run like a young maniac through the tall grass on one side of the fence while he walked sedately over the short grass on the other side.

And it got me thinking…

Again.

There was something about that gray hair of theirs.

It symbolized wisdom.

Oma didn’t stick her fingers into the coffee grinder without unplugging it first.

That kept her from losing bits and pieces of her fingers in the grinder.

Opa did walk on the right side, where it was easier.

That was where he didn’t have to waste energy he needed for working in the garden on something as mundane as getting there.

So those were some pretty non-technical examples, but you can easily translate those into all the technical things you do, whether that’s making sure you don’t do the IT equivalent of sticking your fingers in a coffee grinder, or making sure you do the IT equivalent of taking the time to walk down the path on the other side of the fence.

While you’re here – take the opportunities you have and learn from those who have gone before, and who have done stupid things (and learned how to fix them) because you won’t live long enough to make all the stupid mistakes there are to make.

Take the opportunities, some of which you only have here at PASS.  Learn from those who have gone before, and who have done wise things, because you won’t live long enough to learn all the wise things yourself.

Look around you at the PASS Summit, both when you’re between sessions and especially at lunch.

See, most people here with some gray hair (figuratively or literally) didn’t get to be that way in this industry by being stupid.  Pay attention to the things they do. The things they do are often the result of hard won wisdom.

You’ve heard that wisdom (or, good judgment) comes from experience.

Of course, experience often comes from bad judgment.

So when you see a person who looks like they’ve been around awhile here at PASS, pay attention, not only to what they do, but also pay attention to the things they don’t do.

And don’t be afraid to ask them why.

You might learn something.

Oh, and if you’re still in the industry when you find that first little gray hair of your own sprouting, and you see a wide eyed up and coming DBA looking at you as if you’re the fount of all knowledge, shyly asking some advice on something, just to say they heard it from you, remember what it was like when you were thirsty for all that knowledge, and treat that request with  the respect and humility it deserves, because once that happens, it’s definitely time to give back to the community that helped make you who you are.

Take care –

Tom

 
7 Comments

Posted by on November 7, 2012 in Uncategorized

 

Tags: , , , , ,

Now WHERE did I put that backup?


Ever run into a situation where you’re in a hurry, working on a dev box, for a presentation, and you back up your database in an “easy” place, and then when it’s time to do the restore, can’t remember where you put it?

Yeah, me neither…

<this is your cue to chuckle a bit, because I think we’ve all done it a time or two>

In fact, it was Karen Lopez (twitter | blog) who got me looking for this script, and I thought I’d put it out there.  Nothing proprietary about it – it’s just a script to find a backup – but it can be useful when you’re trying to find out where in all the clutter of files you’ve got on boxes the one backup you actually need really is.

At any rate, some time ago I wrote this script that showed me where the last backup was of a database – run from within that database.

Take a look – let me know what you think.  If you can improve it, by all means, feel free to let me know that too.  Enjoy.

DECLARE @BACKUPNAME SYSNAME
SELECT @BackupName = (
SELECT     TOP (1) backupmediafamily.physical_device_name
FROM         msdb.dbo.backupmediaset AS backupmediaset_1
INNER JOIN        msdb.dbo.backupmediaset
ON                msdb.dbo.backupmediaset.media_set_id = backupmediaset_1.media_set_id
INNER JOIN        msdb.dbo.backupset
ON                msdb.dbo.backupmediaset.media_set_id = msdb.dbo.backupset.media_set_id
AND                backupmediaset_1.media_set_id = msdb.dbo.backupset.media_set_id
INNER JOIN      msdb.dbo.backupfile
INNER JOIN        msdb.dbo.backupfilegroup
ON                msdb.dbo.backupfile.backup_set_id = msdb.dbo.backupfilegroup.backup_set_id
ON                msdb.dbo.backupset.backup_set_id = msdb.dbo.backupfile.backup_set_id
AND             msdb.dbo.backupset.backup_set_id = msdb.dbo.backupfilegroup.backup_set_id
INNER JOIN        master.sys.sysdatabases
ON                backupset.database_name = master.sys.sysdatabases.name
INNER JOIN         msdb.dbo.backupmediafamily
ON                msdb.dbo.backupmediaset.media_set_id = msdb.dbo.backupmediafamily.media_set_id
AND             backupmediaset_1.media_set_id = msdb.dbo.backupmediafamily.media_set_id)
print        ‘backupname ‘
print        @backupname

 
Leave a comment

Posted by on May 7, 2012 in Uncategorized

 

Tags: , ,

Male Logic, Female Logic, how it all applies to Tech


It’s been said that part of being smart is knowing what you’re dumb at.  Part of being smart is letting other people know it – but – how do you say this…  There are several ways of solving problems.  I happen to know of several ways on this, and before anyone gets all PC on me on this next bit, hear me out.  There is nothing I admire more than someone who can think their way through a problem to a solution.  I love it if they can explain it – but if they get the answer, awesome.  Now a word used to describe problem solving like this logic.  Many years ago, Bill Cosby did a little schtick on Male Logic and Female Logic – and the way he said it, the male logic was very – well, ‘logical’.  If there was a 10 step process to go through, well, it took a guy 10 steps to go through it.

It went something like this:

Male logic

One… <click>

Two…<click>

Three…<click>

… all the way up to 10.

It was simple, elegant, and – to be honest, some might consider it a little boring…

Female logic

Now female logic, he said, was a lot different – and, as much as people want to think men and women are the same, we’re not – not by a long shot.  He pointed out that giving a female the very same 10 step process, she’d go at it like this:

One…<click>

Fourteen…<click>

10.

How the heck did that happen?

In fact, ladies out there – how do you do that?

See – that 14 is COMPLETELY outside our frame of reference, we don’t think about it – it’s not there.  We can ask you how or why it happens, but explaining to someone the concept of 14 when the numbers only go up to 10 is just baffling to us guys – and the way you relate things together that have you making connections and drawing conclusions that we might not see gives you a stunning edge in some incredible areas.

Call it intuition.  Call it what you will, but and it’s like women have a math coprocessor or something so they can shove a problem over there, let it get solved, and come back in a bit with an answer that even they don’t know how they got.

And often the guy’s on step 3, the gal’s at 10,

In fact, I gave the bulk of this blog post as part of a presentation once and got an astonishing piece of feedback from a woman who had “made it” in the industry.  It came to me sanitized, and I couldn’t tell you who it was if I wanted to, but what you read above was written by a guy, me.  What you’ll read below was written by a gal, is in her words, and she quite literally wished to remain anonymous.

When I ended up in the technology industry, I was usually the first female technical peer any of the guys had worked with, and the first technical female any of the (universally male) managers had tried to manage, and it gets ugly when you’re asked for status and all of the guys are all at steps 2-4 and you’re doing something … completely different.   It’s ugly then, and it’s uglier when, without being able to explain it or teach it … you get at least the same result, faster.  And as you gain confidence, much faster. I still remember being assigned to teach a pretty talented guy who have had all the right experience and skills, how to triage a network sniffer trace.  In my mind it starts with “you scroll quickly through the packets looking for something that’s not quite right” … and I knew the exercise was doomed when I looked at his notebook and he’d neatly written “Step 1.” I knew then I would never be able to explain the concept of not really reading, just relaxing with cup of coffee and scrolling through, knowing that your subconscious will throw up an alert if it sees something that’s “not quite right”. There’s your “skip to #14″ bit – I can write or use a parsing app for a network trace, but before I go the effort, I’ll just use my eyes.  Sit back with a cup of coffee and scroll through the trace, looking for patterns that “aren’t quite right”.  I’m not looking closely, I haven’t the slightest notion what I’m looking for, and when something strikes me as “not quite right” it can take me some time to figure out exactly why, but it’s often not the sort of thing I could have ever found using traditional analytics and parsing tools.

I was just thrilled to find this info.  It proved my point, not that men are better or women are better. But that they’re different, and that difference needs to be recognized, acknowledged, even if, as guys, we may not completely understand it.

In fact, please understand – this is not a jab at either gender.  There’s no way I’d say one is right or wrong, they’re just different.   And this whole “14” thing – women seeing/feeling/perceiving relationships intuitively where men might not see them in the same way, I think, honestly, that’s why, while IT is traditionally a male dominated field, that database administration (hint: relational databases…) seems to have a greater percentage of females in it.

So, is there more to the story? Yes, there is.

In a nutshell: just because a guy doesn’t understand the existence of 14 doesn’t mean her 14 isn’t valid.

And just because a gal can’t explain the 14 to a guy doesn’t mean he’s an idiot.

It takes a wise manager to see that the problem-solving skills that employees bring to the technical table, whether 1-2-3-4-5-6-7-8-9-10 or 1-14-10, can actually be quite complimentary.

 
7 Comments

Posted by on March 9, 2012 in Uncategorized

 

Tags: , , ,

 
Follow

Get every new post delivered to your Inbox.

Join 373 other followers