Search This Blog

Friday, January 17, 2014

Oracle OIM11gR2 finding the uploaded jar files

Thanks again to my colleagues for pointing this out.

The jar files you uploaded through UploadJars.sh are contained in the OIMHOME_JARS table.  It doesn't appear to use the update date so you will need to download the BLOB and SHA1 it to see if it is exactly what you expected to see.

Here's a hint.  Don't use a version numbered file for Java Tasks jar files.  You basically have to maintain that version number forever.  Better to use the non-version numbered jar file for deployment and use SHA1 to check a version numbered copy against what you have deployed.

Update: you can use a version numbered jar file for Java Tasks jar files.  The only issue is that you will see references to the older versions in the task adapters and you may be confused.  It is not an issue and the class loader will go to the new jar file.

Oracle Diagnostic Logging on Weblogic - Manual Modifications

My last post on this subject involved setup.  If you are a situation where you have classes in packages such as com.mycompany.subject.specificarea and you log into the ODL logging area, you can't easily search on com.  This is why I suggested your class packages are something more like mycompany.subject.specificarea leaving off the com part.

You can search on you mycompany name in the ODL log configuration page, but you won't get the high level box like if you search on com.  And so you have to change the logging level of each individual class, and if the class you are developing has never been called, it will not be in the list.  How to fix?

Start by setting a persistent log level for one of the classes in your package structure.  Don't do it for a second or more, that's overkill.  Next, save and log out of EM.

Next, log into your server and navigate to the domain for your admin server.  Then navigate to config/fmwconfig/servers/oim_server1 (or whatever your server name is) and then edit logging.xml

Find the section which contains your class name that you just modified.  Trim back the name as far back as you desire.  Generally I leave the com.mycompany

Log levels in this file are:

INCIDENT_ERROR:1 (SEVERE+100)

ERROR:1 (SEVERE)
WARNING:1 (WARN)
WARNING:32
NOTIFICATION:1 (INFO)
NOTIFICATION:16 (CONFIG)
NOTIFICATION:32
TRACE:1 (FINE)
TRACE:16 (FINER)
TRACE:32 (FINEST)

Restart the managed server.





Sunday, January 5, 2014

OIM11gR2 running design console on Windows machine

To run the design console on Windows:

Make sure you have a version of JRockit 1.6 on your Windows machine and have that path in your JAVA_HOME environment variable.

On the OIM machine, cd to $OIM_ORACLE_HOME which should be defined as $MW_HOME/Oracle_IDM1
Next, zip up the designconsole folder like this:

$ zip -r ~/designconsole.zip designconsole

Copy that file to your windows machine into a folder that reflects the environment it will connect to.

Unzip the file so it creates a designconsole folder with the xlclient.cmd file in that folder.

Edit the xlclient.cmd file.
Change the first part of the command to read "%JAVA_HOME%\bin\java"

Change the HOME_DIR to read -DXL.HomeDir=.

That's a single dot to indicate the current folder.

Change the auth to read:
-Djava.security.auth.login.config=config\authwl.conf

Save the file.

Now go back to the workstation and copy the following files to the ext folder:

$MW_HOME/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar

At the very end of the classpath.bat file, there is a reference to the oracle_common/modules/jrf folder associated with the jrf-api.jar file.  Fix that so it references the ext folder.

This should allow you to double-click on the xlclient.cmd file to start the design console.

Oracle database scripts I like to use:

This blog is for my reference in quickly getting to Oracle database scripts I like to use.  Some of these are taken from other websites either verbatim or customized to my own preferences.

show_profiles.sql

clear breaks
set linesize 120
set pagesize 10000
select * from dba_profiles order by profile, resource_name;


show_users.sql

clear breaks
set linesize 120
set pagesize 10000
select username, profile, account_status from dba_users;


show_tablespaces.sql

clear breaks
SET linesize 130
SET pagesize 60
break ON tablespace_name skip 1
col tablespace_name format a15
col file_name format a50
col tablespace_kb heading 'TABLESPACE|TOTAL KB'
col kbytes_free heading 'TOTAL FREE|KBYTES'
SELECT dd.tablespace_name tablespace_name, dd.file_name file_name, dd.bytes/1024 TABLESPACE_KB, SUM(fs.bytes)/1024 KBYTES_FREE, MAX(fs.bytes)/1024 NEXT_FREE
FROM sys.dba_free_space fs, sys.dba_data_files dd
WHERE dd.tablespace_name = fs.tablespace_name
AND dd.file_id = fs.file_id
GROUP BY dd.tablespace_name, dd.file_name, dd.bytes/1024
ORDER BY dd.tablespace_name, dd.file_name;


show_datafiles.sql

clear breaks
set linesize 120
set pagesize 10000
col file_name format a70
col tablespace_name format a20
SELECT file_name, tablespace_name, ROUND(bytes/1024000) MB
FROM dba_data_files
ORDER BY 1;


show_freespace.sql

clear breaks
set linesize 120
set pagesize 10000
SELECT df.tablespace_name TABLESPACE, df.total_space TOTAL_SPACE,
fs.free_space FREE_SPACE, df.total_space_mb TOTAL_SPACE_MB,
(df.total_space_mb - fs.free_space_mb) USED_SPACE_MB,
fs.free_space_mb FREE_SPACE_MB,
ROUND(100 * (fs.free_space / df.total_space),2) PCT_FREE
FROM (SELECT tablespace_name, SUM(bytes) TOTAL_SPACE,
      ROUND(SUM(bytes) / 1048576) TOTAL_SPACE_MB
      FROM dba_data_files
      GROUP BY tablespace_name) df,
     (SELECT tablespace_name, SUM(bytes) FREE_SPACE,
       ROUND(SUM(bytes) / 1048576) FREE_SPACE_MB
       FROM dba_free_space
       GROUP BY tablespace_name) fs
WHERE df.tablespace_name = fs.tablespace_name(+)
ORDER BY fs.tablespace_name;


show_tables.sql <- uses a parameter

clear breaks
set linesize 120
set pagesize 10000
select owner, table_name, tablespace_name
from dba_tables
where tablespace_name='&1';


Here is a great link on formatting: 

And another link on selecting the first few rows: