May 7

I have been wanting to make a task that would force a notify rule to be enabled on a helpdesk incident. I wrote a set of queries and found what I needed to update. Once I created the taskI stumbled across an issue. It has to do with Altiris HD solution processing the a sql statement before I even run the task.

My task looks a bit like this. It sets the workitem to have a rule ‘293’ enabled on it.

Set: HDQUERY[[select workitem_number from dbo.workitem_wuci_join where workitem_wuci_join.wuci_id = '293' and workitem_wuci_join.workitem_number = WORKITEM(workitem_number)]]

The above is just filler really. The code that matters is below. Since Altiris doesn’t provide a way to just update/insert a sql value you hide the sql statement in an HDQUERY macro.

To: HDQUERY[[select NULL insert into dbo.workitem_wuci_join (workitem_number, wuci_id) values (WORKITEM(workitem_number), 293)]]

However each time the rule is displayed it actually updates the database. I think Altiris is processing the to: to get a value which is running the insert.

I also found that the select NULL was needed to supress errors when running the rule. When running this rule I found that it adds a duplicate entry for the 293 rule. This breaks the incident. To fix this use a sql delete in the workitem_wuci_join table of the altiris_incidents database.

delete * where workitem_number = '' and wuci_id = '293'

This will delete all rows (likely only 2) with the rule id and the incident number. Then you can simply edit the incident in helpdesk console and add the proper notify rules.

May 6

My line of work seems to drag me in many directions at once. One of the biggest challenges I face daily is staying on task. People seem to be one of my main distractions followed by computer distractions such as web browsing, email, and IM. I love answering people’s questions via IM and Email but sometimes I have to close the clients. At home this is fine, but in the office I need to remain reachable, so the clients cannot be closed. In order to stay focused I seem to always rely on music I like.

I’ve been lucky so far that my companies have always allowed me to listen to music I enjoy. I’ve also been lucky to have ended up with nice speakers at the companies within a few months. Keeping the volume at a level that does not disturb others and trying to make sure that there are no questionable lyrics has ensured I stay under the radar. For the past few years I have also been making use of closed ear headphones.

Headphones seem to really be a great way to block out the office noise and replace it with some of my own. This works great for creating a work environment that is quite productive and allows me to stay in the zone for hours on end. Staying focused on what I am doing becomes a breeze and my mind doesn’t seem to wander around everything that is happening.

I listen to mostly electronic music. This broad genre contains many different styles with various tempos. This makes it extremely easy to have music playing that fits the task. If I’m on a roll and knocking things out I can listen to some fast paced beats. If I’m moving slow and working on someting delicate I can listen to some slow paced chillout or triphop music.

I’ve recently purchased some new Ultrasone HFI-780 closed headphones. These sound great so far. Next time you find yourself not being able focus, try some music. If you already listen to music to stay focused, I’m always looking for new music.