Virtual Host Entry in WebSphere

Virtual host name entry could be found in plugin-cfg.xml of a server profile in WebSphere. It is mostly used to configure the port details which forms the complete URL for an application like http://serverName.application.com:55295/loan/casmgmt.htm

Location of an Application Server Profile:-
/WebSphere/7/AppServerBase1/profiles/AppServerBase1/installedApps/Server_Application_Cell/ear/Loan_Application.ear

Location of a file:-
/WebSphere/7/AppServerBase1/profiles/AppServerBase1/config/cells/plugin-cfg.xml

   <VirtualHostGroup Name="Loan_Application">
      <VirtualHost Name="*:55295"/>
   </VirtualHostGroup>
Advertisements

SQL query to extract XML data from Oracle table

Following query will help to extract the information of xml element from stored XML data in Oracle table.

select
	XMLTYPE(ad.ad_profile).EXTRACT('//bankId').getStringVal(), 
	XMLTYPE(ad.ad_profile).EXTRACT('//altDesc').getStringVal(), 
	DECODE(ad.adsta_id, 1, 'Success', 2, 'Failure')
from 
	alert_delivery ad
where 
	ad.altd_id in (1001,1002)
group by 
	XMLTYPE(ad.ad_profile).EXTRACT('//bankId').getStringVal(), 
	XMLTYPE(ad.ad_profile).EXTRACT('//altDesc').getStringVal(), 
	ad.adsta_id;

SQL script to grant the access to Schema owners

Sometimes, we need a SQL script to grant the access of different objects to multiple schema owners. Following script could be used as a reference :-

  
FOR R IN (SELECT owner, object_name from all_objects 
                where object_type in ('FUNCTION', 'PROCEDURE') 
                and owner in ('USR_APP', 'PRO_APP', 'TXN_APP')) LOOP
        execute immediate 'grant execute on ' || R.OWNER || '.' || R.Object_Name || ' to ' || 'SC_READ_ONLY_ACCESS';
END LOOP;

Happy Coding !!