rac automation

Werner Puschitz talked yesterday about Automated Oracle Real Application Clusters Deployment: How Dell Does IT.
The result of the automation is, install a 6 nodes cluster in 30 minutes. Which is quite impressive.

Werner divided the automation in three RPM packages.

1) configure the host: set up private and virtual interface (according to a naming convention, for example private is hostname-priv, vip is hostname-vip). Set up the system configuration (shared memory, etc). Set up the SAN, shared devices. Set up ssh. Define a cronjob to check if all nodes are configured and accessible. Write an email to the sysadmin when all nodes are ready

2) install the clusterware. the RPM is build with a response file + the oracle software. The response file is recorded with ./runInstaller -record.

3) install the database software. the RPM is build with a response file too

Werner said it is rather worth to build those packages for large companies, where you have many RAC installations. In my opinion, even if you have only one or two rac, you can benefit from this. It provides you an easy way to reinstall the system, upgrade it to a new version, create two systems (dev+prod) with the same configuration.

Thanks Werner for this very good one!

11g new features part II

I have been following 2 sessions with Juan Loaiza about new features.

A very few of them here :

SQL> create edition v1_0;
SQL> alter session set edition=v1_0;

You can create a versioning of your objects, so you will be able to have many versions of the same package at the same time. It is a bit similar to workspace, where you have many versions of the data at the same time. It is very profitable in release management and availability.

About the cache result hint, you can also use
alter session cache results;, which can be useful for lookup table. As commented on a previous post, you can still use the old alter table cache; or the keep buffer pool. It depends.

Performance enhancement in the RAC interconnect.

Server side connection pooling. An additional layer to the shared server, to enable faster [actually to bypass] session creation.
edit: check Database Resident Connection Pooling

Securefiles. This is a good one. It is a huge improvement to BLOB. Faster, with compression, encryption.

Partition interval. This is a marvelous one ! You can now partition by date, one partition per month for example, with automatic partition creation.

Rman backup can bypass undo. Undo tablespaces are getting huge, but contain lots of useless information. Now rman can bypass those types of tablespace. Great for exporting a tablespace from backup.

Capture/replay workload. Sounds appealing. You can capture the workload in prod and apply it in development.

Many other enhancement.

Juan expect to see a Petabyte single database, with a terabyte of memory and 1000 cpus before the end of the decade

this was a 2006 announcement, not all features announced have been implemented in prod

OOW 2K6 day 1

I tried to watch the keynotes yesterday, but it is just to difficult to sit and not sleep for me… so I have seen only a few minutes of each one.

The PL/SQL 11g session was excellent, I wrote an overview in a separate post.

I started the afternoon with APC session, about the importance of testing and the power of the utPLSQL package. He presented that methodology and also the concept of testing. Fixing a bug at the development stage is fine, fixing it in production is very costly. I resume the method in those steps. First, checkout your package and your testing procedure. Second, modify your package. Never commit before testing. Improve your tests. Finally, commit your changes in both the source and the tests. APC was somehow unlucky with a laggy sql-developer and an unregistered textpad. Thanks Andrew for this presentation.

Than I went to Tom Kyte session about the worst things to do. Instead of telling what to do, Tom ironised on what we Should Always Do. He started with The Experts Are Always Right. Funny presentation, lots of laugh in the audience. I have meet Ken Jacobs during Tom Session. A good moment.

I have been to the exhibition hall, and I talked to the egenera team about RAC on BladeFrame and will go to the session S283094 on Wednesday.

11g new features

The presentation of Bryn Llewellyn was a good one! He talked about the 11g new features. Well, he said it is maybe not named 11g and maybe none of the features will be available. But since the beta is already available, I guess all of the features he talked will be available. It is very rich, and went fast, so I apologize for not relating all of them, or any mistakes that I include.

