BookmarkSubscribeRSS Feed
Mohan_Rang
Calcite | Level 5

Hi SAS experts, We are working on SAS 9.4 for ETL and Redshift for data warehousing. When we sometimes read data in SAS from Redshift or write data to Redshift for small tables, we get the following error. This happens even for small tables when we attempt to get row count using PROC SQL in SAS. But for large tables (>10 M), this is always the case for both reading and writing. Can you please help us troubleshoot the issue?

 

ERROR: CLI prepare error: [SAS][ODBC Redshift Wire Protocol driver]Socket closed.
SQL statement: SELECT * FROM "schema".tblname.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds

3 REPLIES 3
ballardw
Super User

It may help to show the code submitted.

The quotes around schema in the from look a bit suspect and may indicate an improper libname creation/connection setting.

Mohan_Rang
Calcite | Level 5
It doesn't fail all the time. Sometimes the query goes through successfully and sometimes it fails with the socket error. Please see the query used below.

PROC SQL;
SELECT COUNT(*) FROM SCHEMA.TBLNAME
;
QUIT;
SASKiwi
PROC Star

You would be best to progress this in a track with SAS Tech Support. Perhaps a more recent Redshift ODBC driver version might help.

 

There's a few Redshift ODBC driver errors documented on SAS Support but none reference the error you are getting.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1807 views
  • 0 likes
  • 3 in conversation