Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PeeWee33
Frequent Visitor

Oracle connection failed in service, not in PowerBI desktop

I have a .pbix file with a connection to Oracle. In the PBIX there is an Oracle SQL statement to retrieve data. This al works fine when I get data and refresh as long as I do this in PowerBI desktop.

 

In PowerBI service I am not able to refresh my data. I have a working gateway set up that works fine with other datasets. When I try to refresh this dataset I get an Oracle error:  

{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"Oracle: ORA-01843: not a valid month"}},

 

Anyone got an Idea why this works in the desktop and not in the service?

1 ACCEPTED SOLUTION
PeeWee33
Frequent Visitor

Thanks Matt

 

I finally gott it working.  I had a working function to convert a datetime to a date. 

to_date(to_char(mytimecolumn, 'DD-MM-YYYY'))

 

I changed it to trunc(mytimecolumn)  and now I works just fine. I've got a feeling it has something to do with the locale but I do not bother to check if that is true or not

 

View solution in original post

2 REPLIES 2
PeeWee33
Frequent Visitor

Thanks Matt

 

I finally gott it working.  I had a working function to convert a datetime to a date. 

to_date(to_char(mytimecolumn, 'DD-MM-YYYY'))

 

I changed it to trunc(mytimecolumn)  and now I works just fine. I've got a feeling it has something to do with the locale but I do not bother to check if that is true or not

 

m13eam
Resolver II
Resolver II

Hi - this is a slight guess, but I wonder if this is to do with dates implicitly trying to convert from text to the wrong date format. For example, in the SQL, does it have something like the below?

MyDateField > '20/9/22'

My hunch is that is considering that to be MM/DD/YY - i.e. the 9th of the 20th month, 2022 - and throwing an error.

 

If so, changing such references to the below will provide explicit conversion instructions that should work:

MyDateField > TO_DATE('20/9/22','DD/MM/YY')

 

Thanks,

Matt

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors