Wednesday, April 20, 2011

Instance Caging

Many of you would already be aware of this one while I discover it now but still putting down my thoughts on this 11g new feature.
Most of the times, we end up running multiple instances on a single box for developmental effort. Or even on Production by buying a reasonably big box to save on licensing cost and also in the name of consolidation exercise :). But doing so, throws up the challenge for a DBA in terms of allocating resources to each instance. Some low priority activity on an instance eating up CPU resources and thus depriving the much needed resource to those requiring it. CPU allocation decisions such as this are made solely by the operating system; the user generally has no control over them.
Instance caging in 11gR2 is a method to cage or bound the instance to use a certain no of CPU’s instead hogging all the available CPU’s. All we have to do is set an initialization parameter to control the CPU resources an instance can use. It basically limits the no of CPU’s an instance can use e.g. I can set this parameter to “1” on a 4 CPU machine. It’s very simple (silly :)) to set it –

ALTER SYSTEM SET CPU_COUNT = 4; 

However, it works with resource manager feature so you will need to enable RM and create a resource plan first before running the above command.
Instance caging can be useful on larger box with multiple instances running – some development and a few production allowing CPU and resource allocation be done effectively. Apart from this, it can also be said that it’s Oracle’s way (alternate option) of giving CPU resource allocation control to a DBA rather than leveraging a logical/physical partitioning of a large box resorting to usage of tools/technologies such as VMware, AIX LPAR or Sun containers etc. In a nut shell, it’s the simple way to control the CPU consumption of each database instance.
Maybe sometime later, I will try to post an example. Thanks for reading and appreciate your comments / thoughts.

Wednesday, April 6, 2011

Oracle Restart - a 11g New Feature

Oracle Restart is a new feature introduced to enhance the availability of Oracle database. I wasn't aware of this till recently. It basically allows various components of Oracle to restart automatically in a stand-alone (non-clustered) installation. This functionality is similar to what Clusterware does in a RAC setup. On Windows and Linux, we were able to achieve all this via creating a service or writing a script. But now it’s not required. So in a way, it also makes the age old practice of writing scripts to restart redundant.

Oracle instances and its dependent components restart automatically after any hardware or software failures and machine reboots. The components that can be restarted are –
  • Database instance
  • Oracle Listener
  • ASM instance
  • ONS (Oracle notification service)
It continuously monitors all the Oracle services started via it and restarts any of the failing services. It ensures that the components are starts in proper order e.g. starting the ASM instance before starting the database instance. What’s important is that Oracle restart is integrated with tools like SQL*Plus, LSNRCTL, and ASMCMD; so when you shut down the database or listener with the respective utilities, Oracle Restart does not interpret it as a failure and hence does not attempt to restart.

Much like clusterware, Oracle Restart also comes with a server control utility (SRVCTL); you should start/stop the components with SRVCTL.

In my opinion, this is a pretty useful tool and option to have. Gets rid of any additional scripting that would have required in day-to-day operations. Also serves as an introduction to how to manage services in a RAC which is a good thing for junior DBA's. The only problem the tool still looks for “ORA_CRS_HOME”, which is a bit weird given that it is supposedly for single (non-RAC) instance databases.

Thursday, March 17, 2011

Oracle Database on Amazon RDS

Recently, Amazon and Oracle announced that they are going to make "Oracle 11g Database" available on Amazon AWS as a service. It's being brought into AWS's RDS feature which currently offers "MySQL database as a service".

Amazon RDS is a web service that allows you to set up, operate, and scale a relational database in the cloud. You can provision a relational database (currently only MySQL) on RDS in just a few minutes. Amazon RDS will also manage database administration tasks including continuous backups, software patching etc.
When launched (sometime in Q2 of 2011), you will have the option to choose from the licensing options for running the Oracle Database on Amazon RDS ->
  • Bring Your Own License – (BYOL): Customers with existing Oracle Database licenses can run Oracle Databases on Amazon RDS with no additional software licensing or support cost. Oracle will provide the technical support required in case BYOL DB instances. 
  • On-Demand Database Instances: This is a pay-by-the-hour licensing option with no up-front licensing fee or long-term commitment required. One simply pays by usage depending on the database edition and size of the instance. Brings it on par with other AWS offerings. Technical support for On-demand instances will be provided by AWS.
  • Reserved DB Instances: Make a commitment and pay a one-time fee to get a DB instance with a significant discount on the hourly usage charges. The commitment required would be 1 or 3 years. Technical support for On-demand instances will be provided by AWS.
 While you can still choose to install Oracle on an AWS EC2 instance but it had a few drawbacks –>
  • Licensing fee – Oracle is an expensive product and it acted as a deterrent to use Oracle on a cloud hosting platform such as Amazon.
  • High availability – currently setting up of Oracle RAC is not possible on AWS EC2 hence one cannot achieve high-availability
