Friday, October 23, 2009

ORA-24062 ( Subscriber table inconsistent with queue table)

Surprisingly little search results in either google, the oracle fora, or metalink for this error. Ran into this today, and could drop an recreate the queues:
SQL> BEGIN
2 SYS.DBMS_AQADM.STOP_QUEUE(QUEUE_NAME =>'TAB_OWNER.TB_BTR_Q_OPDR');
3 SYS.DBMS_AQADM.DROP_QUEUE(QUEUE_NAME =>'TAB_OWNER.TB_BTR_Q_OPDR');
4 END;
5 /
BEGIN
*
ERROR at line 1:
ORA-24062: Subscriber table TAB_OWNER.AQ$_TB_BTR_Q_TBL_S inconsistent with
queue table TAB_OWNER.TB_BTR_Q_TBL
ORA-06512: at "SYS.DBMS_AQADM_SYS", line 4932
ORA-06512: at "SYS.DBMS_AQADM", line 240
ORA-06512: at line 2

The solution is drastic: for each error, reporting the table, force a drop of that table:
SQL> exec SYS.DBMS_AQADM.DROP_QUEUE_TABLE (
QUEUE_table => 'TAB_OWNER.TB_BTR_Q_TBL',
force=>TRUE);

PL/SQL procedure successfully completed.

After that, recreate the queues and queue tables.

Friday, September 11, 2009

HP-UX: UnsatisfiedLinkError exception loading native library: njni10

Ran into this today whilst applying patch 10.1.4.3 on Identity Management installs. Causes the Directory Intergration Platform (DIP) upgrade to fail. As there are some nice features, quite important. I want that to run, and run correctly!

Three things to check/do:

export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export SHLIB_PATH=$ORACLE_HOME/lib32

Then you can rerun the configuration wizards again, assuring you have enough resources - use the setmemwindow:

setmemwindow -i 20 $ORACLE_HOME/cfgtoollogs/configToolCommands


So not just only when running DBCA, or NETCA, or DBUA; there it was an OID install (the infrastucture).
Edit: maybe check the existance of the files first? Search libnjni10.so; should be in lib as well as lib32, but different sizes.

Thursday, September 10, 2009

Upgrade IDM from 10.1.2 to 10.1.4: dba_registry invalid OID

After you upgrade Oracle identity management from 10.1.2(.2) to 10.1.4.0, you will notice that Oracle Internet Directory is listed as Invalid:


idm01@xxxxxxx:/home/idm01> sqlplus / as sysdba
SQL> set lines 132 pages 99
SQL> col version format a10
SQL> col status format a15
SQL> col comp_name for a65
SQL> select COMP_NAME,VERSION,STATUS from dba_registry;
COMP_NAME VERSION STATUS
------------------------------------------------------- ---------- ---------------
Oracle Application Server Portal 10.1.2.0.2 VALID
Oracle Application Server Single Sign-On 10.1.4.0.1 VALID
.
Oracle Internet Directory 10.1.2.0.2 INVALID



The solution is to:
Check $ORACLE_HOME/ldap/admin/LOGS/ldapupgrade.log in the OID (infrastructure) install for errors.
Check for invalid objects and compile them:

select owner,object_name,object_type from dba_objects
where owner='ODS' and status='INVALID';

returned package ridelplg as invalid.

Finally, run this code:

alter session set current_schema = SYS;

declare
rc integer;
begin
rc := ods.ldapUpgUtls.validateODS();
if rc = 0 then
DBMS_IAS_VERSION.SET_COMPONENT_VALID(COMPONENT_ID=>'OID');
else
DBMS_IAS_VERSION.SET_COMPONENT_INVALID(COMPONENT_ID=>'OID');
end if;
end;
/



According to Metalink Doc ID: 374304.1, you should first call

execute DBMS_IAS_VERSION.SET_COMPONENT_UPGRADED(COMPONENT_ID=>'OID');

This, however, reset your version to 10.1.2.0.2 (whereas it was 10.1.2.2.0 when I started...). It should be 10.1.4.0.1.
Edit: After applying patch 10.1.4.3, it states version as 10.1.4.3.0.

