Thursday, 2 July 2020

SQL Client Installation on Linux machine

Solution:

1. Install below two RPMs

    oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm

    oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm

 

2. Create the SQL.env file using below

 

ORACLE_HOME=/usr/lib/oracle/12.2/client64

PATH=$ORACLE_HOME/bin:$PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

export ORACLE_HOME

export LD_LIBRARY_PATH

export PATH

 

3. Source the SQL.env file


4. Connection can be established using either SID/SERVICE name as below

  • Connect using SERVICE name: sqlplus "username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST= <hostname>)(PORT=1531))(CONNECT_DATA=(SERVICE_NAME=<SERVICE_NAME>)))"
  • Connect using SID name: sqlplus "username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST= <hostname>)(PORT=1531))(CONNECT_DATA=(SID=<SID_NAME>)))"
Note: To use the import/export utility on instant client install rpm oracle-instantclient12.2-tools-12.2.0.1.0-1.x86_64.rpm

Monday, 25 May 2020

JDBC Connectivity Testing in Linux command Line

Pre-req:
1. Download ojdbc8.jar from oracle website.
2. Compatability of Java, Database, JDBC are in below note id
    Starting With Oracle JDBC Drivers - Installation, Certification, and More! (Doc ID 401934.1)

Step-1:

Create the java file JDBCConnectivity.java as below code

import java.sql.*;
 class JDBCConnectivity{
     public static void main(String args[]) throws SQLException {
         Connection con = null;
         try{
             Class.forName("oracle.jdbc.driver.OracleDriver");
             String DatabaseURL = "jdbc:oracle:thin:@//<Hostname/Database IP Address>:<Port Number>/<Database Service Name>";
             System.out.println("jdbcurl=" + DatabaseURL);
             String UserName = "<Username>";
             String UsrPassword = "<Password>";
             con=DriverManager.getConnection(DatabaseURL,UserName,UsrPassword);
             System.out.println("Connected to the database Successfull.");
             Statement stmt=con.createStatement();
             System.out.println("Executing query");
             ResultSet rs=stmt.executeQuery("SELECT 1 FROM DUAL");
             while(rs.next())
                 System.out.println(rs.getInt("1"));
             con.close();
         }catch(Exception e){ System.out.println(e);}
         finally {
             con.close();
         }
 }
 }

Step-2:
Compile the java code

javac JDBCConnectivity.java

Step-3:

Run the java code using below command

java -Djava.security.egd=file:/dev/../dev/urandom -cp ojdbc8.jar:. JDBCConnectivity

Tuesday, 18 February 2020

DB : [INS-20802] Oracle Net Configuration Assistant failed

Error:

When we check the installation logfile we can find below error log

[FATAL] [DBT-06103] The port (5,500) is already in use.
   ACTION: Specify a free port.
Oracle Database Configuration Assistant failed.
Starting 'Oracle Database Configuration Assistant'
[FATAL] [DBT-06103] The port (5,500) is already in use.
   ACTION: Specify a free port.
Oracle Database Configuration Assistant failed.
Starting 'Oracle Database Configuration Assistant'
[FATAL] [DBT-06103] The port (5,500) is already in use.
   ACTION: Specify a free port.

Solution:

When you ping your hostname it will not be reachable

[oracle@testdb] ping testdb
ping: testdb : Name or service not known

Add the full hostname entry in /etc/hosts file & retry the database installation

192.168.1.1 testdb.local.com testdb

Monday, 6 January 2020

Python : Dummy service on 9999 port in Linux

#!/usr/bin/python
# Demo server to open port 9999
# Modified from Python tutorial docs
import socket
import sys
HOST = 'localhost'   # IP addresses or Hostname
PORT = 9999 # Open non-privileged port 9999
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print 'Socket created Successfully'
#Bind socket to local host and port
try:
    s.bind((HOST, PORT))
except socket.error as msg:
    print 'Bind failed. Error Code : ' + str(msg[0]) + ' Message ' + msg[1]
    sys.exit()
print 'Socket bind complete'
#Started listening on socket
s.listen(10)
print 'Socket now listening'
while 1:
    #waiting to accept a connection - blocking call
    conn, addr = s.accept()
    print 'Connected with ' + addr[0] + ':' + str(addr[1])
s.close()

save the above file as port_server.py

run the port_server.py in one terminal & try telnet the hostname with 9999

Monday, 6 May 2019

EBS : Service Component Container is not Running

Solution:

To Start the Workflow Services :

Log in as SYSADMIN in OAM then navigate to:

1. Sitemap > Generic Services > Status Overview > View All > Generic Service Component Container > select Workflow Agent Listener Service > Start

