BookmarkSubscribeRSS Feed
Manasmita
Calcite | Level 5

Fetch Error.PNG Loading data from MySQL to Oracle  in  DI studio in table loader Transformation  , I am getting this  ERROR: CLI cursor fetch error: [MySQL][ODBC 5.3(w) Driver][mysqld-5.7.39-log]Fetch without a SELECT

9 REPLIES 9
s_lassen
Meteorite | Level 14

I tried looking it up, and the problem seems to come (sporadically) with the ODBC connection to MySQL (not just in SAS, the problem seems to have nothing to do with SAS). If possible, you should switch to the SAS Interface to MySQL, instead of going through ODBC.

Manasmita
Calcite | Level 5
You mean to say , i need to migrate the required tables from MYSql to Oracle and then write a scheduler to perform the activity in scheduled basis.
But , i need to write a SAS ETL job to perform this activity .
Is there any way to overcome this issue in SAS or at DB level ?
s_lassen
Meteorite | Level 14

No, you do not need to migrate the required tables. I think the solution is to use an interface to MySQL that does not go through ODBC, as that seems to be the one creating the problems. So, if you have access for MySQL, you may want to try that instead of the ODBC interface, as suggested here.

SASKiwi
PROC Star

Does reading the MySQL table into a SAS dataset work reliably? You could do the load via an intermediate SAS table.

Manasmita
Calcite | Level 5
Let me try to load the data in work library & get back to you asap.

Thank you very much for your quick response .
Manasmita
Calcite | Level 5

I tried to load the data in work Library,but  I am getting the same  ERROR: CLI cursor fetch error: [MySQL][ODBC 5.3(w) Driver][mysqld-5.7.39-log]Fetch Without Select.

Patrick
Opal | Level 21

Does the source MySQL table physically exist? Can you access it by any other means?

Manasmita
Calcite | Level 5

Hi Patrik,

 

Thanks for your response.

 

Does the source MySQL table physically exist?

The MySQL DB is on cloud .

 

Can you access it by any other means?

Through public IP we are accessing the DB server.

 

Note:

We have migrated the data to oracle DB . Now  we are doing some ETL activity on the same data & again loading the data to another oracle table , at table loader transformation we are facing  the below mentioned error.

 

Error: CLI CURSOR FETCH ERROR , FETCH WITHOUT A SELECT 

 

 

Patrick
Opal | Level 21

I've used in the past DIS with Oracle quite a bit but never with ODBC but the native SAS/Access to Oracle engine. If you have this engine licensed then ideally switch to using it.

I assume the issue is somewhere with the ODBC driver version. I suggest you raise a track with SAS Tech Support.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 913 views
  • 0 likes
  • 4 in conversation