Foro de elhacker.net

Programación => Bases de Datos => Mensaje iniciado por: BlackZeroX en 8 Mayo 2020, 05:07 am



Título: [Solved] Oracle REGEXP se queda trabado
Publicado por: BlackZeroX en 8 Mayo 2020, 05:07 am
Disculpen mi ignoracia pero alguien sabe por que las funciones REGEXP_INSTR y REGEXP_LIKE se quedan trabadas en Oracle 10?

Entiendo que son costosas pero que no respondan ya es mucho...

Mi problema radica en esta consulta (no termina)

Código
  1. SELECT
  2. NVL(REGEXP_INSTR('(HTTP 500) - soapenv:ServerOSB-382500: OSB Service Callout action received SOAP Fault responseOSB-382500OSB Service Callout action received SOAP Fault responsesoapenv:Server(CM1-000559) Stop collection treatment is not allowed on this account.amdocs.csm3g.exceptions.CMValidateException: (CM1-000559) Stop collection treatment is not allowed on this account.StopCollectionPipelinePairNoderequest-ac42ea5.N370c41ec.0.153414147d5.N7967StopCollectionTreatmrntServiceCalloutStagerequest-pipeline; nested',
  3. '(\r|\n|.)*\(HTTP 500\) \- soapenv\:ServerOSB\-382500(.*)\(CM1\-000559\) Stop collection treatment is not allowed on this(\r|\n|.)*'), 0) indexlarge
  4. FROM DUAL;
  5.  

Solucion:

No usar \r y \n en las expresiones regulares (estas dos me mataban la ejecución) y que no sean mayores a 512 bytes.

Queda la query (use otros parámetros que no son necesarios realmente, igual sin ellos me funciono):

Código
  1. SELECT
  2. NVL(REGEXP_INSTR('(HTTP 500) - soapenv:ServerOSB-382500: OSB Service Callout action received SOAP Fault responseOSB-382500OSB Service Callout action received SOAP Fault responsesoapenv:Server(CM1-000559) Stop collection treatment is not allowed on this account.amdocs.csm3g.exceptions.CMValidateException: (CM1-000559) Stop collection treatment is not allowed on this account.StopCollectionPipelinePairNoderequest-ac42ea5.N370c41ec.0.153414147d5.N7967StopCollectionTreatmrntServiceCalloutStagerequest-pipeline; nested',
  3. '(.)*\(HTTP 500\) \- soapenv\:ServerOSB\-382500(.*)\(CM1\-000559\) Stop collection treatment is not allowed on this(.)*', 1, 1, 0, 'ni'), 0) indexlarge
  4. FROM DUAL;

Saludos.


Título: Re: Oracle REGEXP se queda trabado
Publicado por: rub'n en 8 Mayo 2020, 07:31 am
Disculpen mi ignoracia pero alguien sabe por que las funciones REGEXPT_INSTR y REGEXP_LIKE se quedan trabadas en Oracle 10?

Entiendo que son costosas pero que no respondan ya es mucho...

Mi problema radica en esta consulta (no termina)

Código
  1. SELECT
  2. NVL(REGEXP_INSTR('(HTTP 500) - soapenv:ServerOSB-382500: OSB Service Callout action received SOAP Fault responseOSB-382500OSB Service Callout action received SOAP Fault responsesoapenv:Server(CM1-000559) Stop collection treatment is not allowed on this account',
  3. '(\r|\n|.)*\(HTTP 500\) \- soapenv\:ServerOSB\-382500(.*)\(CM1\-000559\) Stop collection treatment is not allowed on this(\r|\n|.)*'), 0)
  4. FROM DUAL;

Saludos.

REGEXP_INSTR sin la T dog.

y dulces y sangrientas lunasssssss


Título: Re: Oracle REGEXP se queda trabado
Publicado por: BlackZeroX en 8 Mayo 2020, 16:02 pm
REGEXP_INSTR sin la T dog.

y dulces y sangrientas lunasssssss

No nada que ver, ejecuta el código en Oracle Live SQL y veras que solo saltan errores o no termina.

Esto solo ocurre con cadenas largas y expresiones largas.

Saludos.


Título: Re: Oracle REGEXP se queda trabado
Publicado por: BlackZeroX en 8 Mayo 2020, 17:29 pm
Ya quedo solucionado.

La solución esta en el 1er Post.

Saludos.