Thursday, September 03, 2009

Actieve DonorRegistratiesysteem

Ik heb zojuist mijn steun gegeven aan de campagne 2 Miljoen Handtekeningen. Het doel van deze campagne is de invoer van het Actieve DonorRegistratiesysteem (ADR).

Bij deze zou ik jou willen vragen om de petitie ook te ondertekenen op de site www.2miljoenhandtekeningen.nl
Mocht je eerst meer willen weten over de campagne of het ADR dan kun je al die informatie ook op de site vinden.

Daarnaast het verzoek mail te sturen naar al jouw vrienden om de campagne bij een groot publiek onder de aandacht te brengen.
Namens mij en de Stichting 2 Miljoen Handtekeningen, alvast hartelijk bedankt!

Tuesday, July 14, 2009

Oracle 10, Apex 3, PDF printing and ORA-20001

I have been struggling to get Apex 3.2 to print PDF, using BI Publisher.
Time and time again, the developer reported he got the -by now- dreaded error:
"ORA-20001: The printing engine could not be reached because either the URL specified is incorrect or a proxy URL needs to be specified."
Because I spent quite a lot of time researching this, and the solution was so simple, this entry.
Please be warned: this error is to be expected when using 11G and the database listener.
This error also seems to manifest when you use the defaults, which do not seem to get accepted; instead: fill out the fields (with Print server host address 'localhost' and port '8888')

In my case, however, it turned out to be a space, following the port number.
Hope this helps somebody to save some time...

Edit: see this entry for setting this up in a run-time only environment.
Edit: see this entry if you run into an ORA-20001 with Oracle 11G

Friday, May 15, 2009

Apex runtime maintenance: wwv_flow_api and #IMAGE_PREFIX#

For some reason, the most important API within Apex is not well documented. I was asked to change the image prefix in an Apex environment.

GUI

Using the Graphical User Interface, or GUI, it would have been easy:
  1. On the Workspace home page, click the Application Builder icon.
  2. Select an application.
  3. On the Application home page, click Shared Components.
  4. Under Application, select Definition.
  5. When the Edit Application Definition page appears, locate the Image Prefix field.

However... this was a run-time only install. And much to my astonishment, there is no APEX API to change the image prefix for an application.

wwv_flow_api

After inspection of an Apex application import file, I found the wwv_flow_api procedure is used to create the flow, and define the image prefix (hint: you can change it in the import file, before import). And sure enough, there is a procedure set_image_prefix:
procedure set_image_prefix (
  p_flow_id in number default null,
  p_image_prefix in varchar2 default null)
;

So, basically, you want this:

begin
wwv_flow_api.set_security_group_id(p_security_group_id=>
APEX_UTIL.FIND_SECURITY_GROUP_ID('APP1'));
wwv_flow_api.set_image_prefix(p_image_prefix=>'/i32', p_flow_id=>100);
end;
/

It does no more than update the wwv_flows table, it seems:

SQL> col FLOW_IMAGE_PREFIX for a10
SQL> select id, flow_image_prefix from FLOWS_030100.wwv_flows;

ID FLOW_IMAGE
---------- ----------
100 /i/
4411 /i/
4155 /i/

SQL> begin
2 wwv_flow_api.set_security_group_id(p_security_group_id=>
3 APEX_UTIL.FIND_SECURITY_GROUP_ID('APP1'));
4 wwv_flow_api.set_image_prefix(p_image_prefix=>'/i32/', p_flow_id=>100);
5 end;
6 /

PL/SQL procedure successfully completed.
SQL> select id, flow_image_prefix from FLOWS_030100.wwv_flows;
ID FLOW_IMAGE
---------- ----------
100 /i32/
4411 /i/
4155 /i/

SQL> rollback;

By the way: changing the prefix overall is done by running the reset_image_prefix.sql script, which can be found in the utilities subdirectory of your apex source code.

Thursday, May 14, 2009

Project Raw Iron, pardon me, Virtual Iron

Crisis? What crisis?

Never heard of the company (Virtual Iron, that is), and wonder if this would be an "if you can't beat them..." action. What would the impact be on Oracle's Linux fork?