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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

sqlstate=HY000 SQLCODE=-1039

Dear Coll, I have trouble with the download of data from IBM DB2 connection. The Query worked fine untill 2 weeks ago. Since then, it turned slow, meaning the download runs at +/- 500 lines instead of 10,000 lines /second. (download at +/- 800 kbps instead of 50 Mbps) Nowadays, it even gets worse. After being slow for 2 hours, it breaks down. error code : see above. I have tested several conditions; it is not the network, neither the LAN or my network card; drivers haven't been changed. The only thing that differs is an update from win 10 (cumulative update 2019 07 win 10 version 1903 X64 (KB4505903) I have tried a reset to previous restore point, but that failed. Google and I have no clue what this error may have caused. Anyone an idea ?
3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

What is the completed error message?

This error may be caused for a distribution key or organizing key is changed at the same time.

Check if the similar thread would help.

https://community.powerbi.com/t5/Desktop/April-release-broke-certain-DB2-connections-SQLSTATE-HY000/td-p/396090

or

https://community.powerbi.com/t5/Desktop/Error-when-trying-to-connect-to-IBM-DB2/td-p/69094

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

complete error :

 

DataSource.Error: Microsoft Db2 Client: Er is een uitzondering opgetreden van het type Microsoft.HostIntegration.Drda.Common.DrdaException. SQLSTATE=HY000 SQLCODE=-1039
Details:
    DataSourceKind=DB2
    DataSourcePath=as400:446;PRD
    Message=Er is een uitzondering opgetreden van het type Microsoft.HostIntegration.Drda.Common.DrdaException. SQLSTATE=HY000 SQLCODE=-1039
   ErrorCode=-2146233088

 

Dear Miss,

 

I have checked both proposed solutions. Not applicable in my case, since both solutions are correct in my settings.  I have emptied the cache in the power BI. Is there any limit on cache or data ?  In my excel, I download +/- 4 million data lines into a pivot table. 

Yesterday, I have divide the PT into smaller pieces and it works (but it takes all day to download).

 

KR,

 

FHO

 

Hi @Anonymous 

From the error message, it seems it takes time out when loading large data.

When you import large data from IBM DB2 database into Power BI, to get it connected quicklly,you could connect to the database in direct query mode.

In this way, it doesn't need to import data into Power BI, but keep a connection with database.

https://docs.microsoft.com/en-us/power-bi/desktop-directquery-about

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.