Inbox Zero – How often does it happen to you?

by Xavier Comments: 0

Well basically it happened to me today! Mainly because of Memorial Day, I had the chance to clean up my inbox. However this does not mean only reading or glancing one email after another or “Mark all as read:.

Do the following (some taken from the “Getting things done” book by David Allen, just a bit modified for my needs)

– If there is nothing you can do about it, simply mark as read and let it go. This is the most difficult one of all categories because it is hard to accept that there is nothing you can actually do about it. Accept it

– If you can do something but not now and it is not that importante, then [create a task in Jira (I have my own) or some other task tracking/Kanban/post it/whatever system you use] so that you can take care of it later. This is your “do it later, not important queue”.

– If it is important, you can complete it now and it is (relatively) quick then
doit

– If it is important but you can’t complete it now, then schedule it in your important queue. Use Kanban when possible. No more than 5 important tasks queued as then you will only be moving your mess from your inbox to your task list and this is not the idea. Scheduling is key, else you can just kick the bucket.

inbox zero

Remember never to procrastinate!

I recommend also reading the Productivity Manifesto by Nathan Barry too, which is very good however in some cases it is not possible to follow his advice. I can’t do blocks of 25 minutes of my time, else some people of my team could be blocked and waste minutes of their time. And no, I am not that important but in some cases dependencies arise and minutes count.

Finding out who is using my SQL Server 2008 database!

by Xavier Comments: 0

My last post was about taking databases offline, which if in use can be very problematic.

So before doing anything that can be interrupted if there is an open connection just run this:

CREATE TABLE #sp_who2 (SPID INT,Status VARCHAR(255),
Login VARCHAR(255),HostName VARCHAR(255),
BlkBy VARCHAR(255),DBName VARCHAR(255),
Command VARCHAR(255),CPUTime INT,
DiskIO INT,LastBatch VARCHAR(255),
ProgramName VARCHAR(255),SPID2 INT,
REQUESTID INT)
INSERT INTO #sp_who2 EXEC sp_who2
SELECT *
FROM #sp_who2
-- Add any filtering of the results here :
WHERE DBName <> 'master'
-- Add any sorting of the results here :
ORDER BY DBName ASC

DROP TABLE #sp_who2

Please note that sp_who2 is undocumented by Microsoft so it might change

Taking a database offline in SQL Server 2008 and avoid transition error message

by Xavier Comments: 0

Taking a database offline is a very simple task. Right click on it and select ‘Take offline’. However, if the database is being used at the moment the action will fail and your database may remain in limbo for a (sometimes long) while.

Msg 952, Level 16, State 1, Procedure sp_who, Line 79
Database ‘UATdb’ is in transition. Try the statement later.

Try this instead:
ALTER DATABASE UATdb SET OFFLINE WITH ROLLBACK IMMEDIATE