Author Archives: alesk

PowerShell columns by Jeffery Hicks

As a long time subscriber on MCP Magazine I also get regular weekly newsletter from them. What I really like to read lately are columns by Jeffery Hicks, introducing the real power of PowerShell with short and simple examples, hence serving me well to learn some basics.

Some direct links to columns by Jeffery Hicks about PowerShell:

How to extend VMWare volume

I have a couple of VMWare guest machines (Windows XP & Windows 2003) with inappropriate sized disks. Instead of adding new disks I want to resize the existing ones. Quick search on Google revealed that this is quite easy to do. According to instructions found in Expanding a virtual disk and Increase your Virtual machine’s disk capacity the way to do it is:

1) Backup VM directory in case something goes wrong

2) After clean shutdown of VM resize the vmdisk with command line tool vmware-vdiskmanager.exe

cmd> "D:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager.exe" -x 16Gb "D:\VM\WinXP\WinXPd2.vmdk"

3) In step 2 we extended “physical” disk for VM, now we have to expand disk at VM OS partition level as well. In Windows XP/2003 we can use diskpart command line tool for that (see second referenced document from above).
Start VM (Windows XP/2003), logon as someone with Adminisatrator rights and extend partition:

cmd> diskpart
diskpart> list volume
diskpart> select volume=n
diskpart> extend

In case you want to extend system disk then you’ll have to mount that disk with another VM and then extend the partition with diskpart.

6000 products…and counting…

I just read this report from Collaborate ’08. It’s just unbelievable and scary at the same time to think about 6000+ products in Oracle portfolio. Perhaps it’s just me, but from the viewpoint of the current Oracle customer I see a road ahead with lots of fusion and confusion – from both sides, Oracle and their (existing|potential) customers.
I wonder how big this red balloon will get, before it explodes. (To me, it’s a question of “when”, not “if” this will happen!)

RMAN format element %t in backup piece name

From time to time I receive log files from one Oracle customer that is using Windows robocopy tool for backing up RMAN backup set files to their backup server. Robocopy report constains lines such as:

...
New File  186.0 m    \\oraprod1\BACKUP$\RMAN01\PROD_647989204_520_1.BAK
New File      3.0 g     \\oraprod1\BACKUP$\RMAN01\PROD_651902404_608_1.BAK
...

Since I don’t see file timestamps in the report, the only timestamp that is available to me is the one that is the result of RMAN format parameter %t in the backup piece name, such as 647989204 or 651902404 from example above. What is the meaning of %t? According to Oracle documentation the parameter %t means:

Quote:
%t Specifies the backup set time stamp, which is a 4-byte value derived as the number of seconds elapsed since a fixed reference time. The combination of %s and %t can be used to form a unique name for the backup set.

They’re not mentioning what is actually a “fixed reference time” (known as an epoch), but it’s not hard to figure this out with a little help from python time module. Someone at Oracle has chosen an epoch that starts with 17.08.1987 00:00:00 (dd.mm.yyyy hh24:mi:ss) and here is my handy python script that takes integer (such as 651902404 from an example above) and print out human readable time stamp:

# 
# rman_t.py - Converting RMAN %t timestamp to human readable timestamp
# Example:
# cmd> python rman_t.py 651902404
#cmd>  Timestamp [RMAN %t] = Sun Apr 13 04:00:04 2008
#
import sys
import time
epoch = 556149600             # ctime(556149600) represents 17.8.1987 00:00:00
print "Timestamp [RMAN %t] = " + time.ctime(epoch + int(sys.argv[1]))
# End rman_t.py

Google Patent Search to the rescue

During the yesterday session at seminar, someone from the class “surprised” Mr. Craig Shallahamer with a question about a detail from the slide (on page 128, picture 2); “…how does Oracle recover “In-Memory Undo” blocks in case system crashes at T3″.
It’s one of those stressful moments for the intructor, when a good instructor if it’s not sure about the correct answer will admit that he/she doesn’t know it (or can’t recollect the info) and that he/she will investigate the subject further, rather than speculate on the subject. Of course, Mr. Shallahamer is a superb instructor with enough mileage that he gracefully admitted that he doesn’t know the answer (imho, I would say that he was at the moment of thinking about the answer focusing too much on the slide – after all, it was late afternoon and we all had our heads full of information). (Btw. if you’re not familiar with Oracle IMU, Mr. Shallahamer released a white paper recently on the subject – recommended!)
Thinking about unanswered question on my way back home, I came to the conclusion that Oracle most likely protects the in memory undo (IMU) with the same mechanism as undo stored in segments, with the redo logging. So, I believe the redo log keeps all the information needed to “redo” Undo-Information in memory, that can then serve for undoing changes after the crash. Simple answer for a “tricky” question. [Note added: My assumption was wrong and if you read an answer from Mr. Shallahamer that I posted in my comment, you’ll see why]. Well, but is my conclusion correct? I couldn’t find any useful Metalink note about IMU. Am I lost?
Here we come to the subject of this blog, why not ask Google Patent search engine that is specialized for the patents search and presentation to find the document related to patent# 6981004 (Oracle IMU). This is such a great tool if you’re interested in all those nifty details – Oracle can choose what information to include in Metalink documents and what to leave out. Guess what, they really don’t have a choice in a document that is a baseline for the patent :-). They must cover all the details to prevent others to copy-cat + “patch” the solution. On the con side, some of the patents (and yes, IMU is one such patent) are documented with so much details that documents are extremely heavy to digest. You have been warned, it’s your choice, after all!
(A side note: I’m still digesting the IMU patent pdf, so I can’t confirm (nor deny) my conclusion/speculation yet, it well might be that Oracle uses some other nifty trick to protect IMU in case of instance crash – perhaps some other patented algorithm…)