VMServer 2.0 Beta 1

December 15, 2007

I downloaded VMServer 2.0 Beta 1 today from here and installed it.   It has a web interface for creating and administering VM images.  It uses Tomcat webserver for this purpose. 

For several minutes I struggled to log in to the web console, because it is asking for username and password.  It never asked me these details while installing.  The username and passwords on tomcat-users.xml didn’t work.  Finally in the release note, I figured it out, that it uses OS authentication. 

But, again there is a small issue for me.  Since I only use my PC, i do not have passwords for the OS accounts.  But the VMWare web console doesn’t take an empty password. hmmmmmmm…… quite frustrating..  Finally I gave up and set password for my Windows OS account… Grrrrrrrr…

Finally, I could able to get into VMWare console.


Nice X-Window emulator

December 7, 2007

On Windows, at-least, once in a while DBAs need to remotely access the UNIX/Linux GUI tools such as OUI, DBCA etc from putty or an SSH client.   Tools like Exceed are very expensive and VNC port forwarding is a bit of complex solution (also you need vnc software).  

To overcome this, you can try this tiny little software called Xming.  The setup file is only about 2MB of size and very easy to install.  All you need to do is to start the Xming, open a putty session and check “Enable X11 Forwarding” option under SSH->X11.   Log into the Linux/Unix sever and straight away you can test it by running xlogo/xclock.  No need to even set the DISPLAY env variable.  Very nice indeed.

I just tried it and it is absolutely working fine :) .


Standby v$archived_log

December 7, 2007

It happened last week, that one of my colleague came to me in a hurry and said that the archived logs are not getting applied on standby (Oracle 10gR1).  When I went and checked the standby database, everything was OK.  It applied till the last archived log.  On the primary database side though, the status was ‘NO’ for few of the archive logs

Standby:

SQL> SELECT SEQUENCE#, ARCHIVED, APPLIED FROM V$ARCHIVED_LOG WHERE SEQUENCE# > 11210 ORDER BY SEQUENCE#;

SEQUENCE# DEST_ID ARC APP
———- ———- —
11211 YES YES
11212 YES YES
11213 YES YES
11214 YES YES
11215 YES YES
11216 YES YES
11217 YES YES
11218 YES YES
11219 YES YES

Primary:

SQL> SELECT SEQUENCE#, ARCHIVED, APPLIED FROM V$ARCHIVED_LOG WHERE DEST_ID = 2 AND SEQUENCE# > 11210 ORDER BY SEQUENCE#;

SEQUENCE# DEST_ID ARC APP
———- ———- —
11211  YES YES
11212  YES YES
11213  YES NO
11214  YES YES
11215  YES NO
11216  YES YES
11217  YES YES
11218  YES NO
11219  YES YES

 I did a search on metalink and came across this document ‘Note:263994.1This is what mentioned as cause :

“The cause of the problem is that the APPLIED column of V$ARCHIVED_LOG on the primary is not always updated. If the sequence number you look at was actually sent as a GAP (could not be sent originally and was later sent by an ARCH process as part of a FAL request).

In such a case the APPLIED column for that sequence number will not be updated. “

The conclusion is that, we cannot fully trust the v$archived_log on primary server.


Troubleshooting ORA-00600

December 4, 2007

Normally, the ORA-600 error will be displayed with a set of arguments. For example,

ORA-00600: internal error code, arguments: [12333], [0], [101], [2], [], [], [], []

1) You can then log in to metalink and use the ORA-600/ORA-7445 Troubleshooter
2) You have to provide the first argument of the error in this case it is 12333. Optionally you can choose your database version and submit.
3) Then the metalink reports the cause of the error, impact (any data corruption) and also it provides suggestions
4) But the better approach would be to raise a service request with oracle, because it is an internal error and only oracle technicians can interpret the trace files

Well, I have seen only two ORA-00600 errors this year, which needed no Oracle support. 

On the first instance, a DBA ran a create database script on an already running instance.  Then the instance started throwing ORA-00600 for few queries.  They bounced the instance and the issue was solved. Not sure if bouncing an instance would be a right approach.  What happens if the database refuse to come up? Luckily we did not face that issue.

On the second occasion, a java program calling a hierarchical query went in a nested loop causing ORA-00600.  The java program was later identified and fixed, thus resolving the ora-00600 error.

Of-course, we logged an service request with oracle on both occasions.

Every ORA-00600 is a different issue, though the error looks same.  The better approach would be to contact metalink support always.

Addendum on 27 March 2008 :

Since there are lot of people are hitting this page, I though it might be useful to give the URL of the ORA-600/ORA-7445 Troubleshooter (You need metalink access) :

https://metalink.oracle.com/metalink/plsql/f?p=130:14:782470108129457391::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,153788.1,1,1,1,helvetica

You can also refer to the following notes on metalink

Note:146580.1 Additional ORA-600 related information.
Note:211909.1 Additional ORA-7445 related


UTL_HTTP

December 3, 2007

Well, we all know about simple web application architecture.  It will have a servlet/jsp calling an backend procedure or function.  Is it possible to reverse it? i.e. can you call a servlet from a database procedure/function.  Yes!  It is possible with UTL_HTTP package in oracle.  Here is a sample :

DECLARE
 REQ_1 UTL_HTTP.REQ_1;
 RESP_1 UTL_HTTP.RESP_1;
 VALUE VARCHAR2(1024);
BEGIN
  REQ_1 := UTL_HTTP.BEGIN_REQUEST('HTTP://www.yoursite.com:8988/servletpath/servlet');
  UTL_HTTP.SET_HEADER(REQ_1, 'USER-AGENT', 'MOZILLA/4.0');
  RESP_1 := UTL_HTTP.GET_RESPONSE(REQ_1);
  LOOP
  UTL_HTTP.READ_LINE(RESP_1, VALUE, TRUE);
  DBMS_OUTPUT.PUT_LINE(VALUE);
  END LOOP;
  UTL_HTTP.END_RESPONSE(RESP_1);
EXCEPTION
  WHEN UTL_HTTP.END_OF_BODY THEN
  UTL_HTTP.END_RESPONSE(RESP_1);
END;
 

One of my developer colleague wanted to test this functionality, so we tested this on 10g.  And it really worked nicely.