Given the above mentioned points it definitely was not possible for startups, SMB segments to consider Oracle as the database of their choice. So I believe making Oracle available on RDS is a very good move. However a few things to watch out for –
  • Upgrades – Can I choose to opt out of any future upgrades because I don’t want to be forced for an upgrade. E.g. they have similar option available for MySQL so will it be extended to Oracle as well?
  • High availability – Would I get RAC? Will it be made available on-demand or forced choice? 
  • Data security – Database on shared infrastructure adds the same security concern that’s being on people’s mind for quite some time. Admin controls being with Amazon could be another concern.
  • Manageability – How much control do I get and the need to learn a new API to manage the databases.
  • TCO – Don’t just go by the hourly usage charges as Amazon will also charge for storage (backup and data), bandwidth / data transfer etc.
It would be good to hear about others opinion and experience.

Tuesday, March 8, 2011

Edition based redefinition


Oracle 11g brought in a new feature called Edition based redefinition (EBS) basically aimed at reducing the planned downtime during application releases/upgrades etc. In this changing and dynamic world, application also undergoes numerous enhancements; it’s in these situations that one cannot afford to take a downtime and looks for options to minimize or eliminate them. While the application code and the software provide some options, the Oracle database engine had no such option.  

Till recently, Oracle database had only few options – such as online index rebuild and table redefinition to address planned downtime [Also has Workspace manager; Thanks for pointing out Gary Myers]. However, we all know Oracle’s capability to address unplanned downtimes with features such as – Real Applications Cluster (RAC), Physical / logical standby database, Streams etc.

With 11gR2, Oracle claims to have addressed the gap with edition based redefinition.  Oracle now supports multiple versions (editions) of a given object. So now, the objects are called as “editioned object” or “non-editioned objects” based on whether an object can have multiple versions or not. While one version of the object is used by the live application, the other version can be used to carry out changes and tested before making it permanent. However, the editionable feature is available for the following database objects ->
  • Synonym
  • View
  • Procedure
  • Function
  • Package and Package Body pe
  • Trigger
  • Type and Type Body
  • Library
The all-important and most used object – table and indexes are missing from the above list. So if you look at the list, you will feel that the versioning of code is now extended to database engine. Only view (though that’s also a piece of SQL code) and synonyms have been added. However, one can work around table by creating views and making them editionable but again only simple views without the use of functions etc. can be editioned. As a change, the developer needs to make his/her code work against editionable objects.

The other important thing is data within the table can’t be versioned; a lot of changes happen to be DML in nature so this is another important thing missing though there are workaround.

So, in my opinion this feature is useful in the following scenario =>
  • If you make changes to procedures, function etc.
  • Changes are done to physical structure of tables rather than data
Otherwise I feel this is not as useful yet. Also it’s a relatively a new feature and yet to mature. I'm sure future releases of Oracle will bring in some enhancements.
Enhanced by Zemanta

Wednesday, April 14, 2010

Oracle Critical Patch Update - April 2010


The 2nd critical patch update for 2010 (CPU April 2010) has been released by Oracle yesterday. Critical patch updates mostly contain fixes to security vulnerabilities plus it would have non-security fixes too. This critical patch update contains 47 new security fixes across all products which includes 7 for Oracle database. For the first time, CPU includes patches/fixes for Sun products. Please review the following URL to see if the product you are using requires this patch or not.


The next critical patch update (CPU) would be coming in July 2010.


Reblog this post [with Zemanta]

Wednesday, April 7, 2010

Oracle RAC One Node - What is it?


I am reviving my blog after a long time. Hope I will be much regular. Some of my posts have been popular and received good feedback. Thanks to all of you who visited this blog and I am glad that the information has been useful.

