Thursday, 30 November 2017

How to create a READ_ONLY User in Database | Oracle

1. connect with sqlplus with dba rights
sqlplus / as sysdba

2. create a simple user and give password:
create user test identified by test;
3. Give some grants to newly created user, like create session, and select
grant CREATE SESSION to test;
grant SELECT ANY TABLE to test;
:)

Wednesday, 29 November 2017

How to Find Serial Number of your Computer | Windows

run this command in your command prompt:

WMIC BIOS GET SERIALNUMBER

Generate Alert Notification on Condition Monitoring Warning Limits Using Escalations | IBM Maximo

We can generate alert notification email in IBM Maximo condition monitoring application when the measurement value of gauge meter crosses the upper or lower warning limit. The following escalation will generate the email when the measurement value for the asset meter is between upper and lower warning and action limits.



  1. OBJECT:          MEASUREMENT

Wednesday, 8 November 2017

Stop Work Order From Closing or Completing Without Entering Actual Labor (Including Task Labor Work Order Array) | IBM Maximo

We will use automation script from stopping users from closing or completing workorder without actual labor transaction which also includes task work order labor array.

  • Launch Point: Object Lauch Point
  • Business object:  WORKORDER
  • Variables: 
    • var_act_lab bind with array using relation LABTRANS.LABTRANSID*
    • var_task_lab  bind with array of task work order relation WOACTIVITY.LABTRANS.LABTRANSID*
  • Create error message in database configuration with errorgroup = 'wo' and errorkey = 'act_lab_exists'
  • Condition: :status in ('COMP', 'CLOSE')

Wednesday, 1 November 2017

Monday, 23 October 2017

Syslog Configuration in Routers | Cisco

Syslog Configuration in Packet Tracer

router >
enable
configure terminal
int fa 0/1
ip address 192.168.0.100 255.255.255.0
no shutdown
exit
logging 192.168.0.1 #ip of syslog server


now connect a Syslog server with router int fa0/1
and set ip same as mentioned in logging 192.168.0.1


:) we are done.


Port Mirroring, Switch Port Analyzer (SPAN) or Sniffing | Cisco

Port Mirroring, Switch Port Analyzer (SPAN) or Sniffing

switch>
enable
config terminal
monitor session 1 source inter fa 0/1
monitor session 1 source inter fa 0/2
monitor session 1 destination int fa 0/24
exit
show monitor

done:)

Monday, 16 October 2017

Anonymize or Replace text within a File using SED | Linux

Stream Editor aka 'sed' is a *nix utility to transform and parse text.

for example.
if a file testing.txt contains some text like ' helloworld.zip ',  it will be replace with any text or we can use $RANDOM function also.
sed s/hello.*zip/"hello://$RANDOM.zip"/g testing.txt
the final result will be like this:
hello12345.zip (any random number)
/g means all occurrence of this text


Friday, 13 October 2017

Find and Delete All Files Older than 10 Days using mtime | Linux

#to file files older than 10 days:
find /home/folder/ -mtime +10;

#now append it with -exec switch +  rm {} loop to delete all found files:
find /home/folder/ -mtime +10 -exec rm {} \;

----------------------
#and to find only in specific directory ignore sub directories

find /home/folder/ -maxdepth 1 -mtime +10

Monday, 9 October 2017

Install and Configure Target iSCSI Server on Windows Server 2012 | Windows

1. in Add new Role and Feature > Navigate to Server Roles
2. under File and Storage Services > Check iSCSI Target Server > > Install.

3. again in Server Manager, a new File and Storage Services has added,
Click on Launch the new Virtual Disk wizard to create Virtual Disk

Select iSCSI virtual disk Location: Select Drive/ or custom Path
Next
Specify iSCSI virtual disk size:  10GB
iSCSI Target. New iSCSI Target > Next
Target Name and Action : any name > Next
Access Servers (list initiators so the disk be presented to only these): ADD by IQN or IP etc
Next > Create(b).
Close(b).
-------------------------------
on Client as Initiator: 

Start iSCSI Initiator
Targets(T): Target: enter IP (ie. 10.1.1.100), Quick Connect(b)
Done(b)

now verify in Disk Management, a new disk is added with 10GB space. 

Thursday, 28 September 2017

Creating a Dialog Window | IBM Maximo

You can add a new dialog window to a specific application or you can make it
available for use by all applications. You must modify an XML file to create a
dialog window and import the modified file into the Application Designer. After
importing it, you can modify the new dialog window in the Application Designer.

Procedure:
  • In the Application Designer, export one of the following XML files:
    • In the List tab, click Export System XML in the Select Action menu to export the library.xml file if you want to add a new dialog for use by all applications.
    • In the Workspace tab, click the Export Application Definition icon to export the presentation.xml file if you want to add a new dialog for use by a specific application.
  • The XML definition opens in a new browser window.
  • Save the XML definition to a local file and open it with a text editor.

Sunday, 24 September 2017

Enforce Unique Key & Fetch Records From Unsaved MBO Using Automation Script | IBM Maximo


This automation scripts describes the enforcing of unique key to the object, Fetching and looping through unsaved rows of MBO Set from memory.
We have taken the example of restricting the users from selecting same itemnum multiple times in spare parts of asset. It works on both saved and unsaved objects.

Launch Point: Attribute Lauch Point
Business object:  SPAREPART
Attribute: ITEMNUM
Variable: ar_item bind with ITEMNUM of object SPAREPART

Increase The Workflow Map Display Size Maximo | IBM Maximo