The result set caching. My favorite. This sounds like a huge performance improvement for many applications. I have an application which is doing a select count(*) at every screen. It is the bottleneck. A possible workaround is to use query rewrite and materialized view. Now in 11g, you just add a /*+result_cache*/ hint, so the result of the query will be cached. Justin Cave asked about the integrity. The answer is : there is no compromise of the integrity. There is an aggressive cache invalidation, so whatever DML happens on one dependent table, the cache result is invalidated. As for the materialized view rewrite in 9iR1, I guess there will be quite a few P1 bug for that hint in 11.1.0, but still it is a great announcement. This hint also works for PL/SQL functions, the declaration of the function can include result_cache relies on (emp)

Fine grained dependency tracking. Currently, if you have a view or a function based on a table, and if you modify that table, the view is getting invalid. This is what Bryn called : aggressive object invalidation. Now in 11g it has improved, so if you modify an element of the table which is not included in that view (ex: you add a column), the view is not invalidated. This is wise.

Regular expression improvements. This is rather a SQL improvement, glad Bryn did presented it too. One of this is a new function called regexp_count. All of the existing functions have been improved. I love that kind of new features, because they offer new way of solving queries. I hope I will be able to reanswer Re: Can any one retrive Nth column from a table with one less function in 11g.

Using the => syntax in sql. In 11g you can use select f(x=>1) from dual, which is a goodie.

Fine grained access control to the TCP packages family (utl_tcp, utl_smtp, …). This is a good one. You can grant execute on the package only for specific IP addresses.

Read-only table. Ok, it reminds me one thread how-to-set-a-table-in-read-only-mode. Glad to see this one too!

Fast triggers. Nothing to do about it, triggers are just faster in 11g.

Intra-Unit inlining. This is the 3rd level of PLSQL_optimize_level.

Trigger order. You have many triggers on one table, you can now specify in which order they will be fired.

Compound trigger. A new powerfull type of trigger, which enables you to specify a declarative section (and to have a kind of package global variable), a before procedure, an after each row procedure, and an after procedure. All this in a single trigger.

Create disabled trigger. It is now possible to create a disabled trigger. You can create an invalid trigger, and compile it later, but if not used appropriately by the developers, it may create a new kind of invalid objects in the databases. Good for the developer. Not necessarily pleasant for the DBA.

Using sequence in PL/SQL without DML. It is possible to use x:=s.nextval in plsql, instead of selecting from dual.

PLSQL_Warning. You can compile a procedure with PLSQL_WARNING=enable all, to get errors when others exceptions are caught and not raised. Tom Kyte does appreciate this one 😉

A special mention to the super keyword. I am enthusiastic but somehow skeptic about the implementation of inheritance in PL/SQL. Well, I am looking forward from reading more about this.

Faster and real native compilation. Improvement have been done to bypass the filesystem and the external C compiler in this release.

DBMS_SQL improvement. Ways to bypass the 32k limitation. I have not understand very well this change.

The continue keyword. You can use the continue keyword in your plsql loops, as you would do in another languages.

disclaimer: the post was based on OOW 2006 announcement and may not reflect the production release of 11g

not enough time to do all

I updated my calendar for Oracle Open World. By rechecking the location, I figured out I did book to much. Unfortunately, I will not be able to go to steven feuerstein session S281918 on monday, because it starts at the same time as tom session ends.

I had a difficult choice for tuesday :
– S281213 (now full) Developing a Successful Database Backup and Recovery Strategy: Customer Experiences with Jonathan Intner, oracle specialist at Novartis
– S283505 Battle-Tested Best Practices for Provisioning, Managing, and Monitoring Oracle Real Application Clusters Environments with Arup Nanda, Oracle Ace
– S283870 Flexframe for Oracle: Adaptive Infrastructure Solution for Oracle Database and Oracle Application Server 10g

I chose the third one, because I am managing a workshop with RAC on Egenera BladeFrame one week later in Zürich, so it will be very useful material.

I also managed to add three expert sessions at the otn lounge to my schedule :

Steven Feuerstein, Arup Nanda and Tom Kyte with APC

I am in!

I just confirm my registration, got my badge and my bag. I also have my room at Fishermanns Wharf.

Today I am going to China Town and in the evening to E&O -do not confuse with I/O- for the Ace dinner.

apply CPUOct2006

I downloaded the CPUOct2006 patch for and applied it successfully to my database.

