Wednesday, November 19, 2014

List DB Sessions and Kill



Query to list DB Sessions:

Login as sys  user.

SELECT s.inst_id,
       s.sid,
       s.serial#,
       p.spid,
       s.username,
       s.program
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  s.type != 'BACKGROUND';




Kill DB Session:

SQL>ALTER SYSTEM KILL SESSION 'sid,serial#';                                                                

Tuesday, October 21, 2014

VBOX_E_FILE_ERROR (0x80BB0004) Component: Appliance Interface


Problem:

Could not open the current file in the archive (VERR_TAR_CHKSUM_MISMATCH). Result Code: VBOX_E_FILE_ERROR (0x80BB0004) Component: Appliance Interface: IAppliance {3059cf9e-25c7-4f0b-9fa5-3c42e441670b}

Scenario:

When trying to import oracle prebuilt VM into Oracle virtual box.  We encouter this exception.

Solution:

1. Check md5 checksum on the downloaded files.
2. Uncheck disk drive, usb while import.
3. Make sure Oracle virtual box version.  Make sure you import appliance into the Virtual Box mentioned on the website.

Tuesday, September 30, 2014

Can not build schema ..located at



Exception:

Exception: Can not build schema 'http://xmlns.oracle.com/ias/pcbpel/NotificationService' located at 'file:/C:/JDeveloper/mywork/SamplePOC/Project1/NotificationService.xsd'

NotificationService WSDL in MDS:

<definitions name="NotificationService_WSDL" targetNamespace="http://xmlns.oracle.com/ias/pcbpel/NotificationService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmlns.oracle.com/ias/pcbpel/NotificationService" xmlns:ns1="http://IWSDLDocument1.xsd" xmlns:java="http://schemas.xmlsoap.org/wsdl/java/" xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<types>
<schema targetNamespace="http://xmlns.oracle.com/ias/pcbpel/NotificationService1" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<import namespace="http://xmlns.oracle.com/ias/pcbpel/NotificationService" schemaLocation="NotificationService.xsd"/>
</schema>
<schema targetNamespace="http://xmlns.oracle.com/ias/pcbpel/NotificationService" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<element name="faultMessage" type="xsd:string"/>
</schema>
</types>
<message name="IMNotificationRequest">
<part name="IMPayload" type="tns:IMPayloadType"/>
</message>


Changed NotificationService WSDL in MDS:

<definitions name="NotificationService_WSDL" targetNamespace="http://xmlns.oracle.com/ias/pcbpel/NotificationService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmlns.oracle.com/ias/pcbpel/NotificationService" xmlns:tns1="http://xmlns.oracle.com/ias/pcbpel/NotificationService/xsd" xmlns:ns1="http://IWSDLDocument1.xsd" xmlns:java="http://schemas.xmlsoap.org/wsdl/java/" xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<types>
<xsd:schema>
<xsd:import namespace="http://xmlns.oracle.com/ias/pcbpel/NotificationServicexsd" schemaLocation="../../xsd/v1/NotificationService.xsd"/>
</xsd:schema>
<xsd:schema elementFormDefault="qualified">
<xsd:element name="faultMessage" type="xsd:string"/>
</xsd:schema>
</types>
<message name="IMNotificationRequest">
<part name="IMPayload" type="tns1:IMPayloadType"/>
</message>


Cause:


SOA is very strict in namespaces.  

  •   Open the wsdl in JDEV to find cause of the issues.
  •   Check the import schema elements for discrepencies.
  •   Check if Schema being imported has same targetNamespace as the WSDL's      targetNameSpace.  Then import the same targetNamespace.













Friday, September 26, 2014

java.lang.UnsupportedOperationException: Remote JDBC disabled.


Problem:

<RuntimeException thrown by rmi server: weblogic.jdbc.common.internal.RmiDataSource.getConnection()
 java.lang.UnsupportedOperationException: Remote JDBC disabled.
java.lang.UnsupportedOperationException: Remote JDBC disabled
        at weblogic.jdbc.common.internal.JDBCServerHelperImpl.<clinit>(JDBCServerHelperImpl.java:36)
        at weblogic.jdbc.common.internal.JDBCService.initialize(JDBCService.java:91)
        at weblogic.jdbc.common.internal.JDBCService.start(JDBCService.java:137)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        Truncated. see log file for complete stacktrace


Solution:

1) Go to the Weblogic Domain Directory and edit the setDomainEnv.sh file
2) Modify WLS_JDBC_REMOTE_ENABLED value false to true.
WLS_JDBC_REMOTE_ENABLED="-Dweblogic.jdbc.remoteEnabled=true"
3) Restart the WebLogic Servers



Reference:

http://idmoim.blogspot.com/2011/07/javalangunsupportedoperationexception.html



Wednesday, September 10, 2014

Find the process running on a particular port in UNIX



Lists all the ports and their process ids.

> netstat -tulpn

You can see the PID , only if the process is owned by the user that you have logged in.

To find the process id of a particular port.

> netstat -tulpn | grep 8089

udp        0      0 ::ffff:10.32.200.000:8089   :::*                                    11268/java


to find the process of this particular process id:

> ps -ef | grep 11268


Tuesday, September 9, 2014

