BookmarkSubscribeRSS Feed
Tater_Salad
Obsidian | Level 7

We're using SAS EG 7.13 HF1 (7.100.3.5419) (64-bit)

 

I want to Grant privileges to a SCHEMA on a SAS server.

 

I'm trying to figure out the where I actually put this Grant statement.

 

Do I put the statement within the [proc sql; ---quit;]  block?

 

Also, if I'm trying to grant privileges to all the objects in the below folder how am I going to write that GRANT statement.

 

libname JANUS '/sasdata/mids_output02/rjs/';

 

I get an error when I try:

 

GRANT SELECT ON SCHEMA "JANUS" TO USERS; 

 

Below is the Project tree I'm basing this off. What am I missing?

 

directory.PNG

1 REPLY 1
SASKiwi
PROC Star

This looks like a followup to your earlier post:

https://communities.sas.com/t5/SAS-Programming/How-to-grant-access-to-a-table-built-in-SAS/m-p/52478...

 

As already mentioned, a SAS library is not a relational database. There is no concept of a SCHEMA at all. When you run your LIBNAME statement you are creating a pointer to an OS folder where SAS datasets are stored as specially-formatted OS files. The pointer you create, in your case JANUS is what is called a library reference or LIBREF for short.

 

You can't use SQL permissions statements on a SAS library. Instead permissions are controlled at the OS level. If a user has read permissions on your Unix folder - /sasdata/mids_output02/rjs - then they will be able to assign the LIBNAME and read the data. If you are not familiar with the Unix command to set folder permissions (chmod I believe) then talk to your SAS administrator.

 

To understand basic concepts like what is a SAS data library reading the documentation is helpful: https://documentation.sas.com/?docsetId=lrcon&docsetTarget=n0h2sjhthqhfogn1h6rxh3dvaiwj.htm&docsetVe...

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 3577 views
  • 0 likes
  • 2 in conversation