Feed aggregator
Extra! Extra! Oracle Closed World today.... on Cloud
It's at 1200 hours, NOT 1300 hours as usual.
More details via text messages later, including todays codeword. If you want text messages from me for the OCW sessions, send me a text/SMS on +45 25277100.
Cloud computing is 'hot'. So is Larry when he talks about it on YouTube. Funny as Hell, actually.
There are at least these two videos. They are partly overlapping, but that doesn't matter- you'll want to see him do this standup routine a couple of times, trust me:
http://www.youtube.com/watch?v=0FacYAI6DY0
http://www.youtube.com/watch?v=8UYa6gQC14o
Which is why today, at the secret location, Oracle Closed World will present a couple of guys that know everything about 'the cloud'.
Mogens
OOW 2009 1st report
User friendly / supported monitoring of concurrent processes
I've asked a question on OTN (under EBS General Discussion) Best way to execute / monitor long running custom conc request with slave.
Can anyone help me with suggestions for an EBS-supported API (11.5.10 on Solaris 10 / Oracle 9iR2) that would enable the professional user who launched a (PL/SQL) concurrent process to monitor its progress over several hours from his/her application UI? To add to the fun, the process is going to spawn some slaves to make use of all the spare CPUs / cores / threads we have lying around.
As a developer, I would normally start with the DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS procedure (and I'll build that in anyhow) - but in this case I'm struggling to find any documentation or ML notes. to point me at something that would actually appear on the apps UI.
Answers here - or better still, on the OTN thread. Thanks in advance!
It's wonderful, but will I survive?
It is all Wonderful. Just one little question. How am I going to survive 3 more days? I'm going to bed!
The ultimate story about OCR, OCRMIRROR and 2 storage boxes – Chapter 5
This is a follow-up of chapter 4.
In this final scenario, we do the same thing as in scenario 4. I.e. while crs is running on both nodes, we hide the ocrmirror from the non-ocr-master node, which is node 2 now.
So node 1 is the master, we hide ocrmirror from node 2 and we verify on node 2:
(nodeb01 /app/oracle/crs/log/nodeb01) $ dd if=/dev/oracle/ocrmirror of=/dev/null bs=64k count=1
dd: /dev/oracle/ocrmirror: open: I/O error
What happens?
As we know from scenario 4, ocrcheck on node 2 now fails with:
(nodeb01 /app/oracle/crs/log/nodeb01) $ ocrcheck
PROT-602: Failed to retrieve data from the cluster registry
On node 1 all is ok. This is still the same as scenario 4, but in scenario 4 we now stopped crs on the ocr master who can see both luns. In this scenario we will now stop crs on the non-master node (node 2) who can see only ocr.
And now it gets interesting….
-bash-3.00# crsctl stop crs
OCR initialization failed accessing OCR device: PROC-26: Error while accessing the physical storage
Did I say “really interesting”? We don’t seem to be able to stop crs anymore on the non-ocr-master node. Maybe it is worth referring to the RAC FAQ on Metalink that says “If the corruption happens while the Oracle Clusterware stack is up and running, then the corruption will be tolerated and the Oracle Clusterware will continue to funtion without interruptions”. That’s true, but they don’t seem to speak about stopping crs. Anyway, the real “playing” continues:
Let’s try to tell Oracle CRS that the ocr is the correct version to continue with, and ask kindly to increase its votecount to 2. We do this on node 2 and get:
ocrconfig -overwrite
PROT-19: Cannot proceed while clusterware is running. Shutdown clusterware first
Deadlock on node 2! We can’t stop crs, but in order trying to correct the problem, crs has to be down…
Moreover, at this time, it is not possible anymore to modify the OCR. Both nodes now give:
(nodea01 /app/oracle/crs/log/nodea01/client) $ srvctl remove service -d ARES -s aressrv
PRKR-1007 : getting of cluster database ARES configuration failed, PROC-5: User does not have permission to perform a cluster registry operation on this key. Authentication error [User does not have permission to perform this operation] [0]
PRKO-2005 : Application error: Failure in getting Cluster Database Configuration for: ARES
And doing the above command on each node gives always in the alert logfile of node 1 (who is the master):
[ OCRAPI][29]a_check_permission_int: Other doesn’t have permission
Note: “srvctl add service” doesn’t work either.
Now it seems like things are really messed up. We have never seen permission errors before. Please be aware now that the steps below are the steps I took trying to get things right again. There may be other options, but I only did this scenario once, with the steps below:
As the original root cause of the problem was making the ocrmirror unavailable, let’s try to tell the cluster to forget about this ocrmirror, and continue only with ocr, which is still visible on both nodes.
So in order to remove ocrmirror from the configuration, we do as root on node 2:
-bash-3.00# ocrconfig -replace ocrmirror “”
Note: specifying an empty string (“”) is used to remove the raw device from the configuration.
At that time in the crs logfile of node 1:
2008-07-23 11:11:18.136: [ OCRRAW][29]proprioo: for disk 0 (/dev/oracle/ocr), id match (0), my id set (1385758746,1028247821) total id sets (2), 1st set (1385758746,1866209186), 2nd set (1385758746,1866209186) my votes (1), total votes (2)
2008-07-23 11:11:18.136: [ OCRRAW][29]propriowv_bootbuf: Vote information on disk 0 [/dev/oracle/ocr] is adjusted from [1/2] to [2/2]
2008-07-23 11:11:18.195: [ OCRMAS][25]th_master: Deleted ver keys from cache (master)
2008-07-23 11:11:18.195: [ OCRMAS][25]th_master: Deleted ver keys from cache (master)
That looks ok. We will be left with one ocr device having 2 votes. This is intended behaviour.
In the alert file of node 1, we see:
2008-07-23 11:11:18.125
[crsd(26268)]CRS-1010:The OCR mirror location /dev/oracle/ocrmirror was removed.
and in the crs logfile of node 2:
2008-07-23 11:11:18.155: [ OCRRAW][34]proprioo: for disk 0 (/dev/oracle/ocr), id match (1), my id set (1385758746,1028247821) total id sets (2), 1st set (1385758746,1866209186), 2nd set (1385758746,1028247821) my votes (2), total votes (2)
2008-07-23 11:11:18.223: [ OCRMAS][25]th_master: Deleted ver keys from cache (non master)
2008-07-23 11:11:18.223: [ OCRMAS][25]th_master: Deleted ver keys from cache (non master)
(node 2 updates its local cache) and in the alert file of node 2:
2008-07-23 11:11:18.150
[crsd(10831)]CRS-1010:The OCR mirror location /dev/oracle/ocrmirror was removed.
Now we do an ocrcheck on node 2:
(nodeb01 /app/oracle/crs/log/nodeb01) $ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 295452
Used space (kbytes) : 5600
Available space (kbytes) : 289852
ID : 1930338735
Device/File Name : /dev/oracle/ocr
Device/File integrity check succeeded
<br /> Device/File not configured
Cluster registry integrity check succeeded
Now the configuration looks ok again, but the error remains on node 2 (we do this as user oracle):
(nodeb01 /app/oracle/crs/log/nodeb01) $ srvctl remove service -d ARES -s aressrv
PRKR-1007 : getting of cluster database ARES configuration failed, PROC-5: User does not have permission to perform a cluster registry operation on this key. Authentication error [User does not have permission to perform this operation] [0]
PRKO-2005 : Application error: Failure in getting Cluster Database Configuration for: ARES
However doing the same command as root on node 2 succeeds:
-bash-3.00# srvctl remove service -d ARES -s aressrv
aressrv PREF: ARES1 AVAIL: ARES2
Service aressrv is disabled.
Remove service aressrv from the database ARES? (y/[n]) y
After this, managing the resources as user oracle succeeds again:
(nodeb01 /app/oracle/crs/log/nodeb01) $ srvctl add service -d ARES -s aressrv2 -r ARES1
(nodeb01 /app/oracle/crs/log/nodeb01) $ srvctl remove service -d ARES -s aressrv2
aressrv2 PREF: ARES1 AVAIL:
Remove service aressrv2 from the database ARES? (y/[n]) y
At this point, unfortunately the internals end. At the moment of my testing, I had no time to investigate this further, and since then I had no time to make and test a similar setup (that’s why this blog posting took so long, I would have loved to do more research on this). However I remember I have done some more testing in some place at some customer site (but I have no tracscript of that, so no details to write here) and I can still tell the following:
For some reason, the ownership of the ARES resource in OCR seems to be changed from oracle to root. A way to get out of this as well is using the following commands:
crs_getperm
crs_setperm -o oracle | -g dba
This allows to change ownership back to oracle, and then all will become ok again.
I can’t say where it went wrong. Maybe I have done something as root, instead of oracle, without knowing (however I double checked my transcripts). I think it went wrong at the moment where I first tried to stop crs as root on node 2 and then did an “ocrconfig -overwrite” as root on node 2. I wonder if something has then been sent to node 1 (who is ocr master), i.e. as root, that may have changed some permission in the ocr…? If anyone has time and resources to investigate this further, please don’t hesitate to do so, and inform me about the results. In this way, you may gain perpetual honour in my personal in-memory list of great Oracle guys.
ConclusionAltthough crs is very robust and 2 storage boxes are ok, there may be a situation where you get unexpected error messages. Hopefully this chapter will help you in getting out of this without problems, and strengthen your confidence in Oracle RAC.
Let’s make a final conclusion in the next chapter…


Oracle Closed World - an underground conference...
Last year at Oracle Open World (OOW) my friend Iggy Fernandez, who edits the NOCOUG (Northern California Oracle User Group) magazine/journal, suggested an Oracle Closed World conference, where REAL, TECHNICAL presentations would take place underground in secret locations, using secret passwords, and what have you.
Well, it's here. Monday, Tuesday and Thursdag at a secret location we'll do deep and very technical presentations about various topics. The secret location (which is indeed underground) has the capability to serve beer, by the way.
Let me know if you're interested in hearing more about OCW - email me on mno@MiracleAS.dk or text me on +45 2527 7100.
Mogens
Things you never wanted to know about SAN's...
From now on, think of the firmware in a SAN as a whole OS, just bigger. Scary, right?
My question to this very smart guy I know was this:
"Could you repeat what OS'es are used in what SAN's for me? And how many code lines the ExaData is using?"
=======================================================================
oh god...that is a huge question... First, Exadata software is small (less than about 100MB of bits)...but that is an unfair comparison to the glut of stuff in a full-featured array... Exadata has Linux underneath it, but then we execute about 98% User, 2% Kernel so really, the only thing we get from Linux is scheduling and I/O... Exadata is small because it doesn't do any of the fat stuff arrays like Clariion do (e.g., snapshots, remote mirror, etc).
Netapp's is called OnTap and it is a heavily developed BSD (Net/1 to be exact). It is huge and full featured as you can tell by how many add on packages it support, but just in protocol provisioning it is huge. Consider the fact that it can support front-end FC yet the LUNS are actually files in the WAFL filesystem! Wild.
Clariion OS is called FLARE and it sits on top of a full Windows distro (XP). EMC NAS (celerra) is called DART which is written from scratch.
HP StorageWorks Clustered Gateway is Linux +hundreds of thousands of very specialized PolyServe code.
EMC DMX OS is called Enginuity...DMX cpus are Power and I have no idea what the origin of this OS is. If I were a betting man I'd bet that it is scratch like DART.
IBM DS83XX is full blown AIX plus more (this is the old SHARK array) in fact, it is a cluster of AIX boxes in there...
I don't know what HP calls the stuff that runs inside EVA ...
as you can see...it is very confusing.
=======================================================================
Open World Recap and New White papers
The technical session, which is on Tuesday Oct 13 at 2:30 pm, gives step by step instructions on how to use the new 11g features to ensure your upgrade goes smoothly and without any SQL plan regressions. This session is based on our latest white papers, Upgrading from Oracle Database 10g to 11g: What to expect from the Optimizer and SQL Plan Management in Oracle Database 11g.
The roundtable, which is on Thursday Oct. 15th at 10:30 am, will give you a first hand opportunity to pose you burning Optimizer and statistics questions directly to a panel of our leading Optimizer developers. In fact if you plan to attend the roundtable and already know what questions you would like to ask, then please send them to us via email and we will be sure to include them. Other wise, you can hand in your questions at our demo station at any stage during the week, or as you enter the actual session. Just be sure to write your questions in clear block capitals!
We look forward to see you all at Open world.
Maria Colgan
Open World Recap and New White papers
The technical session, which is on Tuesday Oct 13 at 2:30 pm, gives step by step instructions on how to use the new 11g features to ensure your upgrade goes smoothly and without any SQL plan regressions. This session is based on our latest white papers, Upgrading from Oracle Database 10g to 11g: What to expect from the Optimizer and SQL Plan Management in Oracle Database 11g.
The roundtable, which is on Thursday Oct. 15th at 10:30 am, will give you a first hand opportunity to pose you burning Optimizer and statistics questions directly to a panel of our leading Optimizer developers. In fact if you plan to attend the roundtable and already know what questions you would like to ask, then please send them to us via email and we will be sure to include them. Other wise, you can hand in your questions at our demo station at any stage during the week, or as you enter the actual session. Just be sure to write your questions in clear block capitals!
We look forward to see you all at Open world.
Maria Colgan
Concepts Guide: 8/27 - Memory Architecture
The ultimate story about OCR, OCRMIRROR and 2 storage boxes – Chapter 4
This is a vollow-up of chapter 3.
Let’s try to do the same thing as scenario 3, however now hiding the lun from a node NOT being the OCR MASTER, while crs is running on both nodes.
What happens?
So we hide the ocrmirror lun from node 1, because after the previous test node 2 is still the master. At the moment of hiding the lun nothing apears in any logfile on any node. This is an interesting fact, because when we removed the ocrmirror from the ocr master in scenario 3, we got the messages “problem writing the buffer …” and “Vote information on disk 0 [/dev/oracle/ocr] is adjusted from [1/2] to [2/2]” immediately in the crsd logfile. So this indicates that only the ocr master reads/writes(?) constantly in the ocr/ocrmirror and hence, detects IO errors immediately. The non-ocr-master doesn’t do anything.
To prove that the ocrmirror is really invisble for the non-ocr-master, we do on node 1:
(nodea01 /app/oracle/bin) $ dd if=/dev/oracle/ocrmirror of=/dev/null bs=64k count=1
dd: /dev/oracle/ocrmirror: open: I/O error
ocrcheck on node 2 (the master) has no problem, as it still sees both devices:
Device/File Name : /dev/oracle/ocr Device/File integrity check succeeded Device/File Name : /dev/oracle/ocrmirror Device/File integrity check succeeded Cluster registry integrity check succeeded
But doing ocrcheck on node 1 gives:
PROT-602: Failed to retrieve data from the cluster registry
and its alert file says:
2008-07-23 09:33:43.221
[client(14867)]CRS-1011:OCR cannot determine that the OCR content contains the latest updates. Details in /app/oracle/crs/log/nodea01/client/ocrcheck_14867.log.
and the associated client logfile shows:
Oracle Database 10g CRS Release 10.2.0.4.0 Production Copyright 1996, 2008 Oracle. All rights reserved.
2008-07-23 09:33:43.210: [OCRCHECK][1]ocrcheck starts…
2008-07-23 09:33:43.220: [ OCRRAW][1]proprioini: disk 0 (/dev/oracle/ocr) doesn’t have enough votes (1,2)
2008-07-23 09:33:43.221: [ OCRRAW][1]proprinit: Could not open raw device
2008-07-23 09:33:43.221: [ default][1]a_init:7!: Backend init unsuccessful : [26]
2008-07-23 09:33:43.221: [OCRCHECK][1]Failed to access OCR repository: [PROC-26: Error while accessing the physical storage]
2008-07-23 09:33:43.221: [OCRCHECK][1]Failed to initialize ocrchek2
2008-07-23 09:33:43.221: [OCRCHECK][1]Exiting [status=failed]…
Now let’s see if node 1 really has a problem with this or not?
(nodea01 /app/oracle/bin) $ crsstat<br />HA Resource Target State<br />----------- ------ -----<br />ora.ARES.ARES1.inst ONLINE ONLINE on nodea01<br />ora.ARES.ARES2.inst ONLINE ONLINE on nodeb01<br />ora.ARES.db ONLINE ONLINE on nodeb01<br />ora.AMIGO.AMIGO1.inst ONLINE ONLINE on nodea01<br />ora.AMIGO.AMIGO2.inst ONLINE ONLINE on nodeb01<br />ora.AMIGO.db ONLINE ONLINE on nodeb01<br />ora.nodea01.ASM1.asm ONLINE ONLINE on nodea01<br />ora.nodea01.LSNRARES_NODEA01.lsnr ONLINE ONLINE on nodea01<br />ora.nodea01.LSNRAMIGO_NODEA01.lsnr ONLINE ONLINE on nodea01<br />ora.nodea01.gsd ONLINE ONLINE on nodea01<br />ora.nodea01.ons ONLINE ONLINE on nodea01<br />ora.nodea01.vip ONLINE ONLINE on nodea01<br />ora.nodeb01.ASM2.asm ONLINE ONLINE on nodeb01<br />ora.nodeb01.LSNRARES_NODEB01.lsnr ONLINE OFFLINE<br />ora.nodeb01.LSNRAMIGO_NODEB01.lsnr ONLINE OFFLINE<br />ora.nodeb01.gsd ONLINE ONLINE on nodeb01<br />ora.nodeb01.ons ONLINE ONLINE on nodeb01<br />ora.nodeb01.vip ONLINE ONLINE on nodea01
Obviously not. I seem to be able to query the ocr without any problem. Even modifying the OCR succeeds from node 1:
srvctl add service -d ARES -s aressrv -r ARES1 -a ARES2
gives in the crs logfile:
2008-07-23 09:41:04.656: [ CRSRES][46723] Resource Registered: ora.ARES.aressrv.cs
2008-07-23 09:41:05.786: [ CRSRES][46724] Resource Registered: ora.ARES.aressrv.ARES1.srv
This seems to indicate again that all OCR manipulation (read + write) goes though the ocr master (node 2 who still sees both ocr and ocrmirror). Still during all these actions nothing has appeared in any logfile of node 2 (the master who still sees both luns).
Now let’s do an interesting test and stop the master. We may assume that node 1 will become the new master then, however node 1 at this time sees only one device with one vote. So it cannot run CRS like that…
Let’s see what happens. After stopping crs on node 2, the crs logfile on node 1 shows:
2008-07-23 09:44:08.406: [ OCRMAS][25]th_master:13: I AM THE NEW OCR MASTER at incar 2. Node Number 1
2008-07-23 09:44:08.415: [ OCRRAW][25]proprioo: for disk 0 (/dev/oracle/ocr), id match (1), my id set (1385758746,1866209186) total id sets (2), 1st set (1385758746,1866209186), 2nd set (1385758746,1866209186) my votes (1), total votes (2)
2008-07-23 09:44:08.418: [ OCRRAW][25]propriowv_bootbuf: Vote information on disk 0 [/dev/oracle/ocr] is adjusted from [1/2] to [2/2]
This makes sense. Node 1 becomes the master because node 2 is leaving. However it evaluates its configuration and sees an ocr with one vote and no ocrmirror. This violates rule 3 and hence it updates the vote count (he can do that, he is the new master), and luckily he does NOT decide to crash…
And indeed all seems as expected now on node 1:
Device/File Name : /dev/oracle/ocr<br /> Device/File integrity check succeeded<br /> Device/File Name : /dev/oracle/ocrmirror<br /> Device/File unavailable<br />
The situation is now that the unavailable ocrmirror still has one vote (because node 1 could not update its vote count) and the ocr has just received 2 votes from node 1.
Now we restart crs again on node 2 and we see in its logfile:
2008-07-23 09:47:19.583: [ OCRRAW][1]proprioo: for disk 0 (/dev/oracle/ocr), id match (1), my id set (1385758746,1866209186) total id sets (1), 1st set (1385758746,1866209186), 2nd set (0,0) my votes (2), total votes (2)
2008-07-23 09:47:19.583: [ OCRRAW][1]proprioo: for disk 1 (/dev/oracle/ocrmirror), id match (1), my id set (1385758746,1866209186) total id sets (2), 1st set (1385758746,1866209186), 2nd set (1385758746,1866209186) my votes (1), total votes (2)
Node 2 may be a little confused, because when both ocr and ocrmirror are available, he would expect each of them to have one vote…
Now lets do an ocrcheck again on node 2 and get:
Device/File Name : /dev/oracle/ocr<br /> Device/File integrity check succeeded<br /> Device/File Name : /dev/oracle/ocrmirror<br /> Device/File needs to be synchronized with the other device<br />
Aha, this is the right output when ocrmirror has 2 votes and ocr has 1 vote.
So let’s do as what Oracle tells in the output above, let’s synchronize the ocrmirror again with the other device:
So we do an “ocrconfig -replace ocrmirror /dev/oracle/ocrmirror” on node 2 (who can see both ocr and ocrmirror). Bad luck, this fails, because node 2 is not the master. Node 1 has become the master (see above) and node 1 cannot see ocrmirror. So node 1 cannot verify or correct the vote count on ocrmirror. Hence this last command gives in the alert file of node 1:
2008-07-23 09:57:26.251: [ OCROSD][35]utdvch:0:failed to open OCR file/disk /dev/oracle/ocrmirror, errno=5, os err string=I/O error
2008-07-23 09:57:26.251: [ OCRRAW][35]dev_replace: master could not verify the new disk (8)
[ OCRSRV][35]proas_replace_disk: Failed in changing configurations in the Master 8
After making the lun visible again on node 1 and repeating the last command, all succeeds again without error: the crs logfile of node 1 then shows:
2008-07-23 10:04:48.419: [ OCRRAW][33]proprioo: for disk 0 (/dev/oracle/ocr), id match (1), my id set (1385758746,1866209186) total id sets (1), 1st set (1385758746,1866209186), 2nd set (0,0) my votes (2), total votes (2)
2008-07-23 10:04:48.419: [ OCRRAW][33]propriogid:1: INVALID FORMAT
2008-07-23 10:04:48.484: [ OCRRAW][33]propriowv_bootbuf: Vote information on disk 1 [/dev/oracle/ocrmirror] is adjusted from [0/0] to [1/2]
2008-07-23 10:04:48.485: [ OCRRAW][33]propriowv_bootbuf: Vote information on disk 0 [/dev/oracle/ocr] is adjusted from [2/2] to [1/2]
2008-07-23 10:04:48.557: [ OCRMAS][25]th_master: Deleted ver keys from cache (master)
2008-07-23 10:04:48.557: [ OCRMAS][25]th_master: Deleted ver keys from cache (master)
and in the same file on node 2 we see:
2008-07-23 10:04:48.492: [ OCRRAW][40]proprioo: for disk 0 (/dev/oracle/ocr), id match (1), my id set (1385758746,1866209186) total id sets (2), 1st set (1385758746,1866209186), 2nd set (1385758746,1866209186) my votes (1), total votes (2)
2008-07-23 10:04:48.493: [ OCRRAW][40]proprioo: for disk 1 (/dev/oracle/ocrmirror), id match (1), my id set (1385758746,1866209186) total id sets (2), 1st set (1385758746,1866209186), 2nd set (1385758746,1866209186) my votes (1), total votes (2)
2008-07-23 10:04:48.504: [ OCRMAS][25]th_master: Deleted ver keys from cache (non master)
2008-07-23 10:04:48.504: [ OCRMAS][25]th_master: Deleted ver keys from cache (non master)
The fact that the logfile on node 2 shows these messages indicates that the vote update which is done by the master (node 1) is propagated in some way to the other nodes, who in term update some kind of local cache (I think).
Conclusion of Scenario 4Hiding the lun from the non-ocr-master still can’t confuse CRS. However it takes longer for the cluster to detect that there is a problem with the storage, as only the master is able to detect io errors on the ocr/ocrmirror. But in the end it can be recovered again without downtime.
So you should be convinced now that we can’t confuse CRS, right?… Then you don’t know me yet, I still have scenario 5. Read on in the next chapter.


Oracle OpenWorld 2009: From Silicon Welly to Silicon Valley Again
Off to Openworld 2009 in a couple of days. Given that it's my second time I know a lot more of what to expect. But of course my schedule is overflowing again - even more of a mixed bag this time with fewer conference sessions, but more meetups and unconference sessions that I should have looked at more closely last year!
Here's what my main schedule looks like:

Hope to see you there - And a huge thanks to Oracle for the blogger's pass - wouldn't be there without it!
Catch ya!
Gareth
Book: Middleware Management with Enterprise Manager Grid Control
Experiences on Java programming within the databases, tips & tricks, tools, open source libraries and more
An unconference is a conference where the content of the sessions is driven and created by the participants, generally day-by-day during the course of the event, rather than by a single organizer, or small group of organizers, in advance (Source: Wikipedia). Unconferences came from the realization that "the sum of the expertise of the people in the audience is greater than the sum of expertise of the people on stage" (Source: Dave Winer).
During this talk I would like to transfer my experience on Java programming withing the Database since 1999.
Specially looking for three scenarios of work:
- Traditional Java Stored Procedure programming
- HTPP/HTTPS services through the XMLDB Servlet connector
- Domain Index and pipe-line table function
Each projects included several Open Source Libraries used and many tools for doing deployment and installing.
I hope I can see you all there next week... Marcelo
Your hosted application is a virus vector

One threat to system integrity is a computer virus. If your hosted application becomes a vector for the dissemination of viruses to your clients system it becomes a threat to your business, not just your systems. So, how do you test you hosted application to make sure infected files are handled properly?

Once you have this logic in place, you have to be able to test that the behaviour of your application is correct. Now, you don't want your development or testing environment to be using files with viruses to test with. In fact, your organisations anti-malware system would probably prevent you from storing the files anyway. Thankfully, the European Institute for Computer Antivirus Research has a solution. For testing the anti-virus error handling logic in our application we attempt to upload a file with just the EICAR test string as content.
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
The above is not a virus, but is a test string for anti-malware systems. In unit tests, this can be used as the only content of an InputStream. You should provide a dummy implementation of your virus scan system when unit testing too. Remember, you're not trying to test the anti-virus software. You want to test the behaviour of your application when the anti-virus software reports a virus is found. When testing the deployed Sales Library application, the text file can be saved with a .ppt or .doc extension and then uploaded. The only content of the file should be the test string.
I have yet to find an anti-virus system that does not comply with this EICAR anti-virus test string. A simple test in your own environment will reveal if your anti-virus software does or not. I suspect that it will, and you can proceed with confidence that your hosted application is handling contaminated files properly for the protection of yours and your customers business.
Silicon Valley Code Camp 09
Attended Silicon Valley Code Camp this weekend. They had great sessions for people interested at looking at real code. Met some wonderful people really passionate about technologies.
Oracle had some interesting sessions there too.
http://www.siliconvalley-codecamp.com/
Recommended!
Silicon Valley Code Camp 09
Attended Silicon Valley Code Camp this weekend. They had great sessions for people interested at looking at real code. Met some wonderful people really passionate about technologies.
Oracle had some interesting sessions there too.
http://www.siliconvalley-codecamp.com/
Recommended!
The ultimate story about OCR, OCRMIRROR and 2 storage boxes – Chapter 3
This is a followup of chapter 2.
As we have seen in scenario 1, the OCR MASTER will update the votecount. Now let’s hide the ocrmirror from only 1 node: the node being the OCR MASTER, while the other node continues to see the ocrmirror. Will CRS get confused about this?
Note: while doing this test, crs is running on both nodes.
In this scenario, node 2 is the OCR MASTER. In fact I haven’t found any command to query who is the master. The only way to find out is to compare the crsd logfiles on all nodes to find the most recent message “I AM THE NEW OCR MASTER”. If anyone knows a better way for determining this, please let me know.
So when hiding the ocrmirror from node 2, we see in its alert file, as expected:
2008-07-23 09:14:53.921
[crsd(8215)]CRS-1006:The OCR location /dev/oracle/ocrmirror is inaccessible. Details in /app/oracle/crs/log/nodeb01/crsd/crsd.log.
and in its logfile:
2008-07-23 09:14:53.920: [ OCROSD][14]utwrite:3: problem writing the buffer 1a33000 buflen 4096 retval -1 phy_offset 143360 retry 0
2008-07-23 09:14:53.920: [ OCROSD][14]utwrite:4: problem writing the buffer errno 5 errstring I/O error
2008-07-23 09:14:53.922: [ OCRRAW][34]propriowv_bootbuf: Vote information on disk 0 [/dev/oracle/ocr] is adjusted from [1/2] to [2/2]
Nothing appears in the logfiles of the non-ocr-master, i.e. node 1. So until now this situation is still identical as in scenario 1: it is the ocr master who updates the votecount after loosing the other ocr.
The ocrcheck on node 2 (master) now gives:
Device/File Name : /dev/oracle/ocr Device/File integrity check succeeded Device/File Name : /dev/oracle/ocrmirror <span style="color: rgb(255, 128, 0);">Device/File unavailable</span> Cluster registry integrity check succeeded
But the output on node 1 (non-master) is different:
Device/File Name : /dev/oracle/ocr<br /> Device/File integrity check succeeded<br /> Device/File Name : /dev/oracle/ocrmirror <br /> <span style="color: rgb(255, 128, 0);">Device/File needs to be synchronized with the other device</span><br /> Cluster registry integrity check succeeded
This makes sense, because node 2 cannot see the device (device/file unavailable) while node 1 sees both devices with different vote count (2 votes for ocr and 1 vote for ocrmirror, so it asks to resync just as in scenario 1 after the ocrmirror was visible again).
So now I want to try to confuse CRS. I will try to resync the ocrmirror again from node 1. So this will update the vote count of each device to 1. Technically this is possible because node 1 can see both devices, but if it succeeds node 2 will be left with one ocr device having one vote., and we know from rule 3 that CRS cannot run in that case. Will crs then crash on node 2?…
So we do on node 1:
-bash-3.00# ocrconfig -replace ocrmirror /dev/oracle/ocrmirror
Bad luck, it fails with
PROT-21: Invalid parameter
Very clear, right… The interesting part however appears in the crsd logfile of node 2:
2008-07-23 09:19:34.712: [ OCROSD][32]utdvch:0:failed to open OCR file/disk /dev/oracle/ocrmirror, errno=5, os err string=I/O error
2008-07-23 09:19:34.712: [ OCRRAW][32]dev_replace: master could not verify the new disk (8)
[ OCRSRV][32]proas_replace_disk: Failed in changing configurations in the Master 8
So this learns us that, when the ocrconfig command is done on node 1 not being the master, that it will send this to node 2 being the master and node 2 will execute it. What NOT happens is that crs crashes, nor that node 1 takes over the mastership of node 2. Nice to know.
Very unlogical however is that, when doing the last command above, the crs alert file of node 2 shows
2008-07-23 09:19:34.711
[crsd(8215)]CRS-1007:The OCR/OCR mirror location was replaced by /dev/oracle/ocrmirror.
This is WRONG. The ocrmirror was not replaced. The message should be: “Trying to replace the OCR/OCR mirror location by /dev/oracle/ocrmirror”. It is just that you know it.
The logs on node 1 are correct. Find the latest log in the “client” directory and read:
Oracle Database 10g CRS Release 10.2.0.4.0 Production Copyright 1996, 2008 Oracle. All rights reserved.
2008-07-23 09:19:34.694: [ OCRCONF][1]ocrconfig starts…
2008-07-23 09:19:34.716: [ OCRCLI][1]proac_replace_dev:[/dev/oracle/ocrmirror]: Failed. Retval [8]
2008-07-23 09:19:34.716: [ OCRCONF][1]The input OCR device either is identical to the other device or cannot be opened
2008-07-23 09:19:34.716: [ OCRCONF][1]Exiting [status=failed]…
Conclusion: we cannot confuse the crs!
After making the ocrmirror visible again and reissuing the replace command on node 1, we get in the crs logfile on node 2 (master):
2008-07-23 09:27:15.384: [ OCRRAW][32]proprioo: for disk 0 (/dev/oracle/ocr), id match (1), my id set (1385758746,1866209186) total id sets (2), 1st set (1385758746,1866209186), 2nd set (1385758746,1866209186) my votes (2), total votes (2)
2008-07-23 09:27:15.384: [ OCRRAW][32]propriogid:1: INVALID FORMAT
2008-07-23 09:27:15.516: [ OCRRAW][32]propriowv_bootbuf: Vote information on disk 1 [/dev/oracle/ocrmirror] is adjusted from [0/0] to [1/2]
2008-07-23 09:27:15.517: [ OCRRAW][32]propriowv_bootbuf: Vote information on disk 0 [/dev/oracle/ocr] is adjusted from [2/2] to [1/2]
2008-07-23 09:27:15.518: [ OCRMAS][25]th_master: Deleted ver keys from cache (master)
2008-07-23 09:27:15.628: [ OCRMAS][25]th_master: Deleted ver keys from cache (master)
and the crs logfile of node 1 (non-master):
2008-07-23 09:27:15.543: [ OCRRAW][36]proprioo: for disk 0 (/dev/oracle/ocr), id match (1), my id set (1385758746,1866209186) total id sets (2), 1st set (1385758746,1866209186), 2nd set (1385758746,1866209186) my votes (1), total votes (2)
2008-07-23 09:27:15.543: [ OCRRAW][36]proprioo: for disk 1 (/dev/oracle/ocrmirror), id match (1), my id set (1385758746,1866209186) total id sets (2), 1st set (1385758746,1866209186), 2nd set (1385758746,1866209186) my votes (1), total votes (2)
2008-07-23 09:27:15.571: [ OCRMAS][25]th_master: Deleted ver keys from cache (non master)
2008-07-23 09:27:15.572: [ OCRMAS][25]th_master: Deleted ver keys from cache (non master)
and the client logfile of node 1:
Oracle Database 10g CRS Release 10.2.0.4.0 Production Copyright 1996, 2008 Oracle. All rights reserved.
2008-07-23 09:27:15.346: [ OCRCONF][1]ocrconfig starts…
2008-07-23 09:27:15.572: [ OCRCONF][1]Successfully replaced OCR and set block 0
2008-07-23 09:27:15.572: [ OCRCONF][1]Exiting [status=success]…
and all is ok again. Each device has one vote again, and we are back in the ‘normal’ situation.
ConclusionWe cannot confuse the CRS when ocr or ocrmirror disappears from the ocr master node only.
But what is it disappears from the non-master node…? That’s stuff for the next chapter.


New release of Lucene Domain Index based on Lucene 2.9.0
This new version uses latest Lucene 2.9.0 core libraries and introduces some of the changes on API.
Here complete list of changes:
- Tested with Oracle 11gR2, 11gR1 and 10.2 databases.
- DefaultUserDataStore do a SAX parsing to get text nodes and attributes from an XMLType value.
- A SimpleLRUCache is used to load rowids and his associated Lucene doc id, this reduce memory consumption when querying very big tables. A new parameter has been added, CachedRowIdSize by default 10000 to control the size of the LRU cache.
- Lucene Domain Index core was updated to use TopFieldCollector and to avoid computation time when lscore() is not used.
- Two new parameter has been added NormalizeScore which control when to track the Max Score and when querying, both parameters are consequence of new Lucene Collector API and boost the performance when querying.
- A table alias L$MT is defined for the master table associated to the index to be used in complex queries associating columns from master tables and columns from dependant tables.
Download binary version for Oracle 10g and 11g.
- Lucene score is computed and do not track maximum score, the result will be returned using relevance order descendant, default Lucene ordering no extra effort.
- Lucene score is not computed and obviously the maximum score is not tracked.
"conn / as sysdba" on Windows
Pages
