Solved

How to assign table level permisssions in SQL SERVER 2005

Posted on 2009-04-03
7
791 Views
Last Modified: 2012-05-06


i have a SQL SERVER INSTANCE NAMED -  SQL EXPRESS

with  3 databases

one of them is  MARKET DB

which has 5 tables
1) HISTORY
2) ACCOUNTS
3) CAMPAIGN
4) LOGIN
5) RESPONSE

i have created a login named sam    and VP

by default,  the login sam can retrieve, select insert , update from the LOGIN TABLE
but i want to change that , SAM SHOULD Only be  able to select from the login table
but not update,delete or create any other table

VP should not have any access to response table
but he can create alter ,select update , insert , drop tables , other than response table

HOW DO I ACHIEVE THIS IN SQL SERVER 2005 ?

SHould i do it with SQL QUERIES or is there any other way

I am a newbie on this subject

0
Comment
Question by:viju2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 9

Assisted Solution

by:VikramMullick
VikramMullick earned 100 total points
ID: 24058285
0
 
LVL 1

Assisted Solution

by:hari_tailor
hari_tailor earned 100 total points
ID: 24058336
GRANT and REVOKE Statement are SQL Server, you can see more detail of statment  and Object permission in SQL Help

Example GRANT SELECT ON LOGIN TO sam
0
 
LVL 5

Author Comment

by:viju2008
ID: 24058400
i logged in using sam  

and type but i want it only for a particular table not the whole DATABASE
0
Now Available: Firebox Cloud for AWS and FireboxV

Firebox Cloud brings the protection of WatchGuard’s leading Firebox UTM appliances to public cloud environments. It enables organizations to extend their security perimeter to protect business-critical assets in Amazon Web Services (AWS).

 
LVL 1

Expert Comment

by:hari_tailor
ID: 24058439
SO use DENY Statement
0
 
LVL 31

Accepted Solution

by:
RiteshShah earned 300 total points
ID: 24058442
USE [master]
GO
CREATE LOGIN [ForMe] WITH PASSWORD=N'temp123', DEFAULT_DATABASE=[AdventureWorks],
CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO

USE [AdventureWorks]
GO
CREATE USER [ForMe] FOR LOGIN [ForMe]
GO

GRANT SELECT ON emps TO ForMe

0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24058444
and yes deny for all other permission like

DENY INSERT,UPDATE,DELETE ON emps TO ForMe
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24058501
finally this is for your [Login] table.
GRANT SELECT ON [LOGIN] TO Sam
 
DENY INSERT,UPDATE,DELETE ON [LOGIN] TO Sam

Open in new window

0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Job Hung 17 37
Trigger C# code inside the SQL Server 6 33
SQL Distinct Question 3 15
firewall log 4 38
OnPage: Incident management and secure messaging on your smartphone
This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

749 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