Showing posts with label Admin. Show all posts
Showing posts with label Admin. Show all posts

Saturday, March 22, 2025

Unlock the Maximo Start Center template via SQL

Maximo Start centers are useful to view different types of user data such as Workflow assignments, Result sets and other portals like Favourite applications, Bulletin board etc.

Each Start center is assigned to specific 'Security group' and Users can be granted 'access to edit' the portal themselves.

·    When a user opens the start center template to edit, a record will be inserted in SCCONFIG table with ‘groupnname as NULL’


·      If any other user tries to edit the same template, will get an error message as below.

·   Start center become locked for other user to edit and must wait until the main user Finish/Cancel the changes

·   In case, the main user is not reachable, or intermittently blocked access, it becomes impossible for others to edit.

·   There is a workaround to this by removing the entries in SCCONFIG, LAYOUT and other portal tables such as RSCONFIG, INBXCONFIG etc.


Here are the detailed steps.

1.  Query the SCCONFIG as below and get the layoutid

select scconfigid,* from scconfig (nolock) where sctemplateid=1601 and groupname is null;

2.  Query the SCCONFIG and LAYOUT tables using inner join to fetch related portal details.

select lo.scconfigid,layoutid,portletid,* from scconfig sc

inner join layout lo on sc.scconfigid=lo.scconfigid

where sc.sctemplateid=<>and sc.groupname is null and portletid<>'BBOARD'

Note: Bulletin board is not editable and no table for BBOARD. Hence it is excluded in the results.


Copy the LayoutIDs of each portal table.


 

3.  Generate and Execute the "Deletion Scripts' to remove entries from SCCONFIG, LAYOUT and Other Portal tables by using scconfigidlayoutid copied from above step.

delete from SCCONFIG where sctemplateid=<> and groupname is null and scconfigid=<scconfigid>;
delete from LAYOUT where scconfigid=<scconfigid>;
delete from ACTIONSCFG where layoutid=<layoutid>;
delete from FACONFIG where layoutid=<layoutid>;
delete from RSCONFIG where layoutid=<layoutid>;
delete from RSCONFIG where layoutid=<layoutid>; 
delete from INBXCONFIG where layoutid=<layoutid>;

Execute the script.

    Now, try opening the star center template, it will be editable.


Sunday, September 29, 2024

Power-Shell Script to check Maximo/Websphere Ports

Power-shell script to check port connection of Maximo servers and export result to .csv file.

Overview:

  • Maximo server use a variety of ports dedicated to specific function/application.
  • Ports at UI level (9080, 9081 etc). or RMI port are obvious and easy to validate. But other ports at NodeAgent, Deployment manager level and few JVM ports that are crucial for health of the application not often checked.
  • It is best practice to periodically check connection of these ports. Escpecially during any server upgrade/patching.
  • This article shares a method to automate this via powershell script.
  • We use 'tnc 'ServerName' -p '<portNumber>' as base code, which is recursively called  against a list of Ports and Servers. The Result is then printed to a .csv file a report.
Click here to view this article in Linked-in

Steps:

Retrieve the Port details from Webspshere for each JVM, Node Agent.

Create a powershell script in any text editor as explained below and save as .ps1 file.(We can execute this manually , or schedule a windows Job.)

  • Declare the output file with timestamp:

$today=Get-Date -Format "dd-MM-yyyy-HHmm";
$exportFilePath="C:\Maximo\HealthCheck\Reports\PROD_Server_Ports_Health"+$today+".csv";

  • Declare each server names to a variable.
$appSvr01="PRODMAXIMOAP01.orgxx.com"; 
$appSvr02="PRODMAXIMOAP01.orgxx.com"
$adminServer="PRODMAXIMOADM01.orgxx.com"

  • Declare list of ports of different type (JVM, Node Agent etc.)

 $JVMPorts="9080","9081","9082","9083";      

 $nodeAgentPorts="2810","9902","9203","9204","7273","8879","9630","7063","11005","11006"; 
