Test Foro de elhacker.net SMF 2.1

Programación => Desarrollo Web => 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 (sql) [Seleccionar]

SELECT
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',
'(\r|\n|.)*\(HTTP 500\) \- soapenv\:ServerOSB\-382500(.*)\(CM1\-000559\) Stop collection treatment is not allowed on this(\r|\n|.)*'), 0) indexlarge
FROM DUAL;


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 (sql) [Seleccionar]
SELECT
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',
'(.)*\(HTTP 500\) \- soapenv\:ServerOSB\-382500(.*)\(CM1\-000559\) Stop collection treatment is not allowed on this(.)*', 1, 1, 0, 'ni'), 0) indexlarge
FROM DUAL;


Saludos.
Título: Re: Oracle REGEXP se queda trabado
Publicado por: rub'n en 8 Mayo 2020, 07:31 AM
Cita de: BlackZeroX (Astaroth) en  8 Mayo 2020, 05:07 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 (sql) [Seleccionar]
SELECT
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',
'(\r|\n|.)*\(HTTP 500\) \- soapenv\:ServerOSB\-382500(.*)\(CM1\-000559\) Stop collection treatment is not allowed on this(\r|\n|.)*'), 0)
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
Cita de: rub'n en  8 Mayo 2020, 07:31 AM
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.