Monday, November 12, 2007

Oracle VM and VMware

Oracle is an innovator for sure. They also like to nail it where it hurts. They are surly adept at finding the most obscure yet promising niches of the market. This tim they sucked the breath out of VMware, the fourth-largest publicly held software maker in the world. VMware has a market value of about $34 billion. But now it would be real hard for VMware and EMC which holds the 84% shares of VMware to hang on to that leverage anymore.

Oracle VM was announced in the Oracle OpenWorld, and atonce the shares of Oracle rose, and the shares of VMware plummetted.

In computing, virtualization is a broad term that refers to the abstraction of computer resources. Uptill now VMware was the sole king of this market. Most of the DBAs are aware of this fabulous tool, as it allowed them to test Oracle products without going through the hassles of installing and configuring disparate platforms. Now Oracle has come itself in the market of virtualization, and claiming that its VM is three times efficient then of competitors.

You can download Oracle VM here.

Wednesday, September 5, 2007

Oracle 11g Introduction

Oracle Database is a relational database with object and Extensible Markup Language (XML) capabilities. In a relational database, all data is stored in two-dimensional tables that are composed of rows and columns. Oracle Database enables you to store data, update it, and efficiently retrieve it, with a high degree of performance, reliability, and scalability.

Oracle Database is composed of the following elements:

The Oracle software that you install on your host computer

The database, which is a collection of physical files on one or more disks

The database contains user data, metadata, and control structures. Metadata, or data about the data, is the collection of information about a disk that permits Oracle software to manage user data. An example of metadata is the data dictionary. Control structures (such as the control file and redo log) ensure the integrity, availability, and recoverability of user data.

The Oracle instance, which is composed of the following:

The background processes, which are the operating system processes or threads that perform the work of accessing, storing, monitoring, and recovering user data, metadata, and control files associated with the database

The shared memory areas used by the background processes

Server processes that perform work on behalf of connected users and applications, and the memory and temporary storage used by these processes

Server processes parse and execute SQL statements, and retrieve and return results to the user or application.

Oracle Net, which is a software layer that enables client applications and Oracle Database to communicate over a network, and the Oracle Net listener, which is a process that listens for connection requests from the network.

Notes From OTN

Oracle 11g Download Available

The first beta of Oracle 11g is can be downloaded here.

Tuesday, April 3, 2007

Validating Numeric Values in Textbox in Forms

This is one of those "non-Oracle" posts, I would be dropping here once in a while.

Suppose you have a HTML form and the form has a text box, in which you want user to only enter numeric value. In order to validate the numeric value you may use the javascript's isNan() function. isNan() function checks that if its argument is Not a Number, if it is not, then it returns true otherwise it returns true.

Lets have a running example to depict this concept.


function validateform(x)
{
if (isNaN(x.txtiprice.value))
{
alert('Kindly enter number in price.');
x.txtiprice.focus(); return false;
}
}



form id="frmCheckout" name="frmCheckout" onsubmit="return validateform(this);"

input id="txtiprice" maxlength="50" size="30" name="txtiprice"
inputname="btn" id="btn" value="Submit" type="submit"

/form





We have defined a funciton "validateform()" at the top and then have called it whenever the form "frmcheckout" will be submitted. In the validateform() function, the condion checks that if the value submitted in txtiprice text box is number or not and then return true or false.

Sunday, April 1, 2007

Where is my 10g DBA Course, Miss OU?

Oracle is a great company having a great product like Oracle Server. But Oracle University (OU) is on the other side of extreme, atleast in Pakistan. I dont know whether it has to do anything with the "Developing nation" tag upon Pakistan or its a sheer negligence, but I am sure the affairs of OU in Pakistan are in a ver abysmal state, to say the least.

I encountered OU in the summer of 2003, when I attended a Oracle 9i DBA track course there. It was royally pathetic and royally expensive. The teacher did'nt know the difference between the instance and database. It was run under the umbrella of some company called as Techno-ed. Nowadays, Ora Tech, is arranging the courses for OU.

