Esta nota es de otra pagina, asi que solo coloco los enlaces
http://bharatgali.net/10g_apache_hardening.htm
este enlace es bueno, pero no muy didactico
http://www.red-database-security.com/wp/DOAG_2004_us.pdf
Este blog sera utilizado para difundir tips de programacion y configuracion sobre plataformas Oracle, Microsoft, Sybase y otros. Esta informacion ha sido extraida de multiples fuentes, sobre las cuales he personalizado para adecuarlo a nuestra realizada.
domingo, 11 de diciembre de 2011
lunes, 11 de julio de 2011
RWRUN Oracle Reports
Otra nota tecnica del metalink, que genera la caida del servidor reports. Este error es frecuente en plataformas Windows.
Para superar este problema, Oracle recomienda la aplicacion de un parche, el p9774440_10123_WINNT, pero la solucion mas obvia es no usar el RWRUN.
Cause
The rwrun (from 9i/10g) is not functionally equivalent to the rwrun60 in 6i.
In fact, rwrun was not designed for production environments (unlike rwrun60) rather only for testing purposes.
This has also been updated in the documentation of 10.1.2.0.2 publishing reports to web.
Solution
It is recommended that you use rwrun for testing purposes only.
Use in your production environment to take full advantage of the power of OracleAS Reports Services.
Para superar este problema, Oracle recomienda la aplicacion de un parche, el p9774440_10123_WINNT, pero la solucion mas obvia es no usar el RWRUN.
Cause
The rwrun (from 9i/10g) is not functionally equivalent to the rwrun60 in 6i.
In fact, rwrun was not designed for production environments (unlike rwrun60) rather only for testing purposes.
This has also been updated in the documentation of 10.1.2.0.2 publishing reports to web.
Solution
It is recommended that you use rwrun for testing purposes only.
Use in your production environment to take full advantage of the power of OracleAS Reports Services.
Problemas en la ejecucion del script chgiphost.sh despues de parchar el OAS a la version 10.1.2.3
Esta nota es extraido del Metalink pero se considera su difusion debido a recurrencia de este problema en varias empresas
chgiphost.sh Fails with java.lang.UnsatisfiedLinkError Can't find library pass (libpass.so or .so) in sun.boot.library.path or java.library.path [ID 734821.1]
Symptoms
When running chgiphost.sh the following error happens:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't find library pass (libpass.so or .so)
In the install log:
Change Hostname/IP completed successfully.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't find library pass (libpass.so or .so) in sun.boot.library.path or java.library.path
sun.boot.library.path=<path_to_oracle_home>/jdk/jre/bin
java.library.path=<path_to_oracle_home>/jdk/bin:<path_to_oracle_home>/jdk/jre/bin/classic:<path_to_oracle_home>/jdk/jre/bin:<path_to_oracle_home>/bin:<path_to_oracle_home>/lib32:<path_to_oracle_home>/chgip/lib:<path_to_oracle_home>/jdk/jre/bin/sovvm:/usr/lib
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2044)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:910)
at oracle.chgip.InteractiveInterfaceManager.<clinit>(InteractiveInterfaceManager.java:72)
at oracle.chgip.InterfaceManager.createInterfaceManager(InterfaceManager.java:133)
at oracle.chgip.InterfaceManager.getInterfaceManager(InterfaceManager.java:113)
at oracle.chgip.Session.<init>(Session.java:81)
at oracle.chgip.StartUp.main(StartUp.java:250)
+ exit 1
Changes
This issue happens after installing the Oracle Application Server 10g Release 2 Patch Set 3 (10.1.2.3.0).
Cause
There is a bug in the 10.1.2.3 patchset with the libpass.so file, as an incorrect library was included in the patchset media. Bug 7000666 has been filed for this.
Solution
Download and install Patch 7000666 for Linux x86
Download and install Patch 7685739 for AIX
Install patch
Run chgiphost.sh
If this issue is experienced on other platforms or versions, please request a Backport.
Configuración del ORACLE FORMS (OAS 10GR2) para soporte de varias versiones de java plugin
Para hacer uso de varios jre, se hace necesario modificar el archivo formsweb.cfg de acuerdo a como esta en las imagenes.
En los ejemplos se muestra la configuracion para el uso del JRE 1.5 y el JRE 1.6 de SUN Esta configuracion solo aplica despues de aver llegado al OAS a la version 10.1.2.3.0 o superior.
En los ejemplos se muestra la configuracion para el uso del JRE 1.5 y el JRE 1.6 de SUN Esta configuracion solo aplica despues de aver llegado al OAS a la version 10.1.2.3.0 o superior.
Para mayor informacion me pueden escribir a mi correo javier.delgado@evolvenetwork.com
AJAX con PLSQL
Para este ejemplo consideraremos que tratamos de hacer un combo box donde se pueda seleccionar departamente, provincia y distrito y la informacion sera extraida de un programa PLSQL el cual sera
invocado como si fuera AJAX.
Esta programacion fue aplicada en un Oracle Portal 10GR2.
Por ejemplo, buscamos lograr esto
Para lograr esto, necesitamos 3 cosas
1.- Un store procedure que devulva los valores deseadas como si se tratase de una invocacion AJAX
2.- Un JScript que invoque el programa AJAX
3.- El formulario que muestre la informacion deseada
Para el punto 1, tenemos el siguiente ejemplo
Se asume que se tiene una tabla UBIGEO con la estructura
Codigo varchar2(6),descripcion varchar2(100)
la informacion almacenada en esta tabla tiene la siguiente estructura.
entoces creamos el siguiente package
invocado como si fuera AJAX.
Esta programacion fue aplicada en un Oracle Portal 10GR2.
Por ejemplo, buscamos lograr esto
Para lograr esto, necesitamos 3 cosas
1.- Un store procedure que devulva los valores deseadas como si se tratase de una invocacion AJAX
2.- Un JScript que invoque el programa AJAX
3.- El formulario que muestre la informacion deseada
Para el punto 1, tenemos el siguiente ejemplo
Se asume que se tiene una tabla UBIGEO con la estructura
Codigo varchar2(6),descripcion varchar2(100)
la informacion almacenada en esta tabla tiene la siguiente estructura.
| 010202 | ARAMANGO/BAGUA/AMAZONAS |
entoces creamos el siguiente package
create or replace package body pkg_ajax as
procedure get_ubigeo (p_id in varchar2 default null,
p_level in varchar2 default null) ;
end;
create or replace package body pkg_ajax asprocedure get_ubigeo (p_id in varchar2 default null,p_level in varchar2 default null)isl_contador integer;cursor c isselect DISTINCT SUBSTR(codigo,1,2) codigo,substr(descripcion, instr(descripcion,'/', instr(descripcion,'/',-1))+1,LENGTH(DESCRIPCION) ) descripcionfrom ubigeo;cursor d (p_codigo varchar2)isselect distinct SUBSTR(codigo,1,4) codigo,substr(descripcion, instr(descripcion,'/',1) +1 ,(instr(descripcion,'/', instr(descripcion,'/',1)+1) ) - (instr(descripcion,'/',1) +1)) descripcionfrom ubigeowhere SUBSTR(codigo,1,2) like p_codigo;cursor e (p_codigo varchar2) isselect codigo, substr(descripcion ,1,(instr(descripcion,'/',1) -1)) descripcionfrom ubigeo where SUBSTR(codigo,1,4) like p_codigo;l_retorno varchar2(4000);BEGINif p_id is null and p_level is null thenhtp.p(' --->>Sin Informacion Disponible<<');return;end if;case p_levelwhen '1' thenselect count(*) into l_contadorfrom (select DISTINCT SUBSTR(codigo,1,2) codigo, substr(descripcion, instr(descripcion,'/', instr(descripcion,'/',-1))+1, LENGTH(DESCRIPCION) )descripcionfrom ubigeo);l_retorno := lpad(l_contador,5,'0');for cc in c loopl_retorno := l_retorno ||'---'|| cc.codigo ||'---'|| cc.descripcion;end loop;when '2' thenselect count(*) into l_contadorfrom(select DISTINCT SUBSTR(codigo,1,4) codigo,substr(descripcion, instr(descripcion,'/',instr(descripcion,'/',-1))+1,LENGTH(DESCRIPCION) ) descripcionfrom ubigeo where SUBSTR(codigo,1,2) like p_id);l_retorno := lpad(l_contador,5,'0');for dd in d(p_id) loopl_retorno := l_retorno ||'---'|| dd.codigo ||'---'|| dd.descripcion;end loop;when '3' thenselect count(*) into l_contadorfrom (select DISTINCT codigo, substr(descripcion, instr(descripcion,'/', instr(descripcion,'/',-1))+1, LENGTH(DESCRIPCION) ) descripcion from ubigeowhere SUBSTR(codigo,1,4) like p_id);l_retorno := lpad(l_contador,5,'0');for ee in e(p_id) loopl_retorno := l_retorno ||'---'|| ee.codigo ||'---'|| ee.descripcion;end loop;end case;htp.p(l_retorno);exception when others thenhtp.p(' --- >>Sin Informacion Disponible<<');END ;end;A este package le hacemos unGRANT execute ON PKG_AJAX to ANNONYMOUS;GRANT execute ON PKG_AJAX to PUBLIC;Para el punto 2 este seria el JScript que requerimos<script type="text/javascript" language="javascript"> function AddItem(Text,Value) { // Create an Option object var opt = document.createElement("option"); opt.text = Text; opt.value = Value; // Add an Option object to Drop Down/List Box document.fSolicitud.p_direccion.options.add(opt); // Assign text and value to Option object } function AddItemEnt(Text,Value) { // Create an Option object var opt = document.createElement("option"); opt.text = Text; opt.value = Value; // Add an Option object to Drop Down/List Box document.fSolicitud.p_direcciondest.options.add(opt); // Assign text and value to Option object } function makeRequest(tipo,url) { // // This javascript function makes the connection // to the server to execute a script // var httpRequest; if (window.XMLHttpRequest) { // Mozilla, Safari, ... //alert("Create a new httpRequest for Mozilla"); httpRequest = new XMLHttpRequest(); if (httpRequest.overrideMimeType) { httpRequest.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { // IE //alert("Create a new httpRequest for IE"); try {httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try {httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!httpRequest) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } httpRequest.onreadystatechange = function() { alertContents(httpRequest,tipo); }; httpRequest.open('GET', url, true); httpRequest.send(null); } //end function makeRequest(url) function alertContents(httpRequest,tipo) { // // This function collects the response from the server // and puts it into a form variable // if (httpRequest.readyState == 4) { if (httpRequest.status == 200) { if (httpRequest.responseText == "Valid\n") { alert("A valid response was returned"); } else { var str=httpRequest.responseText; var strRazonSocial=str.substr(6,100); var strCODUSU=str.substr(0,5); var strTotal=str.substring(107,109); var numTotal=strTotal.to var strDirecciones=str.substring(115,str.length -65); var strcoddir; var strcodsubdir; var strdireccion; var pos1; var pos2; var cadena = "XYZW"; if (tipo == 5 ) { document.fSolicitud2.p_provinciapartida.options.length=0; document.fSolicitud2.p_ubigeo.options.length=0; strcodubigeo=""; strdescripcion=""; strTotal=str.substring(0,5); strUBIGEO=str.substring(8,str.legth); document.fSolicitud2.p_provinciapartida.add(new Option("", ""), null) for (i=1;i<=strTotal;i++) { pos2 = strUBIGEO.search("---"); strcodubigeo= strUBIGEO.substring(0,pos2); strUBIGEO=strUBIGEO.substring(pos2+3,strUBIGEO.length) pos2 = strUBIGEO.search("---"); if (pos2 == -1 ) { pos2 = strUBIGEO.length-66; } strdescripcion= strUBIGEO.substring(0,pos2); strUBIGEO=strUBIGEO.substring(pos2+3,strUBIGEO.length) document.fSolicitud2.p_provinciapartida.add(new Option(strdescripcion, strcodubigeo), null) } } if (tipo == 6 ) { document.fSolicitud2.p_ubigeo.options.length=0; strcodubigeo=""; strdescripcion=""; strTotal=str.substring(0,5); strUBIGEO=str.substring(8,str.legth); for (i=1;i<=strTotal;i++) { pos2 = strUBIGEO.search("---"); strcodubigeo= strUBIGEO.substring(0,pos2); strUBIGEO=strUBIGEO.substring(pos2+3,strUBIGEO.length) pos2 = strUBIGEO.search("---"); if (pos2 == -1 ) { pos2 = strUBIGEO.length-66; } strdescripcion= strUBIGEO.substring(0,pos2); strUBIGEO=strUBIGEO.substring(pos2+3,strUBIGEO.length) document.fSolicitud2.p_ubigeo.add(new Option(strdescripcion, strcodubigeo), null) } } } } else { alert('There was a problem with the request.'); } } } //end function alertContents(httpRequest) </script>Para el punto 3, aca la setencia de codigo PLSQLhtp.p('<tr>'); htp.p('<td>'); l_text_name := 'Dep\Prov\Dist.:'; l_text := wwui_api_portlet.portlet_heading(p_string => l_text_name, p_level => 1);htp.p(l_text); htp.p('</td>'); htp.p('<td colspan=3>'); htp.formSelectOpen('p_departamentopartida',cattributes=> 'onchange="makeRequest(5,''/portal/pls/portal/comun.pkg_ajax.get_ubigeo?p_level=2&p_id='' + p_departamentopartida[p_departamentopartida.selectedIndex].value);"'); /*Para verificar el codigo extranido*/--htp.formSelectOpen('p_departamentopartida',cattributes=> 'onchange="alert( p_departamentopartida[p_departamentopartida.selectedIndex].value);"'); htp.formselectOption(''); for zz in z loop if SUBSTR(lpad(L_CODUBIGEO,6,'0'),1,2) = zz.codigo then htp.formselectOption(zz.descripcion,'selected','VALUE="'||zz.codigo||'"'); else htp.formselectOption(zz.descripcion,null,'VALUE="'||zz.codigo||'"'); end if; end loop; htp.formSelectClose; htp.formSelectOpen('p_provinciapartida',cattributes=> 'onchange="makeRequest(6,''/portal/pls/portal/comun.pkg_ajax.get_ubigeo?p_level=3&p_id='' + p_provinciapartida[p_provinciapartida.selectedIndex].value);"'); for zz1 in z1(SUBSTR(lpad(L_CODUBIGEO,6,'0'),1,2)) loop if SUBSTR(lpad(L_CODUBIGEO,6,'0'),1,4) = zz1.codigo then htp.formselectOption(zz1.descripcion,'selected','VALUE="'||zz1.codigo||'"'); else htp.formselectOption(zz1.descripcion,null,'VALUE="'||zz1.codigo||'"'); end if;end loop; htp.formSelectClose; htp.formSelectOpen('p_ubigeo'); for zz2 in z2(substr(lpad(L_CODUBIGEO,6,'0'),1,4)) loop if lpad(L_CODUBIGEO,6,'0') = zz2.codigo then htp.formselectOption(zz2.descripcion,'selected','VALUE="'||zz2.codigo||'"'); else htp.formselectOption(zz2.descripcion,null,'VALUE="'||zz2.codigo||'"'); end if; end loop; htp.formSelectClose; htp.p('</td></tr>');Para mayor informacion o Aopoyo, pueden contactarme al sigueinte correo: javier.delgado@evolvenetwork.comSaludos
Suscribirse a:
Comentarios (Atom)

