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...

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2866 views
  • 0 likes
  • 2 in conversation