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

Hi All,

 

    I have difficulty to understand why the schema is case sensitive in libname statement when connecting to SQL tables with AD account.

 

For example:   

LIBNAME test SQLSVR DATASRC='SQL_Server_name' qualifier=SQL_Database_name SCHEMA=dbo USER='domain\windows_ID' PASSWORD='windows_Password';

 

here the schema dbo is case sensitive, but the SQL server name and SQL database name are not case sensitive. Do you know the reason of that?

 

Thank you!

Jade

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TomKari
Onyx | Level 15

It has caused a bunch of people problems through the years. I don't believe this has anything to do with SAS; I think that SAS just passes this through to the SQL Server engine, and this case sensitivity is a feature of SQL Server.

 

Tom

View solution in original post

4 REPLIES 4
TomKari
Onyx | Level 15

It has caused a bunch of people problems through the years. I don't believe this has anything to do with SAS; I think that SAS just passes this through to the SQL Server engine, and this case sensitivity is a feature of SQL Server.

 

Tom

Jade_SAS
Pyrite | Level 9

Thank you TomKari!

The thing I do not understand are:

1) The schema is not case sensitive in SQL Studio, just like the database name etc.

2) The database name and the server name are not case sensitive in SAS Libname statement

 

Combine 1) and 2), I did not see anything special about schema, then why only schema is case sensitive in SAS Libname statement?

 

Thanks,

Jade

TomKari
Onyx | Level 15

I agree with you that it's odd. Unfortunately, there's no way for us to tell whether it's still case sensitive in SQL Studio, and the product adapts for that, or whether SAS is doing something odd. Just one of those things we have to live with.

 

However, I can report that the same behaviour exists with at least one other database product (can't remember which, it was years ago), so that leads me to think it's the first option.

 

Tom

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1771 views
  • 1 like
  • 2 in conversation