$nodeAdminPorts="2810","9902","9203","9204","7273","8880","9630","7063","11007","11008"; 
$dmgrPorts="7277","9809","9632","8879","9100","9402","9060","9043","9352","7060","9420","11005","11006";

  • Declare List of Port Types in Seqence

$portTypeList = "JVM","JVM","NodeAgent","NodeAgent","NodeAdmin","Dmgr";

  • Now, declare List of all Servers and ports. That is combination of avove variables in correct sequence.
$serverList=$appSvr01,$appSvr02,$appSvr01,$appSvr02,$adminServer,$adminServer
$portListAll = $JVMPorts,$JVMPorts,$nodeAgentPorts,$nodeAgentPorts,$nodeAdminPorts,$dmgrPorts;

The sequence of values in each list should match the value of others. So that, when we itrate through these list, it matches with correct server and port.

Server

Port Type

Port List

AP01

JVM

"9080","9081","9082","9083"

AP01

JVM

"9080","9081","9082","9083"

AP01

NodeAgent

"2810","9902","9203",..."11006"

AP01

NodeAgent

"2810","9902","9203",..."11006"

ADM01

NodeManager

"2810","9902","9203",..."11008"

ADM01

Dmgr

"7277","9809","9632",..."11006"


  • Finally, iterate through the list of servers , for each server, test the list of ports and write the result.


Result:

The output of the script will generate .csv file with details as shown below.


Source Code:

$today=Get-Date -Format "dd-MM-yyyy-HHmm";
$exportFilePath="C:\Maximo\HealthCheck\Reports\PROD_Server_Ports_Health"+$today+".csv";

$appSvr01="PRODMAXIMOAP01.orgxx.com"; 
$appSvr02="PRODMAXIMOAP01.orgxx.com"
$adminServer="PRODMAXIMOADM01.orgxx.com"

$JVMPorts="9080","9081","9082","9083"
$nodeAgentPorts="2810","9902","9203","9204","7273","8879","9630","7063","11005","11006";
$nodeAdminPorts="2810","9902","9203","9204","7273","8880","9630","7063","11007","11008"; 
$dmgrPorts="7277","9809","9632","8879","9100","9402","9060","9043","9352","7060","9420","11005","11006";

#Declare combined PortList and ServerList in correct sequence.
#Such that, it matches relevant Port to Server as below
#AP01,AP02,AP01,AP02,ADM01,ADM01
#JVM,JVM,nAgnt,nAgnt,nAdmin,Dmgr

$serverList=$appSvr01,$appSvr02,$appSvr01,$appSvr02,$adminServer,$adminServer
$portListAll = $JVMPorts,$JVMPorts,$nodeAgentPorts,$nodeAgentPorts,$nodeAdminPorts,$dmgrPorts;
$portTypeList = "JVM","JVM","NodeAgent","NodeAgent","NodeAdmin","Dmgr";

$Result=
for ($i=0; $i -lt $serverList.Length; $i++){
$server=$serverList[$i];
$portList=$portListAll[$i];$portType=$portTypeList[$i];
foreach ($port in $portList)
{
$resultHashTable=[Ordered]@{
ServerName=$server
RemoteAddress=''
PortType=$portType
PortNumber=$port
Status=''
}
try{
$tncCheck=tnc $server -p $port 
$resultHashTable.ServerName=$tncCheck.ComputerName
$resultHashTable.RemoteAddress=$tncCheck.RemoteAddress
$resultHashTable.PortType=$portType
$resultHashTable.PortNumber=$tncCheck.RemotePort
$resultHashTable.Status=$tncCheck.TcpTestSucceeded
}
catch{
$resultHashTable.PingStatus='N/A'
$resultHashTable.Status='N/A'
}
[PSCustomObject]$resultHashTable
}
}
$Result|Export-Csv $exportFilePath

Launch Point Variables in Maximo: Beyond the Attribute Binding

Most Maximo developers are familiar with Launch Point Variables , but in real-world implementations, their usage is often limited to just on...