BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Filipvdr
Pyrite | Level 9

We are using SAS to connect to a SQL Server database but we are getting this error for a few tables in one of the schemas.

 

Filipvdr_0-1647416729330.png

 

I found this note so I changed the libname:

 

65778 - "Cursors are not supported on a...Clustered Columnstore Index" occurs when you use SAS/ACCES...

 

LIBNAME test SQLSVR 

cursor_type=forward_only   Datasrc=BISQL2  SCHEMA=MW1DM_03  AUTHDOMAIN="Auth_BISQL2" ;

 

But I’m still getting the same error. Am I doing something wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Filipvdr
Pyrite | Level 9

Driver=/opt/sas/sashome/AccessClients/9.4/SQLServer/lib/S0sqls27.so
Description=BISQL2_ICT_MW
Address=bisql-db, 1433
ConnectionRetryCount=0
ConnectionRetryDelay=3
Database=BISQL2
EncryptionMethod=0
EnableBulkLoad=1
EnableScrollableCursors=4
ValidateServerCertificate=0
Trusted_Connection=yes
AuthenticationMethod=9
EnableQuotedIdentifiers=1

 

Changing the "EnableScrollableCursors" to 4 solved my issue. Thanks for the support!

View solution in original post

8 REPLIES 8
LinusH
Tourmaline | Level 20

What kind of operation do you do to get this error?

Submit

options msglevel=i sastrace=',,,d' sastraceloc=saslog nostsuffix;

might give som more hints.

Can you reproduce directly in SQL Server?

Data never sleeps
Filipvdr
Pyrite | Level 9

I register the library in SAS Eguide and then try to open the table.

 

Or in code: just a simple datastep gives me the same result. 

 

28         options msglevel=i sastrace=',,,d' sastraceloc=saslog nostsuffix;
SQLSRV: AUTOCOMMIT is NO for connection 0
29         
30         LIBNAME test SQLSVR
31         cursor_type=forward_only   Datasrc=BISQL2  SCHEMA=MW1DM_03  AUTHDOMAIN="Auth_BISQL2" ;
NOTE:  Credential obtained from SAS metadata server.
NOTE: Libref TEST was successfully assigned as follows: 
      Engine:        SQLSVR 
      Physical Name: BISQL2
32         
SQLSRV: AUTOCOMMIT is NO for connection 1
SQLSRV: AUTOCOMMIT turned ON for connection id 1
 
SQLSRV_1: Prepared: on connection 1
SELECT * FROM "MW1DM_03"."ds_validation_evolution"
 
33         data temp;
34         set test.ds_validation_evolution;
35         run;

 
SQLSRV_2: Executed: on connection 1
Prepared statement SQLSRV_1
 
ERROR: CLI open cursor error: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Cursors are not supported on a table 
       which has a clustered columnstore index. : [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Statement(s) 
       could not be prepared.

 

LinusH
Tourmaline | Level 20

And I assume you get a successful query result using

SELECT * FROM "MW1DM_03"."ds_validation_evolution"

in SQL Server using thesa same credentials?

Looks like a connection configuration problem.

I would open a track with SAS tech support for assistence. 

Data never sleeps
Filipvdr
Pyrite | Level 9
Yes correct in SQL server no problem to do the same query. I opened a ticket. Thanks!
Filipvdr
Pyrite | Level 9

So the solution would be to add "SelectMethod=cursor" to my odbc.ini file?

 

[BISQL2]
Driver=/opt/sas/sashome/AccessClients/9.4/SQLServer/lib/S0sqls27.so
Description=BISQL2_ICT_MW
Address=bisql-db, 1433
ConnectionRetryCount=0
ConnectionRetryDelay=3
Database=BISQL2
EncryptionMethod=0
EnableBulkLoad=1
EnableScrollableCursors=3
ValidateServerCertificate=0
Trusted_Connection=yes
AuthenticationMethod=9
EnableQuotedIdentifiers=1
SelectMethod=cursor

Filipvdr
Pyrite | Level 9

Driver=/opt/sas/sashome/AccessClients/9.4/SQLServer/lib/S0sqls27.so
Description=BISQL2_ICT_MW
Address=bisql-db, 1433
ConnectionRetryCount=0
ConnectionRetryDelay=3
Database=BISQL2
EncryptionMethod=0
EnableBulkLoad=1
EnableScrollableCursors=4
ValidateServerCertificate=0
Trusted_Connection=yes
AuthenticationMethod=9
EnableQuotedIdentifiers=1

 

Changing the "EnableScrollableCursors" to 4 solved my issue. Thanks for the support!

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
  • 5432 views
  • 4 likes
  • 3 in conversation