Please follow the provided steps below:
  • Go to Directory  ...\maximo\applications\maximo\maximouiweb\webmodule\webclient\css
  • Search for the file maximo.css
  • Change the height/width in the wfmd tag which looks like this:
         /* wfmapdiv */
         .wfmd
         {
         width:800px;
         height:375px;
         border:1px solid #999999;
         overflow:auto;
         }

Friday, 22 September 2017

Increase "Systems" Window Display Size On Asset/ Location Drilldown | IBM Maximo


Some users complaint that the "Systems" window display size is very small on asset/ location drilldown as shown in the screenshot below.




Solution:
  1. Open the Application Designer and select the Export System XML action from the menu. 
  2. Click on the small arrow for the LIBRARY row to export the file. 
  3. Open the XML file with a good text editor and search for "system".

Wednesday, 20 September 2017

Synchronizing Active Workflow Processes without Creating Revision of Main Process | IBM Maximo

A workflow process can include one or more sub-processes. When you modify a sub-process, you must update the main process so that it uses the revised sub-process. This process is known as synchronization.
You must enable the sub-process revisions before you can synchronize a workflow process.
Solution:
  1. In the Workflow Designer application, Create the sub-process revision and Enable it.

Assigning Meters/ Meters Group To Multiple Existing Assets Using Asset Templates | IBM Maximo


  1. Click Go To > Assets > Asset Templates
  2. Click on ‘New Asset Template’
  3. Click on ‘Meters’ tab and enter the following.
  4. Do not enter any other detail on asset template (except template code and description).
  5. Save the record

Monday, 18 September 2017

Difference between sqlplus /nolog & Sys as sysdba


sqlplus /nolog :
you are not connecting to any user, instance or database;

sqlplus / as sysdba :
you are connected with 'SYS' through os authentication if enabled with ORACLE_SID. 

Wednesday, 9 August 2017

What is inode in Linux and IF You are Out of It (solution) | Linux

inode is basically a count of total number of files in directories of a user account in *nix systems.

similar to a unique identification of individuals in a country.

inode is data structure , it contains:
size,
user id,
group id
device id,
mode and access
protection
timestamps
links
points
etc.
except file name, and contents. 


Tuesday, 8 August 2017

How to Reset Cisco 26xx, 28xx Series Router (Password Recovery) | Cisco

Reboot your router and hold CTR+BREAK sequence to enter into Rommon mode. and enter these 2 commands

rommon 1 > confreg 0x2142
rommon 2 > reset
done :)

Now revert your router sequence back to normal:

Router>enable
Router#config terminal
Router(config)#config-register 0x2102
Router(config)#exit
done:) 

Thursday, 25 May 2017

Embed HTML in Maximo Labels | IBM Maximo

Suppose we want to color the label of prnum in PR application.

1. in application designer, open property dialog of desired control. (PR in my case)
2. copy and paste below mentioned html label field in control properties:

<font style="background-color:blue; color:white; font-weight:bold;">PR</font>

3. Save and we are done :)

Thursday, 18 May 2017

Sequence Error when Uploading Assets using MIF | IBM Maximo

for instance look at this error:
BMXAA8010E - An asset with the asset identifier 16,058 already exists. Enter a new asset identifier

Solution is very easy , just need to increment object's sequence (asset in my case)

Run these below mentioned command one by one in sqldeveloper(Oracle):

1. Increment of 10,000 in AssetIdSeq sequence:
ALTER SEQUENCE assetidseq INCREMENT BY 10000;

2. Now run this select command once to update Asset Sequence Id
SELECT assetidseq.nextval FROM DUAL;

3. in last run this command to set Asset's Sequence back to routine:
ALTER SEQUENCE assetidseq INCREMENT BY 1;

Reference: http://www-01.ibm.com/support/docview.wss?uid=swg21998810

Tuesday, 9 May 2017

Keyattribute in Custom Application for Better Search | IBM Maximo

1. Export presentation xml
2. Append keyattribute=<custom filed>
(for example, in PR application, db unique field is PRID, but for as end user we use PRNUM)

<presentation id="PRID" keyattribute="PRNUM" ismobile="false" mboname="CUSTOMPR" resultstableid="results_showlist" version="6.0.0">



Monday, 8 May 2017

Sort out of the box lookups using ORDERBY by using LOOKUP.XML - IBM Maximo

1. Open LOOKUP.XML in your favorite editor, mine is Notepad++ and find html tag looks like this:

<table id="worktype" inputmode="readonly" selectmode="single"
2. append this line and add where clause, and it will become like this:
<table id="worktype" inputmode="readonly" selectmode="single" orderby=" REPORTDATE desc">

Monday, 1 May 2017

Shortest Way to Create a Custom Lookup (MBONAME attribute in xml) | IBM Maximo

1.Insert this into looksup.xml
<table id="custum_lookup" inputmode="readonly" mboname="custom_object" selectmode="single">
<tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="custum_lookup_lookup_tablebody">
<tablecol dataattribute="description" id="custum_lookup_lookup_tablebody_col_2" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
</tablebody>
</table>

2. Add this table id (custum_lookup) as lookup in application designer.
3. Add source and target in Edit Lookup Map.

We are done :)
-------------------------------
another example with whereclause

Wednesday, 19 April 2017

Duplicate Start Center Template | IBM Maximo

1. Create a new empty Start Center Template, Save and write down sctemplateid.

Now run these SQL queries and modify source and targetIds:

update MAXIMO.SCTEMPLATE
set presentation=(SELECT presentation FROM MAXIMO.SCTEMPLATE where      sctemplateid=<SourceID>)
where sctemplateid=<TargetID>;

update SCTEMPLATE set PRESENTATION=replace(PRESENTATION,'startcenter contentuid="<sourceID>"','startcenter contentuid="<TargetID>"'), where sctemplateid=<new SCTEMPLATEID>;