All 6 entries tagged Surprise
No other Warwick Blogs use the tag Surprise on entries | View entries tagged Surprise at Technorati | There are no images tagged Surprise on this blog
May 17, 2007
beneath the silence
I imported a file containing a big partition table. The file only contains one partition.
After I entered the command, the process just hang there. After a while, database instance crashed due to one disk is full.
It turned out before Oracle imports the data, it firstly try to locate space for the table. Even I only imported one partition, it tried to locate the space for the whole table.
Because the datafile are autoextensible, it grew and grew and eventually fill up the disk.
I tried to export the table with rows=n and import the file, Oracle still tried to expand the space. Weird, I did not remember that happened before.
Silence kills.
Having not got time to re-test it, onel caveat learned from it:- do not turn datafiles autoextensible on when import a file
In another occation, it tookimport process 30 minutes to report that the import user does not exist. What is it doing ?
October 20, 2005
New thing in 10G R2
- Only user in group oinstall or oracle itselft can access the oracle binary files. If a user intents to run sQL*PLUS locally, he wil get an error
- "Unlimited tablespace" priviledge is revoked from role resource. Todo: create a role : webdev ; create a user with: grant webdev, unlimited tablespace
October 12, 2005
Unique Index is not always good
Surprise
A table named content has one unique index (content_pk on column id), one ordinary index (content_page on column page_id).
The index the following query will use:
select count(id) from content
I expected it to use content_pk. However, it actually used content_page
(Cost=435 Card=632532). When I forced it to use content_pk, it reported (Cost=4984 Card=632532)
Explain
page_id has many duplicated rows. So the index use less blocks than a unique index. Oracle can get the blocks more quicker
The above explanation is not convincing !
October 07, 2005
Is Oracle restore need online log from a cold backup?
Performed a restore consistent of the database from an EBU cold offline
backup. On starting the database, you receive the following error:
ORA-00314: log %s of thread %s, expected sequence# %s doesn't match %s"
Cause: The online log is corrupted or is an old version.
For a cold backup, you usually copy the datafiles, control files and spfile. You would think all online transactions have been written to datafiles so the online redo logs are no longer needed.
However, it seems it still needed here.
Solution:
shutdown db with NORMAL (not immediate) option. if shutdown with ABORT or IMMEDIATE option, restart db with RESTRICT mode and shutdown it down again with NORMAL option before copy datafiles.
or
Copy online logs as a precaution. Though Oracle strongly recommended not backing up online redo logs. You can copy without copy back in the restore process
April 15, 2005
One test server use too much memory
One of our Oracle servers managed to crash its host server.
You would assume that if the physical memeory is not enough, oracle will report an error.
But it did not ! It simply use too much memory that eventualy bring down the whole server!
February 22, 2005
A weird Java behavior
Weird
Collections.sort( aList)
Collections.reverse( aList ).
The elements in aList were not reversed.
Debugging
Eclipse debug skip that line and exit to its caller.
I checked:
1) the class was recompiled
2) elements in aList implements interface Comparable
3) Restart JBoss and Eclispe, no luck.
then why it refuse to work?
At last I find out:
There are two version war files deployed in deploy direcotry. One in war alone, another one in a ear file.
That also explain another behaviour that HibernateSessionFactory cannot be bound !
Root cause
a mistake in build.xml.
Lessons to learn
Werid behavior has its reason. NO mystery.
Hongfeng Sun
Please wait - comments are loading

