BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

25 GOPTIONS ACCESSIBLE;
26 libname B1 SASIORST dsn=RedShift_conn user="xxxxxx" password=XXXXXXXXXX schema='shel';
NOTE: Libref B1 was successfully assigned as follows:
Engine: SASIORST
Physical Name: RedShift_conn
27
28
29


30 proc sql;
31 select count(*) from B1.rebate_app;
ERROR: CLI prepare error: [SAS][ODBC Redshift Wire Protocol driver]Socket closed.
SQL statement: SELECT * FROM "shel".REBATE_APP.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
32 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

1 ACCEPTED SOLUTION

Accepted Solutions
durgagprasad_gmail_com
Fluorite | Level 6

Issue is with firewall. Firewall team is added the NAT rule. now I can able to connect the DB.

View solution in original post

8 REPLIES 8
durgagprasad_gmail_com
Fluorite | Level 6

I tried this option and getting the same error.

SASKiwi
PROC Star

The fact that the LIBNAME assigned OK, but the SQL query got the CLI error suggests to me that connection settings are good but the connection itself is being interrupted for some reason. Try adding this tracing option:

options sastrace = ',,,d' SASTRACELOC = SASLOG;

before re-running your query to see if it helps with figuring what is going wrong.

durgagprasad_gmail_com
Fluorite | Level 6

Tried with the trace option. is there any other tracing option available to get more information on this ERROR?

32 proc sql;
33 select count(*) from RSHIFT.ev_rebate_application;
6 1590596507 no_name 0 SQL (2)
REDSHIFT_2: Prepared: on connection 1 7 1590596507 no_name 0 SQL (2)
SELECT * FROM "shelecv".EV_REBATE_APPLICATION 8 1590596507 no_name 0 SQL (2)
9 1590596507 no_name 0 SQL (2)
ERROR: CLI prepare error: [SAS][ODBC Redshift Wire Protocol driver]Socket closed.
SQL statement: SELECT * FROM "shelecv".EV_REBATE_APPLICATION.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
34 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

SASKiwi
PROC Star

@durgagprasad_gmail_com  - I think progressing this with SAS Tech Support is your best option. Could be worth checking with your IT network folks to see if there are any issues with firewall rules blocking ports. Although if that were the case then I would have thought the LIBNAME would fail.

JenniStephens
SAS Employee

This typically occurs when there is a permissions error on the Redshift DB. Can you run this query as the same user outside of SAS and verify no errors occur? 

durgagprasad_gmail_com
Fluorite | Level 6

I have tried with other client (Razorsql)  from SAS server and able to connect the redshift with SSH option. at the same time connection is not work working without ssh thru Razorsql.

 

durgagprasad_gmail_com
Fluorite | Level 6

Issue is with firewall. Firewall team is added the NAT rule. now I can able to connect the DB.

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
  • 8 replies
  • 3365 views
  • 0 likes
  • 4 in conversation