2. In the same page select Workflow Mailer Service > Start

EBS : Worflow mailer Parameter update from backend

$FND_TOP/sql/afsvcpup.sql

Example:
SQL> @$FND_TOP/sql/afsvcpup.sql

Component Id Component Name                 Component Status Type            Containe
------------ ------------------------------ ---------------- --------------- --------
       10000 ECX Inbound Agent Listener     STOPPED          WF_AGENT_LISTEN GSM
       10001 ECX Transaction Agent Listener STOPPED          WF_AGENT_LISTEN GSM
       10002 Workflow Deferred Agent Listen STOPPED          WF_AGENT_LISTEN GSM
       10003 Workflow Deferred Notification STOPPED          WF_AGENT_LISTEN GSM
       10004 Workflow Error Agent Listener  STOPPED          WF_AGENT_LISTEN GSM
       10005 Workflow Inbound Notifications STOPPED          WF_AGENT_LISTEN GSM
       10006 Workflow Notification Mailer   STOPPED          WF_MAILER       GSM
       10020 Web Services IN Agent          STOPPED          WF_JAVA_AGENT_L GSM
       10021 Web Services OUT Agent         STOPPED          WF_DOCUMENT_WEB GSM
       10022 Workflow Java Deferred Agent L STOPPED          WF_JAVA_AGENT_L GSM
       10023 Workflow Java Error Agent List STOPPED          WF_JAVA_AGENT_L GSM
       10040 WF_JMS_IN Listener(M4U)        STOPPED          WF_JAVA_AGENT_L GSM
       10041 Workflow Inbound JMS Agent Lis STOPPED          WF_AGENT_LISTEN GSM

Enter Component Id: 10006


