Friday, July 28, 2017

SQLPLUS command to connect with RAC DB service name


SQLPLUS command to connect with RAC DB service name:

/oradata/instantclient_11_1/sqlplus -s  "username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=db.hosta.com)(Port=1521))(CONNECT_DATA=(SERVICE_NAME=PROD_HA)))"  

Tuesday, July 25, 2017

SQL to get count of composites in SOA 11g

This SQL will give count of compostes create each day for last 31 days:


select composite_name,domain_name,trunc(creation_date) creation_date,count(*) Instance_Count
FROM prod_soainfra.cube_instance
WHERE trunc(CREATION_DATE)>=trunc(sysdate-31)
group by composite_name, domain_name, trunc(creation_date)
order by trunc(creation_date)

Sunday, July 23, 2017

Failure of server APACHE bridge

Failure of server APACHE bridge:


No backend server available for connection: timed out after 10 seconds or idempotent set to OFF or method not idempotent




Weblogic console and SOA consoles were not coming and web page was showing above message:


Solution: We thought webservers are not up so thought of checking web server status by following the below command but found that OHS services are up and running. So thought of checking Admin server and found that Admin server was not up and running so restarted admin servers and issue was resolved.


Used following command to check if Admin server is up and running. in result there was only one line so it was not up and running..


Steps to check if Admin Server is up and running ==>
 ps -ef | grep Admin


oracle   29597 12083  0 14:09 pts/5    00:00:00 grep Admin


Steps to start Admin Server: ==>


source /home/oracle/.bash_profile
nohup $DOMAIN_HOME/bin/startWebLogic.sh &> /entlogs/GEM_SOA_Domain/runtime/AdminServer.out &
echo "Starting Admin Server ..."
echo "Sending std output to /entlogs/GEM_SOA_Domain/runtime/AdminServer.out"


Steps to check if OHS is up and running ==>


$Middleware_Home/Oracle_WT1/instances/instance1/bin




$ ./opmnctl status
Processes in Instance: instance_instance1
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
ohs_instance1               | OHS                |   11027 | Alive





Wednesday, February 1, 2017

How to generate permission denied error in CIFS mount point


There was a requirement to generate permission denied error in CIFS mount point when ever user was accessing the mount point. in out case /BRKTS

in /etc/fstab following lines gives full access
//setappprodn98/VAL         /BRKTS          cifs  username=sell_user,domain=na,password=123hjsdT,iocharset=utf8,sec=ntlm  0  0


in /etc/fstab following lines gives permission denied access
//setappprodn98/VAL         /BRKTS          cifs  credentials=/root/.cifsauth/intg_val_auth,uid=sell_user,gid=selluser_fileshare_val,iocharset=utf8,file_mode=0770,dir_mode=0770  0  0


Friday, January 20, 2017

Oracle SQL query to search records created on weekends in B2B 10g

Oracle SQL query to search records created on weekends


select * from B2B_INSTANCEMESSAGE where DOCUMENTTYPE='850 4010'

 where
TO_CHAR (messagedatetime, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') IN ('SAT', 'SUN');

Saturday, January 14, 2017

How to remount device in Linux



I had read only mount point /MOUNTDIRLIVE and wanted to change it for read and write so used following Linux command:


sudo mount -o rw,remount /MOUNTDIRLIVE