SQL> select action,id,comments from dba_registry_history;
------ ---------- ----------
CPU       5490848 CPUOct2006

in the logfile, apart from a few ignorable ORA-02303: cannot drop or replace a type with type or table dependents errors, everything went fine.

Applying the security patch shortly after they are released is in my opinion a good practice, because a fix could sometimes reverse-engineered to reveal the bug.

Tomorrow afternoon I flight via London to SF for OOW2006. I am quite unhappy about not taking my notebook, my phone, not even a book or a SuDoKu in the plane 🙁 Well, I hope BA will not refuse to serve me wine this time as Delta did last year

edit search provider in IE7

In about:config in firefox I wrote about editting the search engine in firefox, for example to have google.ch instead of google.com.

This can be done in Microsoft Internet Explorer too, by regedit-ting

            Internet Explorer

Migration of tnsnames.ora to LDAP (Sun Java System Directory Server)

In this post, I did show how easy it is to use OID to resolve your network service names.

Apart OID, AD (Microsoft Active Directory) is also supported.

However, I do not want to use such products, as my customer already have a Sun Java System Directory Server running.

It is quite easy. Here are the steps with the SunOne Console.

1) expand the schema
login to the Directory Server as cn=directory manager
click schema in the configuration tab
In the Attributes subtab, click create, and type it orclnetdescstring as attribute name, and select OctetString as Syntax, and uncheck multi-valued, click OK.
In the Object Classes subtab, Create a class named OrclService , add cn as required attribute and orclnetdescstring as allowed attribute. Click OK

2) start adding services
either with your prefered ldap GUI (like Siemens DirX Manager) or with command line
dn: ou=intranet, dc=lcsys, dc=ch
ou: intranet
objectClass: top
objectClass: organizationalunit

dn: ou=applications, ou=intranet, dc=lcsys, dc=ch
ou: applications
objectClass: top
objectClass: organizationalunit

dn: ou=TNSnames, ou=applications, ou=intranet, dc=lcsys,dc=ch
ou: TNSnames
objectClass: top
objectClass: organizationalunit

dn: cn=OracleContext, ou=TNSnames, ou=applications, ou=intranet, dc=lcsys, dc=ch
cn: OracleContext
objectClass: top
objectClass: orclservice

dn: cn=lsc01, cn=OracleContext, ou=TNSnames, ou=applications, ou=intranet, dc=lcsys, dc=ch
cn: lsc01
objectClass: top
objectClass: orclservice
orclnetdescstring: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=blade01.lcsys.ch)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = lsc01.lcsys.ch)))

which I can add with

ldapadd -h blade01 -p 34001 -D “cn=Directory Manager” -w *** -f lsc01.ldif

adding new entry ou=intranet, dc=lcsys, dc=ch

adding new entry ou=applications, ou=intranet, dc=lcsys, dc=ch

adding new entry ou=TNSnames, ou=applications, ou=intranet, dc=lcsys, dc=ch

adding new entry cn=OracleContext,ou=TNSnames, ou=applications, ou=intranet, dc=lcsys, dc=ch

adding new entry cn=lsc01, cn=OracleContext, ou=TNSnames, ou=applications, ou=intranet, dc=lcsys, dc=ch

Configuring sqlnet.ora and ldap.ora is the last step :


DIRECTORY_SERVERS= (blade01:34001)
DEFAULT_ADMIN_CONTEXT = "ou=TNSnames, ou=applications, ou=intranet, dc=lcsys, dc=ch"

try to tnsping, it should work. If it does not, check /tmp/tnsping.trc

$ tnsping LSC01

TNS Ping Utility for Solaris: Version - Production on 09-OCT-2006 15:50:42

Copyright (c) 1997, 2006, Oracle Corporation.  All rights reserved.

Used parameter files:

Used LDAP adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = blade01)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = lsc01.lcsys.ch)))
OK (0 msec)

note that using something else than OID or AD is not supported

about:config in firefox

I just discover about:config (type it in your location bar). It is a very simple configuration editor, with user settings in bold.

For example I like to use a local google version to search (google.ch instead of google.com), so I configured browser.search.defaulturl