Thursday, 22 April 2010

Two thoughts on Deciding What to Do Next

It's easy to get stuck in between tasks, trying to determine what is the best thing to do next. This leads to an excess of planning and strategizing, and not enough doing. I had two anti-procrastination thoughts today about the Doing phase of the Getting Things Done methodology.


1. You don't get better at making decisions by thinking or planning, only by doing. It sounds counter-intuitive, but sometimes you can't tell what the best choice is in advance. Only when you choose something and actually do it, can you see the results and use them as feedback to make better choices later.


2. If you're stalled because you don't want to choose "wrong", think about this: if it's in your system as an action item, it's not wrong.  You've already processed the item and decided what it means for you, what the next action is, and put that action on your calendar or an action list.  So if you can't decide what to pick, pick anything at all, rather than continuing to stew.  Anything on your list will move some priority forward, and will provide feedback on what to choose next. Plus, once you're in motion, it's easier to stay in motion and pick the next action... and the next one after that.



Thursday, 8 April 2010

New GTD folder - @Watching

I've been using David Allen's Getting Things Done method (GTD) to organize my time for over a year now.  I have a fairly typical set of "@" folders in my Outlook mailbox, such as:


@Action - things to be done as soon as possible, but not on a specific day
@Reading <listname> - things to read when I have time (several of these, one for each mailing list I'm on)
@Someday - ideas for Someday/Maybe
@Waiting - things on hold while I'm waiting for a response from someone


I also have many folders with no "@" on them, which are my project support materials and reference. When I'm assigned a task, I create a folder for its correspondence. But I was having trouble with emails that didn't fall into any assigned task -- typically things that I've been copied on but have no immediate action. However, I want to keep a closer eye on them than burying them among my reference folders, because they may turn into an assignment quickly.


So I added the folder @Watching. I create a subfolder for each topic, and track the email traffic to these subfolders as it arrives. Now, by expanding @Watching, I see a list of topics I'm tracking. If nothing happens or the task is assigned to someone else, I can delete the folder and its contents easily. If the task is assigned to me, I can just drag it up out of @Watching so that it becomes a regular reference folder.


So far, I'm liking this refinement. But of course, I will keep evaluating it as I go.



Sunday, 4 April 2010

Interesting Daylight Saving Time Problem

I was teaching an Oracle Database Administration class last week and ran into an interesting problem involving the change to Daylight Saving Time  (you did know that it's Daylight Saving, not Daylight Savings, right?)


For this class, we usually install just the base version of Oracle Database 10gR2 (10.2.0.1.0), because we're on a private network behind a firewall and we don't cover how to upgrade and patch Oracle until the advanced class. And then we show Enterprise Manager Database Control.


Except that this week, it wouldn't come up. We got Java errors, and the home page said that the status of the database instance couldn't be determined. When we tried to start the DB Console service (this is on Windows), it said it was already running; but when we tried to shut it down, it said it wasn't running. Very weird.


In doing a web search for the Java messages (Google is my friend), time and again we were advised to check how our time zone was set. That seemed odd; you wouldn't think that would matter. But it does: the EM agent checks to see that its time zone is (a) valid, and (b) configured is the same as the server.


Enter Daylight Saving Time. In 2007, the US and Canada changed the start date of Daylight Savings Time to be in mid-March (March 11 that year) instead of the first Sunday in April as it had been. This required patching Oracle products with a new timezone file, so they could properly detect the change. (The document ID on My Oracle Support is 359145.1).  This year, we changed to DST on Sunday, March 14.


The class was held the week of March 29, and the unpatched 10.2.0.1 software still thought we should be on Standard Time until April 4. So the EM agent wouldn't start. Had we done the class a week later, or three weeks earlier, this wouldn't have been a problem; and in fact we have done this class many times since 2007 and never hit this issue because the timing wasn't JUST right.


So we did an unscheduled lab to download 10.2.0.4 patchset and apply it, and EM came right up.


Stuff like this underscores the importance of patching your databases, even in a training environment!


There's something to learn from a training perspective here too. We often think that if things go wrong, our students will lose faith in us and think we don't know what we're talking about. But in this case, I was able to model the proper response a DBA should take: stay calm, research the issue, test. I've had students comment in the past when things went wrong that seeing how to resolve such issues was an unexpected bonus of the class. This class felt the same, they enjoyed the "detour" and the problem solving.



Friday, 30 October 2009

Jonathan Lewis Seminar in Dallas

I got to hear Oracle performance guru Jonathan Lewis today in an all-day seminar in Dallas. "Writing Optimal SQL" was part 2 of a two-part series here in Dallas, sponsored by Dallas Oracle Users Group (DOUG).


Jonathan started out by reviewing some general principles, such as the importance of design and optimizing for the global situation (many queries) not just a single query. "Making me go fast might make you go slower," he said.


Performance comes from precision in selecting just the blocks and rows you need to select, and from the structure of the data (where it's located).


My favorite part of the seminar was his discussion on coding style for SQL, a topic that is often ignored in performance discussions. His view that "Computers are cheap; humans are expensive" is one that I've been preaching for years in my SQL and PL/SQL classes.  "You have two audiences," I tell my classes, "the compiler, and the poor person who comes after you to maintain your code.  Be kind.  Someday that person will be you." Jonathan's take is that you should write SQL as a close translation of the business purpose of the query, and only fiddle with it if performance isn't acceptable.


He also suggested: "Don't tune the SQL; tune the end users," meaning that if a requirement is unclear or the data creates unexpected results, go back to the person requesting the report and get clarification instead of burning a lot of time over-engineering the solution to fit every possible case.


This talk could easily have been titled, "Unintended Side-Effects of SQL" because Jonathan went through many scenarios in which results differed from what might have been expected, and why it turned out that way.


It was a great session.  Thanks to Speak-Tech  and to DOUG's Mary Elizabeth McNeely, president and programs chair, for bringing Jonathan Lewis to town.



Monday, 12 October 2009

Oracle 11gR2 Podcast by Tom Kyte

Tom Kyte recorded a podcast this month about the new features of Oracle Database 11gR2. The podcast, part of the Oracle Database podcasts series, can be accessed here:


http://www.oracle.com/database/podcasts.html


In it, he describes an exciting new feature: the ability to compile stored procedures, packages, etc. while users are online using the same schema! The feature, called Edition-based Redefinition, refers to the current objects as an "edition".  The developer creates a child edition based upon the current one, then does development against the child edition. When it comes time to switch over, new sessions can begin using the new edition, as existing sessions continue to use the old. An upgrade that used to take an hour of downtime for compilations can appear to users to take no time at all. It still takes an hour to compile, he said, but the users are not locked out of the system while it's happening.


He also talks about the ability to create a table, but defer to allocation of storage until the table is first used. This will make it much faster to install complex software applications that have many optional tables in them. Only the metadata in the data dictionary will be created during the install, and tables never used will therfore not take up space.


It's a short talk, about 10 minutes, but well worth listening to.



Monday, 27 April 2009

Controlling Controlfile Backups

Did you know that you can control the name of your controfile trace backups? I didn't, until Bob Morgan of Stonehill College in Easton, MA pointed out some additional syntax in the ALTER DATABASE command.


I already knew that you could control the filename and location when backing up the controlfile in binary, via:


ALTER DATABASE BACKUP CONTROLFILE TO '<pathame>';


And I knew that you could get a text copy of the commands necessary to rebuild the controlfiles, via:


ALTER DATABASE BACKUP CONTROLFILE TO TRACE;


The resulting text commands are placed in the user's trace file for the session. To find the proper trace file requires knowing the session number; it's in the filename.  (Though I usually cheat, and go to the directory pointed to by the user_dump_dest parameter, sort by modification time, and my session is near the top.)


What Bob pointed out was the variation:


ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '<filename>';


This still writes to the backup_dump_dest directory, but names the tracefile with your choice of filename instead of the default one that includes the session number.  Much easier to find.


Thanks, Bob!



Tuesday, 31 March 2009

Clips

Here are some clips of my published work, including both technical and non-technical subjects. These articles averaged 1200 words each.





















Five More Things to Unlearn About Oracle
(TechRepublic.com, 4/19/04)


Here’s an example using the sample data in the SCOTT schema. An employee record is deleted, and the change committed:


DELETE FROM emp WHERE empno = 7934;
COMMIT;


The row is missing from further SELECT statements, and even a ROLLBACK command cannot bring the row back. However, a Flashback Query can display the contents of the table as it was 10 minutes ago, when the deleted row still existed:


SELECT * FROM emp
AS OF TIMESTAMP (SYSTIMESTAMP – INTERVAL '10' MINUTE)
WHERE empno = 7934;


This SELECT statement can be used as the subquery of an INSERT statement to reload the deleted data. Be aware, however, that INSERT will be subject to any constraints on the table, and that any INSERT triggers on the table will be executed.


Full article





Oracle Collaboration Suite Database Middleware
(TechRepublic.com, 2/13/03)


Oracle Corporation is hoping that the third time will be the charm for its latest try at an office communications platform with the Oracle Collaboration Suite (OCS). Two earlier products - Oracle InterOffice and Oracle Office Server - weren’t widely adopted. This time, however, both the underlying Oracle database and the Application Server middleware are more mature, and its main competitor's customers are facing expensive version upgrades.

Sara Radicati, president and CEO of The Radicati Group, spoke to press and analysts at the November 2002 OracleWorld Conference in San Francisco. She identified three key pressures that IT departments are feeling right now...


Full article





The Benefits from Using Wireless in Database Administration
(TechRepublic.com, 1/28/03)


It's 2:30 P.M. and you're working on-site for one of your customers. Your pager bleats out an urgent call from a second client across town whose server is down. You can try to help the second client on the phone—a slow, tedious process that may create political issues with the current customer. Or you can leave the one client to drive to the other. Either way, the second client’s server is down, and the clock is ticking.


The rapid expansion of wireless Internet access is making this scenario easier to handle. Now you can take out your Palm or Pocket PC and quickly correct the issue regardless of your location. You've become the wireless database administrator.


Full article





Microsoft's IT Lifecycle Frameworks
(TechRepublic.com, 10/24/01)


IT consultants at large firms use a company-defined project methodology to ensure that each project covers all the right steps. The methodology specifies actual forms and reports to be used at various stages of the project and specific rules for how the project will be conducted.


But what if you’re an independent or work for a smaller firm? You could imitate the larger firms and develop your own project methodology at great expense. But why reinvent the wheel?


For the past six years, Microsoft has been developing and refining its own set of project management tools. Originally developed within Microsoft Consulting Services (MCS), the IT Lifecycle Frameworks are available for free on Microsoft’s Web site.


Full article





No pain, no gain: Seeing opportunity as a free agent
(TechRepublic.com, 9/19/01)


A salesperson I know starts each conversation about a client by asking: “Where is their 'pain'?” He knows that unless they are motivated to change, he is unlikely to make a sale.


The same holds true for you as a free-agent consultant; unless your client sees a need to change something, they won’t hire you. Therefore, understanding what motivates people to change is the key to spotting opportunities.


An opportunity is a problem you can help with—at a profit. Learning to see opportunity means looking for all three parts of that definition...


Full article