The company has changed, but the state of affairs remains as dismal as before. I have been trying to attend Oracle 10g DBA track course for the last 6 months or so, but there is no reasonable and satisfactory response from Ora Tech or Oracle University. I have contacted myriad number of times to OU Islamabad, OU Karachi and Ora Tech Islamabad, and all show me the rosy picture that course will start very soon and they will send me the schedule promplty.

There is still no course in the offing. OU, Karachi has again, upon my inquiry, bestowed the information that course will *Surely* start in the mid of April. One could only hope. Does Oracle Corporation in US, monitors these "Developing" OUs or she just counts the money?

Thursday, March 29, 2007

Why On Earth This Happens?

A developer asked me to create a database link from one database to other. Database link is used to connect two databases in Oracle, so that you can share data. The user in one database (i.e prod) was ss1 and its password was ss1. The user in the other database (i.e. ias) was ss2 and its password was ss2. The prod is our production database and ias is the repository for application server. First I made an entry in tns file (a network configuration file for the connectivity to Oracle databases), and connected to ias db and the ss1 got connected to ss2. But when I created database link, things just got ugly and no connection was made.

I spared no option as far as I knew. I changed the net service name, I changed the host name, I changed the domain name, every thing. But Na Jee. After smashing my head every where, then I logged onto my local db and then created a db link and it worked!!!!!

It was a problem with tns file. The prod db was using the tns file of server and I was making changes to local tns. The funny thing is that SQL*Plus was working ok with local tns, but when it came to db link , it was using severs' tns.

So my dears , moral of the story is that always keep the servers configuration files like tnsnames and sqlnetora in mind, whenever connecting objects of database server to some other database servers or for any servers for that matter.

Wednesday, March 28, 2007

Oracle Server Architecture in Simple Words

In order to efficiently and intelligently manage an Oracle database, you have to have a sound knowledge of its underlying architectural details. This knowledge pays off because it is directly linked with DBA's job. The real job of DBA starts after the installation of database, when he embarks on to setting-up a database and then maintaining it. Naturally, the configuration and maintenance of database cannot be done by a DBA unless he doesn't know about the ins and outs of its architecture. The following section provides a short overview of Oracle architecture.

The Oracle Server can be divided into a physical and logical portion. The physical portion is Oracle database, which resides on disks and logical portion is Instance, which resides in memory. Instance is basically a mean to access the database.

Oracle Instance: In order to access the database Oracle Server initiates some background processes and allocates some shared memory. These background processes and shared memory structures made up of Oracle Instance. The properties of instance (i.e. the properties of background processes and memory structures) are present in the parameter file in the form of parameters having some values. Oracle Server needs these parameters to create an instance while in startup stage.

Shared Memory Structures: The shared memory structure of instance is called as Shared Global Area (SGA). Basically, it contains the most frequently data and code, along with some control information. SGA divides its work into subcomponents.

Database Buffer Cache: It is commonly called as 'Buffer Cache'. Buffer Cache stores the most recent and frequent data. Any data read from the database, first comes to buffer cache and from it, multiple user can access it.

Redo Log Buffer: It stores the changes, which are made to the data and is only used for recovery purposes.

Shared Pool: It is that part of SGA, which stores most frequent and recent SQL, PL/SQL code along with data dictionary information. The code part (SQL, PL/SQL) is stored library cache of shared pool and data about schema objects is stored in data dictionary cache of shared pool.

Large Pool: It is an optional area and used to facilitate large jobs.

Java Pool: It is also an optional area used to facilitate Java code.

Stream Pool: It is also an optional area, used in case of Oracle Streams.

Background Processes: The Background processes are used to facilitate the working of instance with respect to database. Background processes are responsible for the efficient interaction of memory structures of instance and database. Some background processes are always there and some are added up as you configure more features of database. Some common background processes are:

Database Writer: It takes data from buffer cache and writes it to data files.

Log Writer: It takes information from redo log buffer and writes it to online redo logs on disk.

Checkpoint: It ensures that at continuous intervals, all modified data from buffer cache is written to data files.

