Pages

Tuesday, January 27, 2009

Fun with clntsh

Installing iAS 10.1.2.2 onto an Oracle oms grid control box.

Got the following error during linking, looks to be a Solaris 10 + 10R2 issue.

ld: fatal: file /u01/app/oracle/product/oms10g//lib32//libclntsh.so: unknown file type
ld: fatal: File processing errors. No output written to webcached
*** Error code 1
make: Fatal error: Command failed for target `webcached'

Here's the fix:

Edit $ORACLE_HOME/genclntsh
Change LD="ld -m -i -G -z text -L${ORACLE_HOME}/${LIB}"
to LD="ld -m -i -G -z text -L${ORACLE_HOME}/${LIB} -Bsymbolic"

Then run $ORACLE_HOME/bin/genclntsh

Then retry the linking phase.

Tuesday, January 20, 2009

Sometimes it's just a login issue.

Trying to install iAS 10.1.2.2 on a 10.1.0.2 server, I got the following error, among others, while updating OC4J:

FAILED!
ERROR: Caught exception while undeploying 'portletapp' from 'home':
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at oracle.j2ee.tools.deploy.Oc4jDeploy.doDeploy(Unknown Source)
at oracle.j2ee.tools.deploy.Oc4jDeploy.execute(Unknown Source)
at oracle.j2ee.tools.deploy.Oc4jDeploy.deploy(Unknown Source)
at oracle.j2ee.tools.deploy.Oc4jDeploy.main(Unknown Source)
Caused by: com.evermind.client.orion.AdminCommandException: Could not connect to the remote server. Please check if the server is down or the client is using invalid host, ORMI port or password to connect: Connection refused
at com.evermind.client.orion.Oc4jAdminConsole.executeCommand(Oc4jAdminConsole.java:115)
Also got an error with wsrp-samples.

After spending quite a bit of time looking at log files, and finding nothing interesting, I realized it was a password issue.

Earlier in the day I had followed an oracle doc to reset ias_admin's password from emctl prior to installing the update.

Here's the thing -- to _really_ set the password, you have to login to iasconsole and change it there. Apparently that changes the passwords in more places than emctl does.

Problem solved.

Wednesday, January 7, 2009

Selecting on dates using the interval clause.

When I've wanted to select all records in the last day or the last couple hours I've done a query like the following:


-- select records from the last day
select count(*) from table where some_date > sysdate - 1;

-- Select records from the last 3 hours
select count(*) from table where some_date > sysdate - 3/24;


Starting in 9i there's another way to do this.

-- select records from the last day
select count(*) from table where some_date > sysdate - interval '1' day;

-- Select records from the last 3 hours
select count(*) from table where some_date > sysdate - interval '3' hour;