Comp Param Id Parameter Name                                Default Value                  Value                          Req Reload
------------- --------------------------------------------- ------------------------------ ------------------------------ --- ------
        10055 Allow Forwarded Response                      Y                              Y                              N   Y
        10160 Alternate email parser                        oracle.apps.fnd.wf.mailer.Dire oracle.apps.fnd.wf.mailer.Dire Y   N
                                                            ctEmailParser                  ctEmailParser

        10161 Attach images to outbound emails              Y                              Y                              Y   Y
        10162 Attach stylesheet to outbound email           Y                              Y                              Y   Y
        10056 Attached URLs                                 WFMAIL:ATTACHED_URLS           WFMAIL:ATTACHED_URLS           Y   Y
        10057 Autoclose FYI                                 Y                              Y                              Y   Y
        10061 Debug Mail Session                            N                              N                              N   N
        10163 Direct response                               N                              N                              N   N
        10062 Discard Folder                                DISCARD                        DISCARD                        Y   N
        10063 Email Parser                                  oracle.apps.fnd.wf.mailer.Temp oracle.apps.fnd.wf.mailer.Temp Y   N
                                                            latedEmailParser               latedEmailParser

        10178 Enable stylesheet references                  N                              N                              Y   Y
        10064 Expunge Inbox on Close                        Y                              Y                              Y   Y
        10166 Framework Application ID                      1                              1                              Y   N
        10165 Framework Responsiblity                       20420                          20420                          Y   N
        10167 Framework URL timeout                         30                             30                             Y   N
        10164 Framework User                                0                              0                              Y   N
        10065 From                                          Workflow Mailer                Workflow Mailer                Y   Y
        10066 HTML Agent                                                                   http://R122.localb.e Y   Y
                                                                                           rnet.in:8040/

        10231 HTML delimiter                                DEFAULT                        DEFAULT                        Y   N
        10168 HTTP User Agent                               Mozilla/4.76                   Mozilla/4.76                   Y   Y
        10303 Inbound Connection Retry Count                3                              3                              Y   N
        10068 Inbound Protocol                              imap                           imap                           Y   N
        10302 Inbound Security Protocol                                                    NONE                           Y   N
        10069 Inbound Server Name                                                          NoImapHost.NoImapDomain        Y   N
        10082 Inbound Thread Count                          1                              0                              Y   Y
        10169 Inbound connection time out                   120                            120                            Y   N
        10170 Inbound message fetch size                    100                            100                            Y   N
        10070 Inbox Folder                                  INBOX                          INBOX                          Y   N
        10071 Inline Attachments                            N                              N                              N   Y
        10175 Invalid More Information Response Notificatio WFMAIL:OPEN_INVALID_MORE_INFO  WFMAIL:OPEN_INVALID_MORE_INFO  Y   Y
              n

        10074 Invalid Response Notification                 WFMAIL:OPEN_INVALID            WFMAIL:OPEN_INVALID            Y   Y
        10230 Invalid address list size                     100                            100                            Y   N
        10280 Java Mail API Version                         1.5.4                          1.5.4                          Y   N
        10060 Log Level                                     5                              5                              Y   Y
        10073 Mailer Node Name                              WFMAIL                         WFMAIL                         Y   N
        10084 Max Error Count                               10                             10                             Y   N
        10171 Maximum Ignore List size                      1000                           1000                           Y   N
        10172 Maximum Response lookup code cache size       100                            100                            Y   N
        10173 Maximum returned email list size              100                            100                            Y   N
        10072 Message Formatter                             oracle.apps.fnd.wf.mailer.Noti oracle.apps.fnd.wf.mailer.Noti Y   N
                                                            ficationFormatter              ficationFormatter

        10240 More Information Response Warning Notificatio WFMAIL:MORE_INFO_ANSWERED      WFMAIL:MORE_INFO_ANSWERED      Y   Y
              n

        10077 Open FYI Notification                         WFMAIL:OPEN_MAIL_FYI           WFMAIL:OPEN_MAIL_FYI           Y   Y
        10075 Open Notification                             WFMAIL:OPEN_MAIL               WFMAIL:OPEN_MAIL               Y   Y
        10076 Open Notification (Direct Response Parsing)   WFMAIL:OPEN_MAIL_DIRECT        WFMAIL:OPEN_MAIL_DIRECT        Y   Y
        10176 Open Notification (More Information Request)  WFMAIL:OPEN_MORE_INFO          WFMAIL:OPEN_MORE_INFO          Y   Y
        10058 Outbound Cancelled Notification               WFMAIL:CANCELED                WFMAIL:CANCELED                N   Y
        10059 Outbound Closed Notification                  WFMAIL:CLOSED                  WFMAIL:CLOSED                  N   Y
        10179 Outbound HTML Summary Notification            WFMAIL:SUMHTML                 WFMAIL:SUMHTML                 Y   Y
        10078 Outbound Protocol                             smtp                           smtp                           Y   N
        10301 Outbound Security Protocol                                                   NONE                           Y   N
        10079 Outbound Server Name                                                         10.0.17.17                 Y   N
        10092 Outbound Summary Notification                 WFMAIL:SUMMARY                 WFMAIL:SUMMARY                 Y   Y
        10086 Outbound Thread Count                         1                              1                              Y   Y
        10094 Outbound Warning Notification                 WFMAIL:WARNING                 WFMAIL:WARNING                 Y   Y
        10177 Outbound connection time out                  120                            120                            Y   N
        10274 OutboundUser                                                                 username@local.com                 N   N
        10080 Processed Folder                              PROCESS                        PROCESS                        Y   N
        10088 Processor Close on Read Timeout               Y                              Y                              Y   N
        10081 Processor Error Loop Sleep                    60                             60                             Y   N
        10085 Processor Max Loop Sleep                      60                             60                             Y   N
        10083 Processor Min Loop Sleep                      5                              5                              Y   N
        10087 Processor Read Wait Timeout                   10                             10                             Y   N
        10233 Processor defer reading event data            Y                              Y                              Y   N
        10089 Reply-to Address                                                             username@local.com                 Y   Y
        10090 Reset NLS                                     N                              N                              Y   Y
        10229 SSL Trust store                               NONE                           NONE                           N   N
        10091 Send Access Key                               Y                              Y                              Y   Y
        10228 Send e-mails for canceled notifications       Y                              Y                              Y   N
        10227 Send warning for unsolicited e-mail           Y                              Y                              Y   Y
        10093 Test Address                                  NONE                           NONE                           N   Y
        10174 Unsolicited event threshold                   2                              2                              Y   N
        10054 Username                                                                     NoImapUser                     Y   N

Enter the Comp Param Id to update : 10069

You have selected parameter : Inbound Server Name
Current value of parameter  : NoImapHost.NoImapDomain


Enter a value for the parameter  : 10.0.17.17
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[applprod@R122 ~]$

Monday, 11 March 2019

EBS : After cloning forms are not opening FRM-40010

Error: 

FRM-40010: Cannot read form , fnd/12.0.0/forms/US/FNDSCSGN

Solution:

1. Backup $CONTEXT_FILE
2. Change variable s_formsfndtop in the context file from "FND_TOP" to "full path of FND_TOP"
Eg: /data/appl/apps_st/appl/fnd/12.0.0
3. Run AutoConfig
4. Restart application services
5. Retest the forms are opening.


Oracle : Database Startup Time

 Oracle Instance Startup Time SET LINES 2000 SET PAGES 9999 COLUMN INSTANCE_NAME FOR A20 SELECT     instance_name,     to_char(startup_time,...