System Monitor: It performs crash recovery and some space management.

Process Monitor: It performs process recovery, in case of failure of user process.

Archiver: It makes offline copies of online redo logs and helps to recover from media failure.

Private Memory Area: Besides of SGA, there is a private memory structure called Program Global Area (PGA). It contains session information for a single server process. A server process is a foreground or shadow process which acts on behalf of one or more users. If a database is in dedicated mode, then for each user there would be a separate server process, and if a database is in shared mode, then there would be some server process which would be servicing all user processes between them.

Tuesday, March 27, 2007

Some Features of Oracle I Like More

Oracle stands out from the crowd of numerous other databases due to its sheer array of outstanding features, some of them are discussed below:

Concurrency:
Oracle allows simultaneous access to same data by multiple users without any locking issues. It is done through Oracle powerful transaction mechanism.

Read Consistency:
It means that while accessing the data, the reader of same data never block other reader and writer. The writers don't block the readers of same data. Only writer of same data block the other writers.

Portability:
Oracle has got the ability to operate on all major platforms. It can be transferred from one platform to other with little or no effort at all.

Self Managing Database:
To ease the burden of DBA and make him more productive, Oracle 10g has automated many things like space and memory management, undo management and backup/recovery etc.

High Availability:
Being an enterprise level database, Oracle understands the need of enterprise across the world regarding 24/07/365 availability. It tackles this issue with Real Application Cluster (RAC), RMAN, Data Guard, Oracle Flash Back, Redo Mechanism etc.

Unicode Support:
The rapidly shrinking world has introduced many new challenges. One of them is the support of multi-lingual support. In order to represent the multiple language, a global character set has been developed, which is Unicode. The latest release of Unicode is its version 4, in which it can support 1,226 new characters. Oracle's Unicode character sets, AL32UTF8 and AL16UTF16, have been updated to support Unicode 4.0 in Oracle Database 10g Release 2. The Globalization Development Kit (GDK) is also included in Oracle 10g with enhanced features.


Miscellaneous Features:
Moreover, Oracle throws its shadows on various areas. Its scope ranges from Data mining to Data Warehousing, from OLAP to BI, from Multimedia to Spatial, from mid-tier software to front end developer suites and much more.

Monday, March 26, 2007

First Confusion of a Beginner DBA

The first confusion a beginner DBA encounter is what exactly Oracle is? Is it the name of Company or is it the name of product? Is it the name of database or is it the name of database management system? In order to nullify these confusions, lets start with some definitions:

Database:
A database is an informational unit. It is used to store data for future use. Database enables to store and retrieve data in an efficient and flexible way.

Database management system:
It is software by which a database is used. DBMS enables the storage, manipulation and retrieval of data from the database.

Oracle Server:
Oracle Server is the flagship product of Oracle Corporation. Oracle Server is the DBMS for Oracle Database. The word Oracle is used to describe both Oracle Server and Oracle database. It depends on the context in which the term Oracle is being used.

Sunday, March 25, 2007

ORA-00600 and ORA-07445

ORA-00600 and ORA-07445 errors are the most esoteric erros in Oracle.

There is a tool called "ORA-600/ORA-7445 Troubleshooter" available at Metalink. It asks for the first argument of ORA-600 error with an optional database version number.

For example, to see the description of the error:

ORA-00600: internal error code, arguments: [723], [25908], [25908], [memory leak]

You enter 723 in the "ORA-600 First Argument" field. The first argument is a pointer to where in the code the error was caught and thus is the key information in identifying the problem.

You can also embed (copy/paste) the "Call Stack Trace" there, and, when you click on the "Search Call Stack" button an advanced MetaLink search is performed to find documents containing relevant sections from the call stack.

Call Stack extracts from the following files are supported:

Generic foreground and background server trace files located in background_dump_dest and user_dump_dest
OpenVMS NETV2 and BEQ log files located in ORA_ROOT:[NETWORK.LOG]
WINDOWS CORE.LOG files
GDB (debugger) backtrace call stacks (best endeavors)