{"id":994,"date":"2022-10-17T05:49:50","date_gmt":"2022-10-17T05:49:50","guid":{"rendered":"https:\/\/craftcookcode.com\/?p=994"},"modified":"2022-11-28T02:30:51","modified_gmt":"2022-11-28T02:30:51","slug":"power-bi-and-the-lost","status":"publish","type":"post","link":"https:\/\/craftcookcode.com\/?p=994","title":{"rendered":"Power BI and the lost tnsnames.ora file"},"content":{"rendered":"<p>A distraught user contacted me today with a problem that her Power BI dashboard was not refreshing and returning the following error:<\/p>\n<blockquote>\n<pre>OLE DB:ORA-12154: TNS:could not resolve the connect identifier specified<\/pre>\n<\/blockquote>\n<p>The problem was not just isolated to her; but common across all her team.<\/p>\n<p>I&#8217;m not an expert on Oracle and Power BI; and I kindly suggest for her to contact the Helpdesk.\u00a0 She came back a few minutes later saying that the Helpdesk just passed her off unceremoniously to another team.<\/p>\n<p>Deciding to give her a hand &#8211; I had a think about the error message.<\/p>\n<p><a href=\"https:\/\/www.orafaq.com\/wiki\/Tnsnames.ora\">TNS files<\/a> seem to end up in all sorts of weird and wonderful locations on our organisation&#8217;s systems.<\/p>\n<p>I also remembered that there was a patching of the Oracle client just done last week.<\/p>\n<p>I asked her to do a search for <em><strong>tnsnames.ora<\/strong><\/em> on her C drive.<\/p>\n<p>Meanwhile I ran the following command through the command line on my own computer; which should be a similar configuration:<\/p>\n<pre>echo %TNS_ADMIN%\n<\/pre>\n<p>She got back:<\/p>\n<pre>C:\\app\\product\\12.1.0\\client_1\\network\\admin<\/pre>\n<p>And I got back:<\/p>\n<pre>C:\\app\\product\\19.3.0\\client_1\\network\\admin<\/pre>\n<style>\/*! elementor - v3.7.8 - 02-10-2022 *\/<br \/>\n.elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=\".svg\"]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block}<\/style>\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"http:\/\/craftcookcode.com\/wp-content\/uploads\/2022\/10\/TNS_Command-1024x587.png\" sizes=\"(max-width: 740px) 100vw, 740px\" srcset=\"https:\/\/craftcookcode.com\/wp-content\/uploads\/2022\/10\/TNS_Command-1024x587.png 1024w, https:\/\/craftcookcode.com\/wp-content\/uploads\/2022\/10\/TNS_Command-300x172.png 300w, https:\/\/craftcookcode.com\/wp-content\/uploads\/2022\/10\/TNS_Command-768x440.png 768w, https:\/\/craftcookcode.com\/wp-content\/uploads\/2022\/10\/TNS_Command.png 1359w\" alt=\"\" width=\"740\" height=\"424\" \/><\/p>\n<p>My hypothesis that IT installed a new version of the Oracle client and this process updated the %TNS_ADMIN% field.<\/p>\n<p>What the patching didn&#8217;t do was to shift the tnsnames.ora file to the new directory of <strong>C:\\app\\product\\19.3.0\\client_1\\network\\admin<\/strong>.<\/p>\n<p>When Power BI tried to run an Oracle query; it was using the new client installation and hence not finding the tnsnames.ora file.<\/p>\n<p>After copying the TNS file into the correct directory; right away she was able to rerun her Power BI dashboard.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A distraught user contacted me today with a problem that her Power BI dashboard was not refreshing and returning the following error: OLE DB:ORA-12154: TNS:could not&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":995,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[13,17],"tags":[29,27,26,28],"class_list":["post-994","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code","category-sql","tag-ora-12154","tag-oracle","tag-powerbi","tag-tnsnames-ora"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts\/994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=994"}],"version-history":[{"count":6,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts\/994\/revisions"}],"predecessor-version":[{"id":1054,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/posts\/994\/revisions\/1054"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=\/wp\/v2\/media\/995"}],"wp:attachment":[{"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/craftcookcode.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}