Monday, 28 December 2020

Split string and extract nth word in Oracle

  

Split string and extract nth word in Oracle


Here I am taking 5 word from string glaccount example 


222-333-23434-2222333-000-0000-888

select REGEXP_SUBSTR(glaccount, '[^-]+', 1, 3) AS glaccount from Workorder

Output : 23434 


Here  we are separting word with delimitter - if you have comma replace hiphen with comma.

Tuesday, 22 December 2020

Giving error in Automation Script on Object Creation or New Row

 Giving error in Maximo on New Row using Automation Script


Give exception to user on click of New Row :-


For this you need to use Object Creation type object launchpoint which is equivalent to canAdd Method in Maximo MBo's


and give this 

service.error("MESSAGEGROUP",MESSAGEKEY")

Friday, 18 December 2020

Getting Mboset from session / Getting Mboset from Memory

Getting Mboset from session / Getting Mboset from Memory  


This is typical sometimes you need to supply attribute of newly created MBO like id field to a child object which is in Memory on save of object. 


When we do getMboSet ()  we don't get this object because its in Memory and get Mboset get it from db via relationship



Inorder to do this you need to explicity get object from MXserver.getMboset() and then 

call Add() method and save it. Now in child Mbo you will get that object.

BMXAA7135E - The Boolean value of Object.attribute cannot be retrieved. BMXAA4118I - The Boolean field is blank and requires a value.

 If this error occurs in your new customization then don't change boolean value on initialize 

because at initialize it will be blank although you suppied default to 0 but it will not catch this value.

Thursday, 19 November 2020

Cisco Anyconnect error : Failed To Load Preferences

 Failed To Load Preferences



If you get this error which connecting VPN using cysco anyconnect.


Simple go to C:\programfiles\ciscoanyconnect\ folder


rename file to OldProfile and restore profile from backup.

Thursday, 15 October 2020

Maximo Classification is readonly on Asset Application

 If you have asset with rotating item associated to it you can't change its classification, to change its classification you need to remove by select action change item number and classification becomes editable on asset application.

Maximo Matrectrans is readonly cant able to recieve partial shipment

 This is a bug steps to reproduce it are



1. Create a invusage record to transfer storeroom to another.

2. change status to shipped.

3. Go to shipment receiving and do partial receiving.

4. return partial recieved items.

5. try to recieve remaining items you will get error.

Saturday, 26 September 2020

Oracle Passing array elements as input parameters.

 set serveroutput on ;

CREATE OR REPLACE TYPE MyType AS VARRAY(200) OF VARCHAR2(50);
\
CREATE OR REPLACE PROCEDURE testing(t_in MyType, v_type in varchar) IS
  ret varchar2(100):='';
 BEGIN
   FOR i IN 1..t_in.count LOOP
    dbms_output.put_line(t_in(i));
    IF i < t_in.count THEN
     ret:=ret||' '''||t_in(i)||''',  ';
    ELSE
     ret:=ret||' '''||t_in(i)||'''  ';
    END IF ; 
   END LOOP;
  dbms_output.put_line(ret);
  dbms_output.put_line(v_type);
 END;
\
 DECLARE
      v_t MyType;
    BEGIN
      v_t := MyType();
      v_t.EXTEND(3);
      v_t(1) := 'WAPPR';
      v_t(2) := 'APPR';
      v_t(3) := 'INPRG';
      testing(v_t,'Test');
    END;

Monday, 24 August 2020

Maximo heap dump analysis

 Often we see in our environment particularly non prod we saw memory leak or heap dumps.


There can be chance of this due to memory leakage and often require analysis too found root cause.


There are different tools commercial as well as opersource to analys these heap dumps


We will see why heap dumps created and how to identify issue.

Thursday, 20 August 2020

Maximo Reorder not generating PR

 If Reorder is not generating PR 


1. Check for vendor order unit has a conversion exists with item issue unit?

2. Check for ITem is active at org and inventory level?

3. Check any field is mandatory in PR which is not fullfilled while PR is getting generated from Reorder?

4. Check calculation for Quantity to reorder matches with calculation?

5. Check exchange rate is defined for Currency specified for vendor?

6. Check GL account is  valid?

Monday, 3 August 2020

Maximo Technical Consultant Course Syllabus

DB config
Application Designer
Escalation
Crontask
Workflow Designer
Automation Script
Migration Manager
Object Structure
Message Tracking
Import export via CSV
Mximo Integration Framework
Maximo Webservice SOAP
Maximo Webservice Rest
Call a Webserver from Mbo Class or Bean Class
Integration Automation Script

Thursday, 30 July 2020

Unix/Linux Important Commands

Main Linux commands



ls -lrt == list of files order by date ascendingls -lrt | tail - 10  == list of files order by date ascending Top 10wc -l == line count in filegrep -i === Match pattern ignoring casegrep -i Test00 == Find word Test00 ignoring case and give the list of words containing Test00grep -i Test00 | wc -l === Gives count of number of wordswc -l Test.txt == this will give line count in text.txtgrep -i "Maximo" | wc -l = Give the count of lines which contains word Maximo

pwd === Print working directory.

cd == to go into directory

cd .. == to go out of directory

df -H == This is used to check disk file system space available and used.

rm file.txt == to remove file

ls heap* == to list all files with heap* name..

TOP == see all process

kill -9 IDOFPROCESSTOKILL

How to create Multiselect lookup

 Inorder to create a multiselect lookup you can use following steps


1. Create a Menu to call a dialog.

2. Create a multiselect dialog using relationship for mbo you want to select

3. write a beanclass on ok even of dialog to select mbo's selected and set value in owner of the dialog by concatenating.

Tuesday, 30 June 2020

ORACLE PROCEDURE WITH VARIABLE ARGUMENTS

set serveroutput on ;
CREATE OR REPLACE TYPE MyType AS VARRAY(200) OF VARCHAR2(50);
\
CREATE OR REPLACE PROCEDURE testing(t_in MyType, v_type in varchar) IS
  ret varchar2(100):='';
 BEGIN
   FOR i IN 1..t_in.count LOOP
    dbms_output.put_line(t_in(i));
    IF i < t_in.count THEN
     ret:=ret||' '''||t_in(i)||''',  ';
    ELSE
     ret:=ret||' '''||t_in(i)||'''  ';
    END IF ; 
   END LOOP;
  dbms_output.put_line(ret);
  dbms_output.put_line(v_type);
 END;
\
 DECLARE
      v_t MyType;
    BEGIN
      v_t := MyType();
      v_t.EXTEND(3);
      v_t(1) := 'WAPPR';
      v_t(2) := 'APPR';
      v_t(3) := 'INPRG';
      testing(v_t,'Test');
    END;

Monday, 18 May 2020

Call to VidMessageSlotMap failed: Last=0xc000000d/87 (VERR_NEM_VM_CREATE_FAILED)


Call to VidMessageSlotMap failed: Last=0xc000000d/87 (VERR_NEM_VM_CREATE_FAILED)






To resove this error

Uninstall docker or similar tool if you are using


Go to start -> Turn of/off windows features

then uncheck Hyper-V

then check virtual machine

then check sandbox

then uncheck containers


open power shell in administrator (Run as admin) and type command



bcdedit /set hypervisorlaunchtype off
then restart your PC

 


Wednesday, 13 May 2020

how to free port port in use error

C:\Users\AnilBalwani>netstat -ano | findstr 8080
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       12744
  TCP    [::]:8080              [::]:0                 LISTENING       12744
  TCP    [::1]:8080             [::1]:57481            TIME_WAIT       0
C:\Users\AnilBalwani>taskkill /pid 12744
ERROR: The process with PID 12744 could not be terminated.
Reason: This process can only be terminated forcefully (with /F option).
C:\Users\AnilBalwani>taskkill /pid 12744 -f
SUCCESS: The process with PID 12744 has been terminated.

Sunday, 10 May 2020

Getting started with docker



Docker has 2 editions community edition(free) and enterprise edition (paid)


Select the os from docker website and download and install docker.
Once you install docker run
in powershell run below command
>Docker run hello-world


Docker run command is used to run an container


To find what all containers you can run go to docker hub.

once you use run command docker reuires internet and it will download from that dockerhum

you can find list of container


>docker ps  or docker list command


Stopping a container

>docker stop Name_of_Container


to stop docker service
>service docker stop
to Remove use docker -rm command
If you want to create your own image you should use docker files

Friday, 8 May 2020

E45 readonly option is set (add ! to override)

E45 readonly option is set (add ! to override)



If you get this error use :WQ! to save file in vi editor which is a readonly file.

Wednesday, 6 May 2020

JUNK characters or special characters are passed when sending request from ajax/javascript to servlet + multipart form data

Special characters / Junk characters while sending data from jquery ajax to servlet while uploading file



Hi recently I received a weird issue is while setting description of a record it appended some weird special characters in my string. 

Inorder to solve this issue what we can do is 

use item.getString("UTF") instead of item.getString().

Tuesday, 5 May 2020

Python dictionary example

emp={
 
  'name':'anil',
  'age': 18,
  'sex':'male'
 
}
for item in emp.values(),emp.items(),emp.keys():
  print(item)
for key,value in emp.items():
    print(key,value)

Thursday, 30 April 2020

Maximo System is down can't login to websphere

One cause of this issue could be that the password for service account in websphere is expired.

Wednesday, 29 April 2020

AttributeError: partially initialized module 'webbrowser' has no attribute 'open' (most likely due to a circular import)

AttributeError: partially initialized module 'webbrowser' has no attribute 'open' (most likely due to a circular import)



Don't save your file with the same name as imported package 

you save your file with name webbrowser and system is comfused change filename to new.py and try.

Steps to start derby database

C:\Users\AnilBalwani> java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar
Usage:
java -jar derbyrun.jar ij [-p propertiesfile] [sql script]
java -jar derbyrun.jar sysinfo [-cp ...] [-cp help]
java -jar derbyrun.jar dblook [args] (or no arguments for usage)
java -jar derbyrun.jar server [args] (or no arguments for usage)
java -jar derbyrun.jar SignatureChecker [args]
java -jar derbyrun.jar PlanExporter [args]
C:\Users\AnilBalwani> java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar ij
ij version 10.14
ij> CONNECT 'jdbc:derby:booksdb;create=true';
ij> CREATE TABLE book (book_id int primary key, title varchar(64));
0 rows inserted/updated/deleted
ij> INSERT INTO book VALUES (1, 'Core Java'), (2, 'Thinking in Java'), (3, 'Effective Java');
3 rows inserted/updated/deleted
ij> CONNECT 'jdbc:derby://localhost:1527/projects;create=true';
ERROR 08001: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused: connect.
ij> CONNECT 'jdbc:derby://localhost:1527/booksdb;create=true';
ERROR 08001: java.net.ConnectException : Error connecting to server localhost on port 1,527 with message Connection refused: connect.
ij> exit
> ;
C:\Users\AnilBalwani>java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar server start
Wed Apr 29 23:59:22 IST 2020 : Security manager installed using the Basic server security policy.
Wed Apr 29 23:59:27 IST 2020 : Apache Derby Network Server - 10.14.2.0 - (1828579) started and ready to accept connections on port 1527


Open another command prompt

C:\Users\AnilBalwani>java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar ij
ij version 10.14
ij> CONNECT 'jdbc:derby://localhost:1527/library;create=true';
ij> CREATE TABLE book(book_id int primary key, book_name varchar(32));
0 rows inserted/updated/deleted
ij> INSERT INTO project VALUES (1, 'Java'), (2, '.Net'), (3, 'Maximo');
3 rows inserted/updated/deleted
ij> SELECT * FROM project;
PROJECT_ID |PROJECT_NAME
--------------------------------------------
1          |Java
2          |.Net
3          |Maximo
3 rows selected
ij>


Python HTTP Request

import requests,json
print(requests.get('https://api.github.com'));
# Getting response in json format
response=requests.get('https://api.github.com');
#print(response.json());
#print(response.headers);
print(response.headers['content-type']);
print(response.headers['date']);

Python error : PermissionError: [Errno 13] Permission denied: '

if you get this command installing pip request package or any another packa


PermissionError: [Errno 13] Permission denied: '


Then run with --user


C:\Users\AnilBalwani>pip install requests --user

writing json to a file using python

import json
data={}
data['people']=[]
data['people'].append({'name':'Ram Singh'});
with open('data.txt', 'w') as outfile:
    json.dump(data, outfile)

Tuesday, 28 April 2020

Reading JSON File using Python

Code to Read Json File using Python

>>> import os
>>> os.chdir(r"C:\Users\AnilBalwani\Desktop");
>>> f=open("hello.json");
>>> print(json.load(f));
{'glossary': {'title': 'example glossary', 'GlossDiv': {'title': 'S', 'GlossList': {'GlossEntry': {'ID': 'SGML', 'SortAs': 'SGML', 'GlossTerm': 'Standard Generalized Markup Language', 'Acronym': 'SGML', 'Abbrev': 'ISO 8879:1986', 'GlossDef': {'para': 'A meta-markup language, used to create markup languages such as DocBook.', 'GlossSeeAlso': ['GML', 'XML']}, 'GlossSee': 'markup'}}}}}

Sunday, 26 April 2020

Reading a file in oracle

create a directory using sqlplus

sys / as sysdba


create directory

create directory test as 'C:\test'

grant access for read and write to db

Grant read,write test to public;


copy your file emp.txt with data

DECLARE
  L_HANDLER UTL_FILE.FILE_TYPE;
L_TEST VARCHAR2(1000);

BEGIN
  L_HANDLER := UTL_FILE.FOPEN('TEST', 'EMP.txt', 'R');
 UTL_FILE.GET_LINE(L_HANDLER,L_TEXT);
DBMS_OUTPUT.PUT_LINE(L_TEXT);
END;

Friday, 24 April 2020

Running a project class from a project by making runnable jar

Go to your project

Create a runnable jar by right click --->export -> Runnable jar

Give your mail class details.

Calling a specific class of Jar file inside a package from command Promt

Calling a specific class of Jar file inside a package from command Promt


Example to call a class from command line

C:\Users\AnilBalwani>java -cp C:\Users\AnilBalwani\Desktop\Testing.jar net.codecrete.qrbill.examples.AppendToPDF
Invoice 1 saved at C:\Raj\my_DemoPdf-1.pdf
Invoice 2 saved at C:\Users\AnilBalwani\my_dloc.pdf

Thursday, 23 April 2020

PIP Tool Python

PIP is tool for installing library.

IT is used for installing/listing/deleting library.

To search for python libraries

https://pypi.org/search/


pip install qbill


To check installation

pip show qbill

PIP syntax error python

PIP syntax error python 

Open command prompt.
Check python version
run command like pip install qrbill --user (--user is optional if you have access denied issue)




Steps to install package in python is

Microsoft Windows [Version 10.0.18363.778]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\Users\AnilBalwani>python --version
Python 3.8.2
C:\Users\AnilBalwani>pip --version
pip 19.2.3 from c:\program files (x86)\python38-32\lib\site-packages\pip (python 3.8)
C:\Users\AnilBalwani>python -m pip install --upgrade pip setuptools wheel
Collecting pip
  Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
     |████████████████████████████████| 1.4MB 386kB/s
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/a0/df/635cdb901ee4a8a42ec68e480c49f85f4c59e8816effbf57d9e6ee8b3588/setuptools-46.1.3-py3-none-any.whl (582kB)
     |████████████████████████████████| 583kB 344kB/s
Collecting wheel
  Downloading https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python38-32\\lib\\site-packages\\pip-19.2.3.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\AnilBalwani>pip install qrbill
Collecting qrbill
  Downloading https://files.pythonhosted.org/packages/34/6d/9595caee9529a4841d521fa4701912c2eac87f6824ab03fb262677363362/qrbill-0.4.tar.gz
Collecting iso3166 (from qrbill)
  Downloading https://files.pythonhosted.org/packages/a0/42/15d2ef2211ddb26deb810a21b084ee6f3d1bc7248e884dcabb5edc04b649/iso3166-1.0.1-py2.py3-none-any.whl
Collecting python-stdnum>=1.13 (from qrbill)
  Downloading https://files.pythonhosted.org/packages/6b/57/5d1ee250a9c4e780d57d7dcc1b9553c4e386c759ed3087f813965c4534d2/python_stdnum-1.13-py2.py3-none-any.whl (839kB)
     |████████████████████████████████| 849kB 409kB/s
Collecting qrcode (from qrbill)
  Downloading https://files.pythonhosted.org/packages/42/87/4a3a77e59ab7493d64da1f69bf1c2e899a4cf81e51b2baa855e8cc8115be/qrcode-6.1-py2.py3-none-any.whl
Collecting svgwrite (from qrbill)
  Downloading https://files.pythonhosted.org/packages/1c/85/1dc25b36c3ac4f3fe285d33065fc0f2ea7bdfb9209d6369e01a3e8ef6252/svgwrite-1.4-py3-none-any.whl (66kB)
     |████████████████████████████████| 71kB 269kB/s
Collecting colorama; platform_system == "Windows" (from qrcode->qrbill)
  Downloading https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl
Collecting six (from qrcode->qrbill)
  Downloading https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl
Installing collected packages: iso3166, python-stdnum, colorama, six, qrcode, svgwrite, qrbill
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python38-32\\Lib\\site-packages\\iso3166'
Consider using the `--user` option or check the permissions.
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.



To Resolve Access denied issue


  Using cached https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl
Installing collected packages: iso3166, python-stdnum, six, colorama, qrcode, svgwrite, qrbill
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python38-32\\Lib\\site-packages\\iso3166'
Consider using the `--user` option or check the permissions.
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\AnilBalwani>pip install qrbill --user
Collecting qrbill
  Using cached https://files.pythonhosted.org/packages/34/6d/9595caee9529a4841d521fa4701912c2eac87f6824ab03fb262677363362/qrbill-0.4.tar.gz
Collecting iso3166 (from qrbill)
  Using cached https://files.pythonhosted.org/packages/a0/42/15d2ef2211ddb26deb810a21b084ee6f3d1bc7248e884dcabb5edc04b649/iso3166-1.0.1-py2.py3-none-any.whl
Collecting python-stdnum>=1.13 (from qrbill)
  Using cached https://files.pythonhosted.org/packages/6b/57/5d1ee250a9c4e780d57d7dcc1b9553c4e386c759ed3087f813965c4534d2/python_stdnum-1.13-py2.py3-none-any.whl
Collecting qrcode (from qrbill)
  Using cached https://files.pythonhosted.org/packages/42/87/4a3a77e59ab7493d64da1f69bf1c2e899a4cf81e51b2baa855e8cc8115be/qrcode-6.1-py2.py3-none-any.whl
Collecting svgwrite (from qrbill)
  Using cached https://files.pythonhosted.org/packages/1c/85/1dc25b36c3ac4f3fe285d33065fc0f2ea7bdfb9209d6369e01a3e8ef6252/svgwrite-1.4-py3-none-any.whl
Collecting six (from qrcode->qrbill)
  Using cached https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl
Collecting colorama; platform_system == "Windows" (from qrcode->qrbill)
  Using cached https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl
Installing collected packages: iso3166, python-stdnum, six, colorama, qrcode, svgwrite, qrbill
  WARNING: The script qr.exe is installed in 'C:\Users\AnilBalwani\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py install for qrbill ... done
Successfully installed colorama-0.4.3 iso3166-1.0.1 python-stdnum-1.13 qrbill-0.4 qrcode-6.1 six-1.14.0 svgwrite-1.4
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.





Thursday, 16 April 2020

Try and Catch using Python

num=input();
try:
   if (int(num)>0):
    print("greater than zero");
   else:
    print("less than zero");
except ValueError:
    print("Not a number");

Maximo Integration Framework

Maximo Integration framework is used for integrating with external application or system or for loading data. Its heart is object structure.


It supports following file formats

JSON, XML, CSV etc.

You can integrate via Webservice Soap/Rest, JMS , HTTP etc.


You can also define a particular time during a day to synchronize or can be in real time.


Main integration components and there use in Layman terms : -


Object Structure  : List of Objects

Publish Channel : Used to send data or Publish data

Enterprise Service : Used to receive data from external system

Invocation Channel : Used for Send and receive data at particular event

External system : you define a virtual name for external system you are integrating.

Endpoint : - Its a gate through which data goes in and out.


For business logic we can do XSL Mapping, Java classes or processing rules.



Python interview questions

1. Why do you like to work in Python?

Hellow World program in python

# Hello World program in Python
import datetime,time,sys
def welcome():
    print("Hi How are you" +str(datetime.datetime.now()));                    #prints date and time
    print("Hope you are having a great day");
    print("Welcome to python");
    time.sleep(1);        #cause program to wait for 1 second
welcome();
welcome();
exit();



This program creates welcome function, shows you how to import or do multiple import and print datetime.


with params
# Hello World program in Python
import datetime,time
def welcome(number):
    print("Hi How are you" +str(datetime.datetime.now()));
    print("Hope you are having a great day"+str(number+1));
    print("Welcome to python");
    time.sleep(1);
welcome(6);



Python Creating class example


class Person:
    def __init__(self,name,age):
        self.name=name;
        self.age=age;
       
p1 = Person("John", 36)
print(p1.name)

Friday, 3 April 2020

How to run a sql file from drive in sql editor

Open editor and use this command



@Path_of_file.sql

Anonymous block not working in SQL*Plus

To resolve this issue please end sql anonymous block like you end multiple sql's in editor to run multiple queries


Declare
Begin
Statements....
End;
/

Getting started with PLSQL

PLSQL Basics


Structure of PLSQL Block


Declare                      (Optional)
BEGIN                      (Required)
       Sql statments
       IF....While...For....Else....Do....While
Exception                  (Optional)
End ;                       (Mandatory)


Types of blocks in PLSQL


1. Anonymous

Structure :

Declare                      (Optional)
BEGIN                      (Required)
       Sql statments
       IF....While...For....Else....Do....While
Exception                  (Optional)
End                            (Required)



2. Procedure

Structure


Procedure name
Is
Declare                      (Optional)
BEGIN                      (Required)
       Sql statments
       IF....While...For....Else....Do....While
Exception                  (Optional)
End ;                   (Required)



3. Function

Structure

Function nam
Return datatype
Is
Declare                      (Optional)
BEGIN                      (Required)
       Sql statments
       IF....While...For....Else....Do....While
       Return value;
Exception                  (Optional)
End;                            (Required)












Steps to create user in database

Creating test user in oracle database


alter session set container=testdb--only for 12c
create user test identified by test;
grant create session to test;
grant create table,create view to test;
grant  create procedure to test;
grant create synonym, create trigger to test;
grant unlimited tablespace to test;

Thursday, 19 March 2020

How to stop windows automatically download updates

How to stop windows automatically download updates

Due to coronavirus many people are WFH and this might cause slowness in bandwith/speed or data getting exhausted

Solution

Steps 

1. Got to services

2. Go to Windows update Service

3. Stop the service and disable this service.


Friday, 13 March 2020

Dependencies in Software development

Dependencies in Software development




  •  Change Dependency : - Developers need to ensure that the code change they implementing due to client requirement is working well with
the other related part of the code to form a stable baseline.
  •  Expertise Dependency : - Developers might need expertise of colleagues or business analyst in case of any challenge in bug fixing, technical challenge arising due to past defects in system or in case of code merge/deployment activity.
  • Availability Dependency : - Availability is required for Key resources for performing technical work and availability is required for
  • Timeline Dependency :- Any other Project running in parallel might impact timelines for Execution.

 

Assumptions in Software Development Project

Assumptions in Software Development Project


1. End users will be available to test during the time  they agree to.

2. Time is allocated for preparing development environment.

3. There will not be any major requirement change after sign off.

4. Estimation of effort is based on our current understanding of the scope. Any change in scope will result in revision of estimate and will be handled through change management process.

5. Estimate includes weekly status reporting and weekly meetings related to this Enhancement

6. External Partner or Third Party will respond to requests for action / clarification within timelines.

7. Their will be client expertise involved as and when required.


Risk in Software development

Risk involved in Software development


1. As development progresses more and more features that were not identified at the beginning of the
project or changing of requirements may impact estimates and timelines.

2. Employee availability can cause significant delays in project.

3. Incorrect estimation due to external factors like insufficient time from client for feedback on layout and reports, approval on various documents insufficient time allocated for testing or due to any technical challenges.

4. This project work requires lot of coordination with multiple stakeholders. Any delay might affect the schedule.

5. If documentation / deliverables from key stakeholders does not meet quality standards, project execution will be impacted.

6. Any issues in installation can cause significant delay in project execution.





Wednesday, 11 March 2020

Create text area which allow user to make text bold/italic change font and size in coldfusion

We often have requirement to Create text area which allow user to make text bold/italic change font and size in coldfusion

Thanks to <cftextarea> which lets you highlight make text bold its actually a editor for this we put richtext="true" in tag cftextare.


Saturday, 29 February 2020

Creating a simple plugin in jquery


How to install Kafka Server with Java 8


Kafka Comands

Starting Zookeeper 

C:\kafka_2.12-2.4\kafka_2.12-2.4.0\bin\windows>zookeeper-server-start C:\kafka_2.12-2.4\kafka_2.12-2.4.0\config\zookeeper.properties

Starting Kafka server

C:\ Kafka\ kafka-server-start.bat C:\kafka_2.12-2.4\kafka_2.12-2.4.0\config\server.properties

Creating topics

C:\Users\AnilBalwani>kafka-topics --zookeeper 127.0.0.1:2181 --topic test_topic --create --partitions 3 --replication-factor 1
WARNING: Due to limitations in metric names, topics with a period ('.') or underscore ('_') could collide. To avoid issues it is best to use either, but not both.
Created topic test_topic.
C:\Users\AnilBalwani>


List topics

C:\Users\AnilBalwani>kafka-topics --zookeeper 127.0.0.1:2181 --list
test_topic


Kafka Information about topics

C:\Users\AnilBalwani>kafka-topics --zookeeper 127.0.0.1:2181 --topic test_topic --describe
Topic: test_topic      PartitionCount: 3       ReplicationFactor: 1    Configs:
        Topic: test_topic      Partition: 0    Leader: 0       Replicas: 0     Isr: 0
        Topic: test_topic      Partition: 1    Leader: 0       Replicas: 0     Isr: 0
        Topic: test_topic      Partition: 2    Leader: 0       Replicas: 0     Isr: 0












Error running Kafka server time out error

Error running Kafka server timeout

kafka.zookeeper.ZooKeeperClientTimeoutException


Restart ZookeperServer this error occurs due to timeout of zookeeper.

Getting started with Apache Kafka


error running Kafka zookeeper

Error running Kafka

org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config\zookeeper.properties


C:\kafka_2.12-2.4\kafka_2.12-2.4.0\bin\windows>zookeeper-server-start config\zookeeper.properties
[2020-02-29 17:59:17,354] INFO Reading configuration from: config\zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-02-29 17:59:17,365] WARN config\zookeeper.properties is relative. Prepend .\ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-02-29 17:59:17,367] ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain)
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config\zookeeper.properties
        at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:154)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:113)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:82)
Caused by: java.lang.IllegalArgumentException: config\zookeeper.properties file is missing
        at org.apache.zookeeper.server.util.VerifyingFileFactory.doFailForNonExistingPath(VerifyingFileFactory.java:51)
        at org.apache.zookeeper.server.util.VerifyingFileFactory.validate(VerifyingFileFactory.java:45)
        at org.apache.zookeeper.server.util.VerifyingFileFactory.create(VerifyingFileFactory.java:40)
        at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:139)
        ... 2 more
Invalid config, exiting abnormally



Solution

use command


C:\kafka_2.12-2.4\kafka_2.12-2.4.0\bin\windows>zookeeper-server-start C:\kafka_2.12-2.4\kafka_2.12-2.4.0\config\zookeeper.properties


here I give complete config path.

Thursday, 27 February 2020

Selecting different elements in Jquery

For selecting an id field with name mytable we can use

$('#mytable')

we can also use

$('.mytable')
If you want to select a row in my table use $('.mytable.tr') if you have to select h1 which is inside a paragraphwhich is  inside a div $('div.myDiv p h1') To get first row of table $('#myTable tbody tr:first') To select every text box and paragraph $('p,input') Change background of first row $('#meetable tbody tr:first').css('background-color','blue')

Wednesday, 26 February 2020

"BMXAA4024E - The synonym value REPORT is not valid for the domain REPORTTYPES."

This error occurs in Multilanguage environment.

whenever you add a new report and generate request page you can get this error because you have old reports from previous maximo version which are cause problems.

What you have to do is delete the no longer required data using steps from IBM page and then regenerate request page for all reports and then run the report.

Sunday, 16 February 2020

BMXAA0883E Entered path is not valid / BMXAA0883E entered file is not valid

BMXAA0883E Entered path is not valid / BMXAA0883E entered file is not valid


Creating folder in any maximo application can cause this error 


psdi.util.MXApplicationException: BMXAA0883E - The entered path \\maximo\DOCLINKS\ATTACHMENTS is not valid.
 SystemErr R at psdi.app.doclink.FldDoctypesDefaultFilePath.validate(FldDoctypesDefaultFilePath.java:117)

This error can occur when user id is not mapped in http server for doclinks.

There can be another reasor is http and websphere services have different logon userid etc.


Another solution could be doclinks folder did not have permission (security) access using websphere user once you put them it will work.