BookmarkSubscribeRSS Feed
David_Billa
Rhodochrosite | Level 12

I'd like to know why in the error message it shows 'KSS_EXTERNAL' as it is not mentioned any where in the code? If UVW_ISM_TRANSACTIONS_RV_PIVOT is a view, we may get error message as shown below?

 

proc sql noprint;
  connect to sqlsvr(dsn=KGG_SC  
                    user="SAS_PU_UK" 
                    pwd="test@123" 
                    readbuff=32000);
 
  create table TRANSACTIONS_RV_PIVOT as
  select * from connection to sqlsvr 
    (                                                      
      select *
        
      from KGG_SC.dbo.UVW_ISM_TRANSACTIONS_RV_PIVOT);
 
  disconnect from sqlsvr;
quit;
 

Log:

 

26         proc sql noprint;
27           connect to sqlsvr(dsn=KGG_SC
28                             user="SAS_PU_UK"
29                             pwd=XXXXXXXXXXXXX
30                             readbuff=32000);
31         
32           create table TRANSACTIONS_RV_PIVOT as
33           select * from connection to sqlsvr
34             (
35               select *
36         
37               from KGG_SC.dbo.UVW_ISM_TRANSACTIONS_RV_PIVOT);
ERROR: CLI describe error: [SAS/ACCESS][ODBC SQL Server Legacy Driver][SQL Server]The server principal "SAS_PU_UK" is not 
       able to access the database "KSS_EXTERNAL" under the current security context.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
38         
39           disconnect from sqlsvr;
NOTE: Statement not executed due to NOEXEC option.
40         quit;

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

You're showing a SQL Server error message mentioning SQL Server architecture components, and this question is for your SQL Server DBAs.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 330 views
  • 0 likes
  • 2 in conversation