February 20, 2013

Find all custom triggers on Maximo tables

Before Maximo 6 it was a common practice to implement customizations using database triggers. Although Conditional Expressions, SigOptions, Java coding and scripting are now available in Maximo 7, I still see many Maximo environments with a lot of database triggers.
In a recent project I have found a Maximo system with more than 30 triggers and many of these were used to send emails to specific users. Since those emails were sent synchronously during inserts and updates, they were causing lots of performance issues.
For consultants like me it may be useful to have a set of SQL statements to run against a Maximo database to have a quick grasp of the level of customizations.

Here are the statements I have developed to find all the custom triggers defined on Maximo tables. The tag [MXSCHEMA] must be replaced with the schema where Maximo tables are stored.
NOTE: The queries are not 100% accurate because some built-in triggers does not comply to the naming convention [TABLENAME]_T

Oracle

SELECT table_name, trigger_name
FROM all_triggers
WHERE owner='[MXSCHEMA]'
AND trigger_name NOT LIKE table_name||'_T'
AND status='ENABLED'
ORDER BY table_name;


IBM DB2

SELECT tbname, name
FROM sysibm.systriggers
WHERE schema='[MXSCHEMA]'
AND name NOT LIKE tbname||'_T'
AND name NOT LIKE tbname||'_U'
ORDER BY tbname;


SQL Server

SELECT
  sysobjects.name AS trigger_name
  ,USER_NAME(sysobjects.uid) AS trigger_owner
  ,s.name AS table_schema
  ,OBJECT_NAME(parent_obj) AS table_name
  ,OBJECTPROPERTY( id, 'ExecIsUpdateTrigger') AS isupdate
  ,OBJECTPROPERTY( id, 'ExecIsDeleteTrigger') AS isdelete
  ,OBJECTPROPERTY( id, 'ExecIsInsertTrigger') AS isinsert
  ,OBJECTPROPERTY( id, 'ExecIsAfterTrigger') AS isafter
  ,OBJECTPROPERTY( id, 'ExecIsInsteadOfTrigger') AS isinsteadof
  ,OBJECTPROPERTY(id, 'ExecIsTriggerDisabled') AS [disabled]
FROM sysobjects
INNER JOIN sys.tables t ON sysobjects.parent_obj = t.object_id
INNER JOIN sys.schemas s ON t.schema_id = s.schema_id
WHERE sysobjects.type = 'TR';

Thanks MyGeekDaddy

February 13, 2013

How to fix Office 2007 attachments downloaded as zip files

Few times I have found a small but annoying issue on Maximo when attaching Office 2007 files. Do you know those Excel, Word, PowerPoint files with xlsx, docx, pptx extensions? Yes, those!

If you are using Microsoft Internet Explorer it may happen that these files can be uploaded successfully into your DOCLINKS folder but when you try to retrieve them they are downloaded as zip files.
If you have this problem here is the solution for you.

Edit httpd.conf file of your IBM HTTP Server (look in the conf subdirectory) and add the following section at the end of it.

AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

Save the httpd.conf file and restart the HTTP Server.
Now you should be able to download those files without any problem.

Here is the original article where I have found the solution.

UPDATE! John spotted an IBM TechNote describing the official solution.

February 4, 2013

Multiple browser sessions

Did you ever need to open multiple Maximo UI sessions?
If you want to perform work in parallel to become more productive, you can launch multiple browser tabs or windows as the same user.
You only need to use a URL like this to connect to your Maximo server:
     http://[MXHOST]/maximo/ui/login

When this procedure is followed correctly, each browser tab will receive its own unique uisessionid allowing to work concurrently with multiple browser's tabs.

For more details check out the original article on developerWorks.
If you have problems in your environment to use this technique you should take a look at this IBM TechNote.