Solved

Permissions on views

Posted on 2002-04-16
7
194 Views
Last Modified: 2012-06-21
I like to give a user permission to crete views but don't want him to change/modify/delete data or table. What is the best way to setup this user?

Thanks.

Jammy
0
Comment
Question by:jlislo
  • 4
  • 3
7 Comments
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 6944883
You can issue this command:

GRANT CREATE VIEW TO user_name
0
 

Author Comment

by:jlislo
ID: 6945010
It this work for only one view or is a long time grant until I DisGrant (I don't know the command) one month later?

Thanks.
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 6945096
That command will allow that user to create any number of views.  It does stay in effect until you issue a REVOKE, so it would be in effect one month later, one year later, etc..  
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 6945120
Also, that user will be able to DROP any view he/she created, but not a view created by another id.
0
 

Author Comment

by:jlislo
ID: 6945261
Can I give the use just Public permision or I have to give him something like db_datawriter...etc rights.

I know I ask a lot so I increase points.

Thanks.
0
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 100 total points
ID: 6945323
The "GRANT CREATE VIEW TO user_name" just gives that one specific permission.  You can go into Query Analyzer and issue that command, and that user can then create views (and alter/delete any views he/she created, but no other users' views).

Db_datawriter, etc., are roles that essentially grant a lot of permissions.  I don't think that will help you here, because the only role (other than db_owner) that includes CREATE VIEW is db_ddladmin, and that gives a lot of other rights as well (such as ALTER TABLE, CREATE INDEX, CREATE TABLE, etc.).
0
 

Author Comment

by:jlislo
ID: 6945497
Thank you very much for the help.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS SQL Delete Query 9 30
Import access table (latest access version) into sql server express table 5 21
Help Required 2 29
Need help how to find where my error is in UFD 6 26
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

785 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