Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Bad Gateway Execute Oracle Query

(0) ShareShare
ReportReport
Posted on by 263
Could someone please help me with this problem? I get it when I want to run a query using Oracle.
I really don't understand anything. Is it a problem with my gateway ? Of the Query?
 
  "error": {
    "code"502,
    "source""brazil-001.azure-apim.net",
    "clientRequestId""d39301c2-1f51-4656-bcb9-05eb194754fa",
    "message""BadGateway",
    "innerError": {
      "status"502,
      "message""Unexpected Exception : [0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.GatewayClientMaxPacketLimitReachedException: packet reached the maximum limit = '4' at gateway client.\r\n\r\nGatewayPipelineErrorCode=DM_GWPipeline_Client_MaxPacketLimitReached\r\nGatewayVersion=\r\nMaxPacketLimitReachedCount=4\r\n  ([0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.GatewayClientMaxPacketLimitReachedException.StackTrace:)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.Relay.Service.GatewayClientRemoter.<>c__DisplayClass21_1.<<TransferImpl>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.GatewayDiagnostics.GatewayDiagnosticsTelemetryServiceBase.<ExecuteInActivity>d__6.MoveNext()\r\n--\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.PowerBI.DataMovement.Pipeline.AdoNetProvider.AdoNetProviderReader.<ReadAsync>d__64.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at Microsoft.Azure.Connectors.Common.Mashup.Adapter.QueryResult.<ReadSingleResultSetAsync>d__35.MoveNext() in X:\\bt\\1082352\\repo\\src\\source\\common\\Mashup\\Adapter\\QueryResult.cs:line 338\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Azure.Connectors.Common.Mashup.Adapter.GatewayNativeQueryExecutor.<ExecuteQueryAsync>d__7.MoveNext() in X:\\bt\\1082352\\repo\\src\\source\\common\\Mashup\\Adapter\\GatewayNativeQueryExecutor.cs:line 233\r\n     inner exception: packet reached the maximum limit = '4' at gateway client.\r\nclientRequestId: d39301c2-1f51-4656-bcb9-05eb194754fa",
       },

This is the query, for what it's worth

SELECT DISTINCT CT.COD_CATEGORIA_ARCH, CT.DESC_CATEGORIA_ARCH, FV.CORR_FICHA, TF.COD_TIPO,DK.DIRECTORIO, FV.NRO_FICHA||'_'||FV.NOM_ARCHIVO as NOMBRE_ARCHIVO, 
FV.DESC_ARCHIVO, FV.FEC_CARGA, FV.FECHA_VIGENCIA, FV.COD_ESTADO, SUC.NOM_SUC,F.RUT_CLI AS RUT_CLIENTE, CL.RAZON_SOCIAL,FV.NRO_FICHA,
ESTADO_FICHA_VENTA(FV.NRO_FICHA,SYSDATE)||' - '||ES.DESC_ESTADO ESTADO_FICHA_VENTA, (SYSDATE) FECHA_ESTADO_FICHA, TF.DESCRIPCION_TIPO AS SUBTIPO
FROM ANEXO_NUMERO_FICHAS FV, FICHA_VENTA F, DIR_KSA DK, TIPO_FICHA_ANEXOS TF, CLIENTE CL, SUCURSAL SUC, CATEGORIA_TIPO_ARCHIVOS CT, ESTADO ES 
WHERE FV.NRO_FICHA = F.NRO_FICHA AND DK.COD_SISTEMA = FV.COD_SISTEMA AND DK.COD_TIPO_DIR  = FV.COD_TIPO_DIR AND TF.COD_TIPO  = FV.COD_TIPO AND F.RUT_CLI = CL.RUT_CLI 
AND F.COD_SUC = SUC.COD_SUC AND TF.COD_CATEGORIA_ARCH = CT.COD_CATEGORIA_ARCH AND ESTADO_FICHA_VENTA(F.NRO_FICHA,SYSDATE) = ES.COD_ESTADO
AND FV.COD_ESTADO = 1 /*Vigente*/AND FV.FEC_CARGA >= TO_DATE('20190101','YYYYMMDD')AND FV.FEC_CARGA <= TO_DATE('20191231','YYYYMMDD'ORDER BY FV.NRO_FICHA DESC



      "source""oracle-bs.azconn-bs.p.azurewebsites.net"
  • elaaadani Profile Picture
    263 on at
    Re: Bad Gateway Execute Oracle Query

    Thank you for your reply.
    Yes, I have installed Oracle Client and the gateway in my machine.

    I realized that I was missing the port

     


    I put in this in the Server Address connector : IP address:port/SID
    Now it works fine. Thank you very much for the guide !

  • Verified answer
    PrasadAthalye Profile Picture
    on at
    Re: Bad Gateway Execute Oracle Query

    Did you install Oracle Connectivity drivers on your machine? Are you able to run the query using TOAD or SQL Developer? Please refer to my blog for Connectivity drivers... Also, are you providing the IP address of the host?

     

    https://lazermonkey.wordpress.com/2018/10/28/integrate-sharepoint-data-to-on-premise-oracle-using-flow/

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1