Forum Discussion

yaman123's avatar
yaman123
Post Partisan
11 months ago

Oracle: ORA-12154: Cannot connect to database... error on Service

Hi all, 

 

I was having issues yesterday regarding refreshing the reports from desktop. This has now been resolved by installing the July update Desktop version as the bug is in the September update. 

 

I am now having issues with the Service  where the same error is appearing for the oracle db connection and the auto refreshes are failing. Nothing has changed in terms of username, password, gateway settings. The gateway is online and no errors show. The error below shows for the connection and says status 'offline'. 

 

"Unable to update connection credentials. Unable to connect to the data source. Either the data source is inaccessible, a connection timeout occurred, or the data source credentials are invalid. Please verify the data source configuration and contact a data source administrator to troubleshoot this issue.

Details: fm_bi_gateway (28052012): Oracle: ORA-12154: Cannot connect to database. Cannot find alias XXXX in DataSources, , EZConnect. https://docs.oracle.com/error-help/db/ora-12154/"

9 Replies

  • Hi yaman123,

    The official documentation states that the ORA-12154 error happens when the Oracle alias can't be resolved, often because tnsnames.ora is missing or set up incorrectly. It recommends confirming that the 64-bit Oracle Client for Microsoft Tools (OCMT) is installed on the Gateway machine and that the alias is properly configured in tnsnames.ora. The documentation also suggests testing the connection through Power BI Desktop on the Gateway machine to make sure everything is set up correctly.

    Manage your data source - Oracle - Power BI | Microsoft Learn

    Power Query Oracle database connector - Power Query | Microsoft Learn

     

    Thank you.

    • yaman123's avatar
      yaman123
      Post Partisan

      Nothing has changed in tnsnames or oracle db connections. The issue all of a sudden appeared yesterday around 10am UK time. From previous posts, this could be due to the Sept update. 

  • Hi yaman123

     

    I’d build on what’s already in the thread with two points:

    1) ORA-12154 in the Service almost always means the gateway machine can’t resolve your Oracle connect identifier.

    2) the September Desktop bug people are seeing is real, but Desktop and the Service take different paths. Desktop uses the PC you’re on; the Service uses the on-premises data gateway and whatever Oracle client and environment that server has.

    Here's some troubleshooting steps:

    1. Bypass TNS and test Easy Connect
      Edit the Oracle data source in the Service and set Server to this format:
      host:port/service_name
      Example: db01.yourcorp.local:1521/SALES. If Test Connection succeeds, your TNS name resolution on the gateway is the culprit. Docs: Power Query Oracle connector and Oracle’s Easy Connect syntax here.
    2. Check if your gateway updated
      Many orgs update the gateway monthly. If your issue began recently, that can align with an update or a service restart that dropped environment variables. Check the gateway version and consider testing July or August 2025 on a spare node or rollback if needed (supported versions and downloads are listed here): gateway monthly updates.
    3. Reassert TNS on the gateway server
      On the gateway box, set a system environment variable TNS_ADMIN to the folder with tnsnames.ora and sqlnet.ora, ensure the gateway service account can read it, then restart the “On-premises data gateway” Windows service. Guide: Manage your Oracle data source via gateway.
    4. Prove it from the gateway as the service account
      On the gateway host, run tnsping <your_alias> and connect with SQL*Plus or SQL Developer using that alias. If tnsping fails, ORA-12154 is expected. Oracle’s definition of 12154 is clear that it’s a name resolution problem: Oracle ORA-12154.
    5. Rebind and test in the Service
      In the dataset settings, bind to the validated gateway data source and hit Test Connection. Reference: gateway binding steps.

    If you confirm Easy Connect works in the Service, I’d leave it in place and circle back to TNS later. If neither Easy Connect nor TNS works and you’ve validated firewall and listener, I’d open a Microsoft ticket and include gateway version, Oracle client version, TNS_ADMIN path, the exact Server value you used, and tnsping output from the gateway host.

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

    • yaman123's avatar
      yaman123
      Post Partisan

      Hi tayloramy 

       

      Thanks - i will try those steps. Its a bit strange how this occured all of a sudden as no changes are made to our connections, tnsnames, firewalls, vpns or servers. Refreshes were ok until yesterday. 

      • tayloramy's avatar
        tayloramy
        Super User

        Hi yaman123

         

        This is been a frustration with me with Fabric for a little bit. Sometimes Microsoft updates things on their end and it breaks existing things. At my org I update the gateways monthly to try and prevent this, but somethings that brings up other issues. 

         

        I love Fabric, but the change management around it could be a little better. 

         

        Let me know if those suggestions don't work and we can figure out another solution for you. 

         

        If you found my suggestions helpful, I would approciate some kudos (gotta earn those ranks somehow :P) 

         

        If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

  • Another post on a separate thread mentioned that everything works if you go back to the July upgrade so it's fairly evident that the September update broke it.

  • This is an update/workaround from Microsoft regarding the issue 

     

     

    • v-saisrao-msft's avatar
      v-saisrao-msft
      Community Support

      Hi yaman123,

      According to Microsoft’s latest update, the issue is still under investigation. In the meantime, the recommended workaround is to roll back to an earlier version of Desktop until a fix is provided.

       

      Thank you.