Resources for Creating Certificates




https://blogs.oracle.com/blogbypuneeth/entry/steps_to_create_a_csr

https://kb.informatica.com/h2l/HowTo%20Library/1/0312_SSL_Two-Way_Configuration.pdf

Sunday, June 29, 2014

Basic DB Admin tasks using local SQL PLUS



Connecting to SQL PLUS:


oracle> source /fmwapps/oracle/product/12.1.0/dbhome_1/bin/oraenv
Oracle_sid = ? [Enter SID of the instance you are trying  to connect] orcl

oracle> sqlplus


To Start the instance


SQL*Plus: Release 12.1.0.1.0 Production on Sun Jun 29 12:06:50 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Enter user-name: SYS as SYSDBA
Enter Password:  <Enter your DB password>

SQL> startup

To Shutdown the instance:

SQL> shutdown


To Find hostname of the Instance



SQL> select host_name from v$instance;

To find the port of the instance :


$ORACLE_HOME/11.2.0.3/network/admin

listerner.ora  file has port and SID.

tnsnames.ora  file has the cluster configuration for the database.

To fine the status of the listener:


lsnrctl status LISTENER










Saturday, June 28, 2014

Swap Space in Linux


How to check the swap file in linux:

root> swapon -s

Disk Usage :

root> df -m

Memory usage:

root> free -m

To create 1GB swap space

root> sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 
root> sudo mkswap /swapfile 
root> sudo swapon /swapfile
root> /swapfile swap swap defaults 0 0

To Add additional Swap space:

root>  dd if=/dev/zero of=/extraswap bs=1M count=6144
root>  mkswap /extraswap
root> swapon /extraswap
root> vi /etc/fstab
/extraswap   none   swap   sw   0   0
Add the above Line.

Sort Disk usage :

du -H --max-depth=1 /home/user



Linux Setup for SOA install on AWS -EC2

Create a M3-Large instance on AWS -EC2:

Create m3 large instance for SOA installation on AWS -EC2.

 1. Choose Static Elastic IP. So that you do not loose IP when server is restarted.
  
 2.  Save the KeyPair on local Machine.  Use PuttyGen to create the PPK file.

 3. Use Putty to login to the terminal using the PPK.  

      a. Hostname:  Public DNS name from AWS console.
      b. Port : 22  for ssh.  
      c.  Putty-> connection -> ssh -> Auth -> Browse for PPK file.

   4.  Default username used to login to AWS Instance is 'ec2-user'.


Change HOSTName on AWS EC2 Linux:


root>  vi /etc/sysconfig/network

Change Hostname to Fully Qualified name.

HOSTNAME=obprodb.objectprosolutions.com

Direct your custom hostname to AWS Public IP:

Create the A Record in your DNS control pointing to AWS PUBLIC IP.


Create User:


From Root user:


ec2-user> sudo useradd oracle

ec2-user> sudo su - oracle

oracle> mkdir .ssh


oracle> chmod 700 .ssh

oracle> touch .ssh/authorized_keys

oracle> chmod 600 .ssh/authorized_keys

oracle> vi .ssh/authrized_keys

Paste the public key here.  

P.S:  PuttyGEN is used to dispaly the public key 

Now login to terminal using the new user 'oracle'.


To Delete a user:



userdel -r oracle


To allow Remote access to User:

su - oracle

mkdir .ssh

chmod 700 .ssh

touch .ssh/authorized_keys

chmod 600 .ssh/authorized_keys



Run YUM Update:


root> yum update


Friday, June 27, 2014

WSM-00138: The path to the certificate is invalid



Scenario:

Oracle SOA calling secured service on Vordel Gateway.  OWSM policy used is 'oracle/wsm_username_tokoen_with_messsageprotection_client'.  Using this policy request message signed with SOA platform's certifacte along with UserNameToken.

OWSM policy expects the response message also be signed.  So we have configured the gateway the sign the response message with Root CA.

We have imported Root CA  to SOA's Keystore as trust.


Issue:


The path to the certificate is invalid. [[
Validation failed for the certificate "Subject DN:- CN=test.oprosoa.oprohome.com, OU=Information Technology, O="ObjectPro LLC.", L=Atlanta, ST=Georgia, C=US, Serial Number:- 132780370344752896279323, Issuer DN:- CN=OPRO Enterprise Certification Authority 01, DC=ObjectPro LLC, DC=com"
 Certificates in cert path used for validation are:-
"Subject DN:- CN=test.oprosoa.oprohome.com, OU=Information Technology, O="ObjectPro LLC.", L=Atlanta, ST=Georgia, C=US, Issuer DN:- CN=OPRO Enterprise Certification Authority 01, DC=ObjectPro LLC, DC=com"

]]


Solution:


According to Below Oracle Notes.  We need to import if any intermediate chain of certificates as well, in order to successfully read the response.

We have imported the dependent  ENT CA  certificate and issue is resolved





WSM-00138: The path to the certificate is invalid. Validation failed for the certificate {0} Certificates in cert path used for validation are:- {1}
Cause: The intermediate and root certificates of the certificate were not present in the keystore during verification.
Action: Make sure that the entire certificate chain is available in the keystore for verification.
Level: 1
Type: ERROR
Impact: Security