BookmarkSubscribeRSS Feed
Tater_Salad
Obsidian | Level 7

Hi I have the following table called Cohmon stored in a Library called JANUS (shown below).

How do I grant Access to all for the COHMON table?

 

The Library was created as so:

 

 

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

 

 

Is it something like:

 

 

GRANT ALL PRIVILEGES ON SCHEMA "JANUS" TO USERS;

 

 

 

directory.PNG

7 REPLIES 7
SuryaKiran
Meteorite | Level 14

Hello,

 

You have that dataset stored in Unix/Linux directory. You might need to set directory level permissions here (using Putty or similar ).

 

Check this link to learn about the permissions http://linuxcommand.org/lc3_lts0090.php 

 

Thanks,
Suryakiran
SASKiwi
PROC Star

You appear to be assuming that permissions on SAS tables work the same as in relational databases. They don't as SAS is not a relational database. There are two ways to control table permissions. One is through folder/directory permissions at the OS level, as @SuryaKiran has described. The other way is through SAS metadata, although this only applies if you define your library in SAS metadata via SAS Management Console, not with a LIBNAME statement.

Tater_Salad
Obsidian | Level 7

That makes total sense however I pulled this up on a SAS Document page on Granting privileges:

  

GRANT and DENY Statements

Enables you to give privileges to a specific user or all users to perform actions on objects. When submitting a grant, revoke, or deny DDL, surround all identifiers in quotation marks, including table and column names.

Note: CREATE DSN and ADMINISTER privileges cannot be granted or denied for the PUBLIC and USERS groups.

Syntax

GRANT | DENY { {"objectpriv" |"containerpriv" |

"serverpriv" [,...] } |

               ALL [ PRIVILEGES ] }

   [ ON { SCHEMA "schemaname" | CATALOG "catalogname" |

 [DATA] SERVICE "servicename" | DSN "dsnname" | SERVER } ]

   TO { "authid" | PUBLIC | USERS } [, ...]

    [ AS ADMINISTRATOR ]

 

I think my issue with this statement was, I was unable to figure out what they meant by SCHEMA, CATALOG, SERVICE, and DSN and how to map it to the structure I showed you in my first frame.

 

[ ON { SCHEMA "schemaname" | CATALOG "catalogname" |
 [DATA] SERVICE "servicename" | DSN "dsnname" | SERVER } ]

 

 So you know if this GRANT Statement applies to my issue at all?

 

Here's the link to the page:

 

http://support.sas.com/documentation/cdl/en/fedsrvmgrag/65976/HTML/default/viewer.htm#n00l5zxf3olrth...

 

SASKiwi
PROC Star

That relates to the SAS Federation Server which can be used to apply permissions to third-party relational databases only, not to SAS data.

Tater_Salad
Obsidian | Level 7

Here's an update:

Turns out it looks like the person requesting this info is wanting to GRANT Access on a Neteeza object.

So it would be something like:

 

proc sql;

create table RSYNC.target as
select * from WORK.SALES_TBL where 1 = 0;

insert into RSYNC.target 
select * from WORK.sales_tbl_tst2
;

GRANT INSERT, SELECT, DELETE ON RSYNC.target TO PUBLIC;


quit;

The trouble is when I run SAS with this GRant statement I get the following message:

 

NOTE: The GRANT statement is not implemented in PROC SQL.

Now this message is in green so it's not coming off as an error. But from the context of the message I'm not sure if GRANT privileges have actually been granted.

 

I've looked for Neteeza DBA table that'll tell me what privileges an object has and but, unlike Oracle which has DBA Tables and views for,..., you name it,..., the DBA tables in Netezza are somewhat limited.

 

Does anybody know if this is the way to go or if there's a more accurate way to set the native database privileges in SAS for Netezza?

 

I think I'm on the right track but I need to be sure.

Does anyow if this is the way to 

 

 

Reeza
Super User
So your data is on a server and you're trying to add this to a registered library? And you have the appropriate privileges to do so?

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!

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
  • 7 replies
  • 8940 views
  • 8 likes
  • 4 in conversation