Dropping composite Primary Key does not drop the index

June 18, 2009

Today I have encountered a surprising fact:

Scenario is 10.2.0.1  Express Edition on Win32.

I have a table called job_history in the HR scheme which has a composit primary key : and there is an index for the primary key:

SQL> select index_name from user_indexes where table_name=’JOB_HISTORY’;
INDEX_NAME
Does the following info help to explain?
——————————
JHIST_EMP_ID_ST_DATE_PK
JHIST_JOB_IX
JHIST_EMPLOYEE_IX
JHIST_DEPARTMENT_IX

This is my constraint in the data dictionary:

SQL> select column_name , position
  2   from user_cons_columns
  3  where constraint_name=’JHIST_EMP_ID_ST_DATE_PK’;
COLUMN_NAME      POSITION
———————–    ———————————
EMPLOYEE_ID        1
START_DATE          2
job_history

 

Now I drop the primary key constraint

SQL> alter table job_history drop constraint
  2  JHIST_EMP_ID_ST_DATE_PK including indexes;
Table altered.

And here is the surprise:

SQL> select index_name from user_indexes where table_name=’JOB_HISTORY’;
INDEX_NAME
——————————
JHIST_EMP_ID_ST_DATE_PK
JHIST_JOB_IX
JHIST_EMPLOYEE_IX
JHIST_DEPARTMENT_IX

I do not see the point here. Why is the index still there?

Evern though I have explicitly written INCLUDING INDEXES.

BUG or Feature?!

Can anyone explain?


BUG with Bind Variables in Labeled Block in 10gR2

March 31, 2009

Yesterday in my course I ran into a strange BUG in Oracle Express (XE) on WIN32 and Linux 32 bit, in fact one of my students,  Ralf Spiwoks, found it:

I have tried to run a  top level anonymous block in which assigned a value to a BIND variable and got kicked out of my session with an ORA-03113.

SQL> VAR lname VARCHAR2(4)

SQL> <<my_lable>>
 BEGIN
    :lname:=’LUTZ’;
   end;
/

ERROR:
ORA-03114: not connected to ORACLE
 <<my_lable>>
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel

THIS IS A BUG which exists in 10gR2.

Only top level blocks are affected by this BUG.
 After I wrapped the block into another block it worked.

Here is the workaround:

BEGIN
  <<my_lable>>
 BEGIN
 :lname:=’LUTZ’;
 END;
END;
/

PL/SQL procedure successfully completed.

 I have tested only WIN 32 and LINUX32 =>  XE and Enterprise Edition on Win32.  It has been fixed in the meentime, but I am not sure with which patch.
In EE 11gR1  it works.


Oracle Exadata Storage unvailed

September 27, 2008

A few days ago Larry Ellison has unvailed Oracle Exadata Storage, a family of software and hardware products including a hardware product which has been designed specially for large Data Warehouses in cooperation with HP, HP Oracle Database Machine.

The Database Machine runs Oracle Database 11g and Real Application Clusters, Oracle Enterprise Linux, and includes all the required Infiniband infrastructure and related hardware.

This is the first hardware product ever Oracle marketed under its own name.
It integrates Oracle Database Software with highly suffisticated hardware using Linux and ASM to build a very fast database maschine.

You can find more detailed information on Kevin Closson’s blog where he maintains an FAQ page.
Kevin is Performance Architect in Oracle’s Systems Technology Group which is a part of Server Technologies.

A few impressions from OOW by Tim Hall can be found on his blog.

 

 


يا القاهرة! عملة اي؟

August 25, 2008

A few days ago I arrived in Cairo again.

I will deliver a series of 11g Administration Courses for Oracle again.

One day after I arrived the there was a a big fire which burned down the house of the maglis ash-shura,  consultative councel    completely.

I was lucky enough to have my new camera with me to take some exciting shots.

 

It looked to me as if there were multiple fires burning at the same time.


Article on HOW TO Handle Block Corruption in Oracle 11g published

August 12, 2008

Today I have reveived a parcel from IOUG containing five copies of the current SELECT magazine.

Plus a sweater with the SELECT Journal Contributer logo:

Additionally I was granted a one year free membership for Independent Oracle User Group (IOUG) for my article on DETECTING AND REPAIRING CORRUPT BLOCKS IN ORACLE DATABASE 11g WITH THE DATA RECOVERY ADVISER which is included in the curernt issue Volume 15 Number 3/2008.

Thanks IOUG and SELECT, this was a nice surprise.

=;-)


100′000 hits on sysdba.wordpress.com

April 14, 2008

Today my blog has reached to the 100′000 hits landmark.

I am very happy that this has become such a successfull forum here.

Thanks for reading
I’ll keep on posting in the future!

 


Free Oracle Clusterware for Linux Support Customers

April 3, 2008

Oracle Technology Network announces that “Oracle Unbreakable Linux support customers at the Basic and Premier support levels now can download and deploy Oracle Clusterware at no additional license fee or support cost.”

 ubl-80.jpg  Oracle Unbreakable Linux.

 Before this the clusterware needed at least one Standard Edition License.

Now you can download the clusterware and use it as an extension of your Linux to make virtually any application highly available even without having an Oracle Database Server.

For more info on this and ready made scripts see my previouse post on how to protect a single instance database with the clusterware.

 This is really cool!

=;-)  oracle_final_linux.gif


Speaking at Swiss Oracle Usergroup

March 27, 2008

Today I have delivered two presentation @ the

soug_03_2008.jpg yearly conference of the Swiss Oracle Usergroup.

The topics were :

- Real Application Testing with Oracle 11g
     REPLAY DATABASE and
     SQL PERFORMANCE ADVISOR

- SQL Plan Management and Automatic SQL Tuning in 11g

I have used my new courseware which
I have produced in the last few weeks for 11g New Features.

I offer to to deliver special courses for topics such as

- High Availability with Flashback and other 10g and 11g features
- Backup 10g & 11g
- Memory Management 10g & 11g
- Upgrade Issues 10g & 11g
- 11g New Features Overview

If you are interested in these topics please contact me by email:

info@sysdba.ch


Teaching Oracle Support and Trainers

March 18, 2008

At the moment I am in Cairo delivering a number of 11g New Features trainings.

I have a completely packed class with 21 students.

18032008001.jpg Most of the students are Oracle Trainers, Support Agents and Consultants.


Visiting Muhammad Ali

March 14, 2008

After arriving in Cairo I immediately went to see if the my friend Muhammd Ali is still in living in his place as before 13 years.  I had been living in his place for a while in the 90s.

muhammda_ali.jpg Muhammad is an internationally recognized artist and has been painting since more than 25 years now. He had exhibitions in Paris, Hamburg, Berlin, Zurich and many other places.

He lives in a very poor area near the great basar Khan Al-Khalili.

In April he will have an exhibition in Talaat Harb Streeet in Downtown Cairo and I hope ma_01.jpg that he will sell a great number of his beautiful naive paintings again.