[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

grant select permissions on created table

Posted on 2010-01-08
1
Medium Priority
?
1,138 Views
Last Modified: 2013-11-16
Hi:

 I have created a table as follows:

libname A db2 database=D SCHEMA=B user=&userid password=&userpw;

proc sql;
create table A.MTH(BULKLOAD=YES,DBCOMMIT=1000000,INSERTBUFF=10,
BL_DATAFILE='/myfolder/test.dat',BL_OPTIONS='compound=7 norowwarnings')
as select *
 from X.T1;
grant select on A.MNTH  to user1,user2  <------want to accomplish this!!
quit;
0
Comment
Question by:LuckyLucks
1 Comment
 
LVL 9

Accepted Solution

by:
bradanelson earned 2000 total points
ID: 26214694
You have to send that command to the database.  SAS will not process this command, obviously, that is why you are here. :-)

Here is some code I have used to connect to a database and send the GRANT command.

PROC SQL;
    CONNECT TO DB2(USER="&Username" PASS="&Password" PATH="&Pathname");

    EXECUTE(GRANT SELECT ON A.MNTH TO user1,user2) BY DB2;

    DISCONNECT FROM DB2;
QUIT;
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question