64-bit, virturalization, and their impact

VMWare recently released a freeware called VMWare Player that can play a pre-built virtual machine file. A virtual machine is an OS bundled with whatever the virtual machine creator put there. This is perfect for people to test-drive various operating systems and software, without going through the hassle of installing themselves. VMWare currently provides virtual machines preloaded with RedHat, Novell Suse, ubuntu, Oracle, MySql, and Bea, among others.

Memory used to be a bottleneck for virtualization software to take off. However, on the hardware side of things, both Intel and AMD are pushing 64-bit processors pretty aggressively now. With 64-bit architecture, the memory space the operating system can access increases exponentially (from 2^32 to 2^64). With the push towards 64-bit and the emergence of virtualization technology, I wonder what kind of impact this will have on the software landscape, like operating systems, database software, web server, and application server, etc..

Linux, MySql, Apache and other open source software have made great headway in enterprise server market, especially for large financial firms. I do believe there are still a big learning curve and intimidating factor at play for mid-size to smaller firms when it comes to learning and evaluating alternative software products like Linux. Maybe the combination of 64-bit and virtualization software will help. Using the cliche popularized by the book The World Is Flat, 64-bit and virtualization will help bring down barrier of entry and flatten the competitive landscape. With more memory and more powerful processor, virtualization software helps people test things out that they may not able to or too difficult for them to try otherwise. And that will be a good thing.

The current market leader in this arena seems to be VMWare, since it works on both Windows and Linux platforms. Microsoft’s Virtual PC and Virtual Server only works on Windows, and my limited testing in installing Fedora Core 2 on Virtual PC didn’t work out very well.

Software vendors, jump on the wagon. Oracle, MySql, IBM, Bea have created and provided virtual machine files for downloading at VMWare’s Virtual Machine Center. I think that is a smart move. Even Microsoft has something to gain in doing so. For example, it can team up with VMWare and distribute Sql Server 2005 for a wider testing via their distributing channels.

I have personally tried ubuntu Linux distro on my laptop and it worked pretty well. My laptop is Acer Aspire 3500 with Celeron processor and 512M of memory.

Generate Oracle objects DDL using dbms_metadata.get_ddl

Since Oracle 9i, Oracle added a new utility called dbms_metadata.get_ddl. This utility provides you with object DDL generated out of Oracle Data Dictionary. It is extremely handy and useful.

For example, you can use:

set long 500000
select dbms_metadata.get_ddl(‘TABLESPACE’,’TablespaceName’) from dual;

to get a particular tablespace’s DDL. You can also use it for users, role, and other objects.

To get a table’s DDL, use:

set long 500000
select dbms_metadata.get_ddl(‘TABLE’,’TableName’,’SchemaName’) from dual;

Thanks to a fellow DBA for this great tip. You know who you are:)

Customize Oracle sqlplus editor

In Oracle sqlplus, if you type ed or edit at the command prompt, sqlplus will put the last command into an editor buffer for easy editing. In Windows, the default editor is Notepad. In Unix / Linux, the default editor is usually vi. I have changed the default sqlplus editor on my Windows machine to vi. In an earlier post, I explained how to change Microsoft SQL Server 2005 sqlcmd default editor.

I am taking Oracle 10g training this week. The lab is based on Red Hat Linux. I was surprised to learn that the default editor is not setup for sqlplus. When I typed ed, sqlplus would hang.

Here is what I did to fix it:
1. Create a file called login.sql and put it under your home directory
2. Put this line into login.sql file

I also tried creating glogin.sql, as some web site suggested. But for some reason, it didn’t work for me on this Linux machine. I am pretty sure that’s what I did on Windows to make it work.

Update: It appears that if you start sqlplus from a directory other than your home, ed will fail. No big deal but still a bummer. Anybody can enlighten me?

Update1: $ORACLE_HOME/sqlplus/admin is the folder to put glogin.sql on Unix / Linux / Solaris systems. On Windows, the folder to put glogin.sql is c:\oracle\product\10.2.0\DbName\sqlplus\admin. Replace 10.2.0 with your version number. Replace DbName with your database name.

Another thing worth knowing is to set the sql prompt in SqlPlus. You can put this into glogin.sql:
set sqlprompt _user”@”_connect_identifier>