I was looking for some information on Oracle RAC One node, early this year and did not find much. I thought to do a post on my views/opinion on this latest option introduced by Oracle. I am yet to get hands-on with this option. Please leave your comments/feedback if you have different opinion/experience with this feature Or let me know if this post has any wrong/misleading information. It will be a healthy discussion.

What is Oracle RAC One Node?

Oracle introduced a new option called RAC One Node with the release of 11gR2 in late 2009. This option is available with Enterprise edition only. Basically, it provides a cold failover solution for Oracle databases. It’s a single instance of Oracle RAC running on one node of the cluster while the 2nd node is in a cold standby mode. If the instance fails for some reason, then RAC One Node detects it and first tries to restart the instance on the same node. The instance is relocated to the 2nd node in case there is a failure or fault in 1st node and the instance cannot be restarted on the same node. The benefit of this feature is that it automates the instance relocation without any downtime and does not need a manual intervention. It uses a technology called Omotion, which facilitates the instance migration/relocation. “RAC one” is Oracle’s answer or solution to OS clustering solution like Veritas Storage Foundation, Sun Solaris cluster, IBM HACMP, and HP Service guard etc.

Purpose

Its Oracle’s attempt to tie customers to a single vendor by eliminating the need to buy 3rd party OS cluster solutions. First, it introduced Oracle Clusterware with 10g and stopped the need to rely on 3rd party cluster software and now it intends to conquer the rest who are still using HACMP, Sun Solaris cluster etc. for cold failover.

Benefits

The Oracle RAC One node provides the following benefits:

•         Built-in cluster failover for high availability
•         Rolling patches for single instance database
•         Proactive migration / failover of the instance
•         Live migration of instances across servers
•         Online upgrade to RAC

The rolling upgrade is really useful. Upgrade to the OS, and Database can be done without any downtime unless upgrade requires some scripts to be run against the database. With RAC One Node, the DBA’s and Sys admins can be proactive and migrate/failover the instance to another node to perform any critical maintenance activity.

What it's not suited for

According to me the RAC one node is not a viable or recommended solution in the following scenarios:

•         To load balance unlike regular RAC
•         A true high availability solution
•         As a DR solution; Data guard best suits the bill
•         For mission critical applications

Cost

It is definitely not FREE. Oracle has priced RAC one at par with Active Data Guard. The RAC One node is priced separately and costs $10,000 per processor as against $23,000 for regular RAC. The licensing cost is required for ONE node only (in a 2-node setup). RAC one node is eligible for 10-day rule, allowing a customer to migrate to another without the need to buy additional license up to 10-days in a calendar year. People arguing against paying a license fee for resources they are not using will still lament.

Conclusion

I am still not very convinced on the usefulness of RAC one node. I think customers invest in RAC for their mission critical applications and achieving high availability and load balancing at the same time. Those who don’t go for RAC rely on Data Guard and now with 11g, on Active Data Guard. So don’t see a huge requirement for RAC One except seamless failover within a data center. The licensing is a bit disappointing; they are making clients pay $10 K. Moreover RAC is free with Standard edition though one doesn’t get enterprise features and limited to 4 CPU sockets only. So, thinking RAC One will be popular among customers who are currently using standard edition and want to switch to enterprise will be wrong. However, this is still a very new feature and as more people adopt it, we will get more clarity on its’ usability. I am planning to do a POC on it and would publish the installation steps and any findings (goods things and not so good things) of my POC.
Reblog this post [with Zemanta]

Monday, February 16, 2009

Future of Relational Database

I read an interesting article on RWW about future of relational database; thought it might be of interest to you too!

This article talks about the emerging database (key/value database) and compares it to RDBMS. One of the interesting things being that you may not be able to perform JOIN operation. It is being described as the suitable model for cloud service provides (and pay-as-you-go service providers) and big players like Amazon (SimpleDB), Google (AppEngine Datastore), Microsoft (SQL Data services) have already started the offering. There are non-cloud providers too like - CouchDB, Drizzle, Mongo etc. However, all these services (both cloud and non-cloud) are still in beta or alpha phase.

My 2 cents - Personally, I think these emerging database models have a long way to go before then can match feature richness of RDBMS; Scalability can not be the only criteria as described in RWW article. With RDBMS like Oracle adopting to cloud, it can get tougher for key/value database models.

Pour in your thoughts...